libROM  v1.0
Data-driven physical simulation library
IncrementalSVDBrand.h
1 
11 // Description: The concrete implementation of the incremental SVD algorithm
12 // using Matthew Brand's (exact) "fast update" method.
13 
14 #ifndef included_IncrementalSVDBrand_h
15 #define included_IncrementalSVDBrand_h
16 
17 #include "IncrementalSVD.h"
18 #include "linalg/Options.h"
19 
20 namespace CAROM {
21 
28 {
29 public:
34 
41  const Matrix*
42  getSpatialBasis() override;
43 
50  const Matrix*
51  getTemporalBasis() override;
52 
53 private:
54  friend class BasisGenerator;
55 
68  Options options,
69  const std::string& basis_file_name);
70 
75 
80  const IncrementalSVDBrand& other);
81 
86  operator = (
87  const IncrementalSVDBrand& rhs);
88 
98  virtual
99  void
100  buildInitialSVD(
101  double* u);
102 
113  bool
114  buildIncrementalSVD(
115  double* u, bool add_without_increase = false) override;
116 
120  void
121  updateSpatialBasis();
122 
126  void
127  updateTemporalBasis();
128 
132  virtual
133  void
134  computeBasis();
135 
146  void
147  addLinearlyDependentSample(
148  const Matrix* A,
149  const Matrix* W,
150  const Matrix* sigma);
151 
165  void
166  addNewSample(
167  const Vector* j,
168  const Matrix* A,
169  const Matrix* W,
170  Matrix* sigma);
171 
176  Matrix* d_Up;
177 
181  double d_singular_value_tol;
182 
183 };
184 
185 }
186 
187 #endif
const Matrix * getSpatialBasis() override
Returns the basis vectors for the current time interval as a Matrix.
const Matrix * getTemporalBasis() override
Returns the temporal basis vectors for the current time interval as a Matrix.