RBGen  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RBGen_LapackPOD.h
1 
2 
3 #ifndef RBGEN_BASIC_POD_H
4 #define RBGEN_BASIC_POD_H
5 
6 #include "RBGen_PODMethod.hpp"
7 #include "RBGen_Method.hpp"
8 #include "Epetra_MultiVector.h"
9 #include "Epetra_Operator.h"
10 
11 namespace RBGen {
12 
14  class LapackPOD : public virtual Method<Epetra_MultiVector,Epetra_Operator>, public virtual PODMethod<double> {
15 
16  public:
18 
19 
21  LapackPOD();
22 
24  virtual ~LapackPOD() {};
26 
28 
29 
30  void computeBasis();
31 
32  void updateBasis( const Teuchos::RCP< Epetra_MultiVector >& update_ss ) {};
33 
35 
37 
38 
40 
41  std::vector<double> getSingularValues() const { return sv_; }
42 
43  double getCompTime() const { return comp_time_; }
45 
47 
48 
52  const Teuchos::RCP< RBGen::FileIOHandler< Epetra_Operator > >& fileio = Teuchos::null );
53 
54  void Reset( const Teuchos::RCP<Epetra_MultiVector>& new_ss ) { ss_ = new_ss; }
55 
57 
59 
60 
61  bool isInitialized() { return isInitialized_; }
62 
64 
65  private:
66 
67  // Is this object initialized.
68  bool isInitialized_;
69 
70  // Size of the basis that this method will compute.
71  int basis_size_;
72 
73  // Computational time (using wall clock).
74  double comp_time_;
75 
76  // Pointers to the snapshots and reduced basis.
79 
80  // Vector holding singular values.
81  std::vector<double> sv_;
82  };
83 
84 } // end of RBGen namespace
85 
86 #endif // RBGEN_BASIC_POD_H
void Reset(const Teuchos::RCP< Epetra_MultiVector > &new_ss)
Reset the snapshot set used to compute the reduced basis.
void Initialize(const Teuchos::RCP< Teuchos::ParameterList > &params, const Teuchos::RCP< const Epetra_MultiVector > &ss, const Teuchos::RCP< RBGen::FileIOHandler< Epetra_Operator > > &fileio=Teuchos::null)
Initialize the method with the given parameter list and snapshot set.
std::vector< double > getSingularValues() const
Returns the singular values computed corresponding to the reduced basis.
LapackPOD()
Default constructor.
void computeBasis()
Compute a basis for the provided snapshots.
Abstract base class for reduced basis methods.
Abstract base class for reduced basis POD methods.
Teuchos::RCP< const Epetra_MultiVector > getBasis() const
Get the basis computed by the reduced basis method.
void updateBasis(const Teuchos::RCP< Epetra_MultiVector > &update_ss)
Append new snapshots to the set, and update the basis.
double getCompTime() const
Returns the computational time taken to compute the reduced basis.
virtual ~LapackPOD()
Destructor.
Class for producing a basis using LAPACK.