RBGen  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RBGen_ISVDUDV.h
1 #ifndef RBGEN_ISVDUDV_H
2 #define RBGEN_ISVDUDV_H
3 
4 #include "RBGen_IncSVDPOD.h"
5 
6 //
7 // computeBasis()
8 // |
9 // makePass() ___
10 // while () { / expand()
11 // incStep() ---- SVD()
12 // } \___ shrink()
13 //
14 // makePass(), expand() and shrink() are pure virtual
15 //
16 // makePass() is implemented in a base class that decides
17 // if a method is Multipass, and if so, in what manner
18 // makePass() puts the data for the next pass into the proper columns
19 // of U_, then calls incstep (telling it how many new columns)
20 //
21 // incstep calls expand to construct expanded U_ and V_, and B_
22 // it computes the SVD of B_
23 // it passes this data to shrink(), which shrink according to the
24 // base class.
25 //
26 // expand(),shrink() are implemented in a base class that
27 // decides the representation: UDV, QRW, QBW
28 //
29 // IncSVDPOD
30 // |
31 // -------------------------------------------------------------------
32 // | | | | | | |
33 // ISVDUDV ISVDQRW ISVDQBW ISVDMultiCD ISVDMultiSDA ISVDMultiSDB ISVDSingle
34 // | | | | | | |
35 // ------------------ --------------------------------------
36 // \ /
37 // \ /
38 // \ /
39 // \ /
40 // \ /
41 // \--- Concrete Base Class ----/
42 //
43 // Then a concrete base class (one of 3x4==12 varieties) is formed simply through
44 // inheritence. This is the Template Pattern type of Design Pattern.
45 //
46 
47 namespace RBGen {
48 
50  class ISVDUDV : public virtual IncSVDPOD {
51 
52  public:
54 
55 
57  ISVDUDV();
58 
60  virtual ~ISVDUDV() {};
62 
64 
65 
69  const Teuchos::RCP< RBGen::FileIOHandler< Epetra_Operator > >& fileio = Teuchos::null );
70 
72 
73  protected:
74 
75  // private member for performing inc steps
76  void expand(const int lup);
77  void shrink(const int down, std::vector<double> &S, Epetra_SerialDenseMatrix &U, Epetra_SerialDenseMatrix &V);
78 
79  // workspace for U_*U1
80  Teuchos::RCP<Epetra_MultiVector> workU_, workV_;
81  };
82 
83 } // end of RBGen namespace
84 
85 #endif // RBGEN_ISVDUDV_H
86 
ISVDUDV()
Default constructor.
void Initialize(const Teuchos::RCP< Teuchos::ParameterList > &params, const Teuchos::RCP< const Epetra_MultiVector > &init, const Teuchos::RCP< RBGen::FileIOHandler< Epetra_Operator > > &fileio=Teuchos::null)
Initialize the method with the given parameter list and snapshot set.
Class for producing a basis using the Incremental SVD.
Definition: RBGen_ISVDUDV.h:50
virtual ~ISVDUDV()
Destructor.
Definition: RBGen_ISVDUDV.h:60
Class for producing a basis using the Incremental SVD.