RBGen  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RBGen_ISVDMultiCD.h
1 #ifndef RBGEN_ISVDMULTICD_H
2 #define RBGEN_ISVDMULTICD_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 ISVDMultiCD : public virtual IncSVDPOD {
51 
52  public:
54 
55 
57  ISVDMultiCD();
58 
60  virtual ~ISVDMultiCD() {};
62 
64 
65 
69  const Teuchos::RCP< RBGen::FileIOHandler< Epetra_Operator > >& fileio = Teuchos::null );
70 
72 
74 
75 
77  void updateBasis( const Teuchos::RCP< Epetra_MultiVector >& update_ss );
78 
80 
81  protected:
82 
83  // private member for performing inc steps
84  virtual void makePass();
85 
86  // will need workspace for A*W = A - A Z T Z^T
87  // * local multivector for Z
88  // * dist multivector for A*Z
89  Teuchos::RCP<Epetra_MultiVector> workAZT_, workZ_;
91 
92  };
93 
94 } // end of RBGen namespace
95 
96 #endif // RBGEN_ISVDMULTICD_H
Class for producing a basis using the Incremental SVD in a single pass.
void updateBasis(const Teuchos::RCP< Epetra_MultiVector > &update_ss)
Update the current basis by appending new snapshots.
ISVDMultiCD()
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.
virtual ~ISVDMultiCD()
Destructor.
Class for producing a basis using the Incremental SVD.