Anasazi  Version of the Day
AnasaziOperatorTraits.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Anasazi: Block Eigensolvers Package
5 // Copyright (2004) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
25 //
26 // ***********************************************************************
27 // @HEADER
28 
29 #ifndef ANASAZI_OPERATOR_TRAITS_HPP
30 #define ANASAZI_OPERATOR_TRAITS_HPP
31 
36 #include "AnasaziConfigDefs.hpp"
37 #include "AnasaziTypes.hpp"
38 
39 
40 namespace Anasazi {
41 
42 
44  class OperatorError : public AnasaziError
45  {public: OperatorError(const std::string& what_arg) : AnasaziError(what_arg) {}};
46 
47 
51  template< class ScalarType, class MV, class OP >
53  {
55 
59  static inline void notDefined() { return OP::this_type_is_missing_a_specialization(); };
60  };
61 
62 
70  template <class ScalarType, class MV, class OP>
72  {
73  public:
74 
76 
77 
79  static void Apply ( const OP& Op,
80  const MV& x,
81  MV& y )
83 
85 
86  };
87 
88 } // end Anasazi namespace
89 
90 #endif // ANASAZI_OPERATOR_TRAITS_HPP
91 
92 // end of file AnasaziOperatorTraits.hpp
This is the default struct used by OperatorTraits<ScalarType, MV, OP> class to produce a compile time...
Virtual base class which defines basic traits for the operator type.
static void Apply(const OP &Op, const MV &x, MV &y)
Application method which performs operation y = Op*x. An OperatorError exception is thrown if there i...
An exception class parent to all Anasazi exceptions.
Namespace Anasazi contains the classes, structs, enums and utilities used by the Anasazi package...
static void notDefined()
This function should not compile if there is an attempt to instantiate!
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
Types and exceptions used within Anasazi solvers and interfaces.
Exceptions thrown to signal error in operator application.