Anasazi  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
AnasaziOperator.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Anasazi: Block Eigensolvers Package
4 //
5 // Copyright 2004 NTESS and the Anasazi contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
14 #ifndef ANASAZI_OPERATOR_HPP
15 #define ANASAZI_OPERATOR_HPP
16 
17 #include "AnasaziConfigDefs.hpp"
19 #include "AnasaziMultiVec.hpp"
20 #include "Teuchos_ScalarTraits.hpp"
21 
22 
23 namespace Anasazi {
24 
34  template <class ScalarType>
35  class Operator {
36  public:
38 
39  Operator() {};
41 
43  virtual ~Operator() {};
45 
47 
48 
52  virtual void Apply ( const MultiVec<ScalarType>& x, MultiVec<ScalarType>& y ) const = 0;
53 
55  };
56 
58  //
59  // Implementation of the Anasazi::OperatorTraits for Anasazi::Operator
60  // and Anasazi::MultiVec.
61  //
63 
72  template <class ScalarType>
73  class OperatorTraits < ScalarType, MultiVec<ScalarType>, Operator<ScalarType> >
74  {
75  public:
76 
78 
79 
83  static void Apply ( const Operator<ScalarType>& Op,
84  const MultiVec<ScalarType>& x,
86  { Op.Apply( x, y ); }
87 
89 
90  };
91 
92 } // end of Anasazi namespace
93 
94 #endif
95 
96 // end of file AnasaziOperator.hpp
Virtual base class which defines basic traits for the operator type.
virtual ~Operator()
Destructor.
Interface for multivectors used by Anasazi&#39; linear solvers.
virtual void Apply(const MultiVec< ScalarType > &x, MultiVec< ScalarType > &y) const =0
This method takes the Anasazi::MultiVec x and applies the operator to it resulting in the Anasazi::Mu...
static void Apply(const Operator< ScalarType > &Op, const MultiVec< ScalarType > &x, MultiVec< ScalarType > &y)
This method takes the Anasazi::MultiVec x and applies the Anasazi::Operator Op to it resulting in the...
Virtual base class which defines basic traits for the operator type.
Operator()
Default constructor.
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
Interface for multivectors used by Anasazi&#39;s linear solvers.
Anasazi&#39;s templated virtual class for constructing an operator that can interface with the OperatorTr...