Belos  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BelosOperatorT.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 #ifndef BELOS_OPERATORT_HPP
10 #define BELOS_OPERATORT_HPP
11 
12 #include "BelosOperatorTraits.hpp"
13 
14 namespace Belos {
15  // Base class for the Belos OP template type. Similar to Belos::Operator<> but this one deals with any kind of vector (not only Belos::MultiVec as the Belos::Operator interface)
16  template <class MV>
17  class OperatorT {
18 
19  public:
20 
22 
23 
25  OperatorT() {};
26 
28  virtual ~OperatorT() {};
30 
32 
33 
39  virtual void Apply ( const MV & x, MV & y, ETrans trans=NOTRANS ) const = 0;
40  };
41 
49  template <class ScalarType, class MV>
50  class OperatorTraits<ScalarType, MV, OperatorT<MV> >
51  {
52 
53  public:
55  static void Apply (const OperatorT<MV>& Op,
56  const MV& x,
57  MV& y, ETrans trans=NOTRANS) {
58  Op.Apply (x, y, trans);
59  }
60  };
61 
62 } // namespace Belos
63 
64 #endif // BELOS_OPERATORT_HPP
static void Apply(const OperatorT< MV > &Op, const MV &x, MV &y, ETrans trans=NOTRANS)
Specialization of Apply() for OperatorT.
Class which defines basic traits for the operator type.
ETrans
Whether to apply the (conjugate) transpose of an operator.
Definition: BelosTypes.hpp:49
virtual ~OperatorT()
Destructor.
OperatorT()
Default constructor.
Class which defines basic traits for the operator type.
virtual void Apply(const MV &x, MV &y, ETrans trans=NOTRANS) const =0
This routine takes the Belos::MultiVec x and applies the operator to it resulting in the Belos::Multi...

Generated on Fri Nov 22 2024 09:23:06 for Belos by doxygen 1.8.5