Debian Codegraph @

packages/anasazi/src-rbgen/RBGen_Method.hpp

raw
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
10 #ifndef RBGEN_METHOD_HPP
11 #define RBGEN_METHOD_HPP
12
13 #include "RBGen_FileIOHandler.hpp"
14 #include "Teuchos_RCP.hpp"
15 #include "Teuchos_ParameterList.hpp"
16
17 /*! \file RBGen_Method.h
18 \brief Provides abstract base class for reduced basis methods.
19 */
20
21 namespace RBGen {
22
23 //! Abstract base class for reduced basis methods.
24 template<class DataSetType, class OperatorType>
25 class Method {
26
27 public:
28 //! @name Constructor/Destructor.
29 //@{
30
31 //! Default constructor.
32 Method() {};
33
34
35 //! Destructor.
36 virtual ~Method() {};
37 //@}
38
39 //! @name Computation Methods
40 //@{
41
42 //! Compute a basis for the provided snapshots.
43 virtual void computeBasis() = 0;
44
45 //! Append new snapshots to the set, and update the basis.
46 virtual void updateBasis( const Teuchos::RCP< DataSetType >& update_ss ) = 0;
47
48 //@}
49
50 //! @name Get Methods
51 //@{
52
53 //! Get the basis computed by the reduced basis method.
54 virtual Teuchos::RCP<const DataSetType> getBasis() const = 0;
55
56 //! Returns the computational time taken to compute the reduced basis.
57 virtual double getCompTime() const = 0;
58
59 //@}
60
61 //! @name Set Methods
62 //@{
63
64 //! Initialize the method with the given parameter list and snapshot set.
65 virtual void Initialize( const Teuchos::RCP< Teuchos::ParameterList >& params,
66 const Teuchos::RCP< const DataSetType >& ss,
67 const Teuchos::RCP< RBGen::FileIOHandler< OperatorType > >& fileio = Teuchos::null ) = 0;
68
69 //! Reset the snapshot set used to compute the reduced basis.
70 virtual void Reset( const Teuchos::RCP< DataSetType >& new_ss ) = 0;
71
72 //@}
73
74 //! @name Status Methods
75 //@{
76
77 virtual bool isInitialized() = 0;
78
79 //@}
80 };
81
82 } // end of RBGen namespace
83
84 #endif // RBGEN_METHOD_HPP