Belos Version of the Day
Loading...
Searching...
No Matches
BelosOperatorTraits.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Belos: Block Linear Solvers Package
4//
5// Copyright 2004-2016 NTESS and the Belos contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef BELOS_OPERATOR_TRAITS_HPP
11#define BELOS_OPERATOR_TRAITS_HPP
12
16#include "BelosConfigDefs.hpp"
17#include "BelosTypes.hpp"
18
19namespace Belos {
20
28 template<class ScalarType, class MV, class OP>
30 {
31 public:
38 static inline void notDefined() {
39 OP::this_type_is_missing_a_specialization();
40 };
41 };
42
76 template <class ScalarType, class MV, class OP>
78 {
79 public:
80
90 static void
91 Apply (const OP& Op,
92 const MV& x,
93 MV& y,
95 {
96 // This will result in a deliberate compile-time error, if a
97 // specialization of OperatorTraits has not been defined for the
98 // MV and OP types.
100 };
101
119 static bool HasApplyTranspose (const OP& Op) {
120 return false;
121 }
122 };
123
124} // end Belos namespace
125
126#endif // BELOS_OPERATOR_TRAITS_HPP
127
128// end of file BelosOperatorTraits.hpp
Belos header file which uses auto-configuration information to include necessary C++ headers.
Collection of types and exceptions used within the Belos solvers.
Class which defines basic traits for the operator type.
static bool HasApplyTranspose(const OP &Op)
Whether this operator implements applying the transpose.
static void Apply(const OP &Op, const MV &x, MV &y, ETrans trans=NOTRANS)
Apply Op to x, putting the result into y.
Alternative run-time polymorphic interface for operators.
Class used to require specialization of OperatorTraits.
static void notDefined()
Function that will not compile if instantiation is attempted.
ETrans
Whether to apply the (conjugate) transpose of an operator.

Generated for Belos by doxygen 1.9.8