Belos  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
19 namespace 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,
94  ETrans trans = NOTRANS)
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
Collection of types and exceptions used within the Belos solvers.
Class used to require specialization of OperatorTraits.
ETrans
Whether to apply the (conjugate) transpose of an operator.
Definition: BelosTypes.hpp:49
static void Apply(const OP &Op, const MV &x, MV &y, ETrans trans=NOTRANS)
Apply Op to x, putting the result into y.
static void notDefined()
Function that will not compile if instantiation is attempted.
Class which defines basic traits for the operator type.
static bool HasApplyTranspose(const OP &Op)
Whether this operator implements applying the transpose.
Belos header file which uses auto-configuration information to include necessary C++ headers...

Generated on Fri Dec 20 2024 09:24:49 for Belos by doxygen 1.8.5