#include <IncrementalSVD.h>
|
virtual void | buildInitialSVD (double *u, double time)=0 |
| Constructs the first SVD. More...
|
|
virtual bool | buildIncrementalSVD (double *u, bool add_without_increase=false) |
| Adds the new sampled the state vector, u, to the system. More...
|
|
virtual void | computeBasis ()=0 |
| Computes the current basis vectors.
|
|
void | constructQ (double *&Q, const Vector *l, double k) |
| Construct the matrix Q whose SVD is needed. More...
|
|
bool | svd (double *A, Matrix *&U, Matrix *&S, Matrix *&V) |
| Given a matrix, A, returns 2 of the 3 components of its singular value decomposition. The right singular vectors are not needed and therefore not returned. More...
|
|
virtual void | addLinearlyDependentSample (const Matrix *A, const Matrix *W, const Matrix *sigma)=0 |
| Add a linearly dependent sample to the SVD. More...
|
|
virtual void | addNewSample (const Vector *j, const Matrix *A, const Matrix *W, Matrix *sigma)=0 |
| Add a new, unique sample to the SVD. More...
|
|
int | numSamples () |
| The number of samples stored. More...
|
|
double | checkOrthogonality (const Matrix *m) |
| Computes and returns the orthogonality of m. More...
|
|
Abstract class IncrementalSVD defines the internal API of the incremental SVD algorithm.
◆ IncrementalSVD()
CAROM::IncrementalSVD::IncrementalSVD |
( |
Options |
options, |
|
|
const std::string & |
basis_file_name |
|
) |
| |
Constructor.
- Parameters
-
[in] | options | The struct containing the options for this abstract SVD class. |
[in] | basis_file_name | The base part of the name of the file containing the basis vectors. Each process will append its process ID to this base name. |
- See also
- Options
◆ addLinearlyDependentSample()
virtual void CAROM::IncrementalSVD::addLinearlyDependentSample |
( |
const Matrix * |
A, |
|
|
const Matrix * |
W, |
|
|
const Matrix * |
sigma |
|
) |
| |
|
protectedpure virtual |
Add a linearly dependent sample to the SVD.
- Precondition
- A != 0
-
sigma != 0
- Parameters
-
[in] | A | The left singular vectors. |
[in] | W | The right singular vectors. |
[in] | sigma | The singular values. |
◆ addNewSample()
virtual void CAROM::IncrementalSVD::addNewSample |
( |
const Vector * |
j, |
|
|
const Matrix * |
A, |
|
|
const Matrix * |
W, |
|
|
Matrix * |
sigma |
|
) |
| |
|
protectedpure virtual |
Add a new, unique sample to the SVD.
- Precondition
- j != 0
-
A != 0
-
sigma != 0
- Parameters
-
[in] | j | The new column of d_U. |
[in] | A | The left singular vectors. |
[in] | W | The right singular vectors. |
[in] | sigma | The singular values. |
◆ buildIncrementalSVD()
bool CAROM::IncrementalSVD::buildIncrementalSVD |
( |
double * |
u, |
|
|
bool |
add_without_increase = false |
|
) |
| |
|
protectedvirtual |
Adds the new sampled the state vector, u, to the system.
- Precondition
- u != 0
- Parameters
-
[in] | u | The new state. |
[in] | add_without_increase | If true, addLinearlyDependent is invoked. |
- Returns
- True if building the incremental SVD was successful.
◆ buildInitialSVD()
virtual void CAROM::IncrementalSVD::buildInitialSVD |
( |
double * |
u, |
|
|
double |
time |
|
) |
| |
|
protectedpure virtual |
Constructs the first SVD.
- Precondition
- u != 0
-
time >= 0.0
- Parameters
-
[in] | u | The first state. |
[in] | time | The simulation time for the first state. |
◆ checkOrthogonality()
double CAROM::IncrementalSVD::checkOrthogonality |
( |
const Matrix * |
m | ) |
|
|
protected |
Computes and returns the orthogonality of m.
- Precondition
- m != 0
- Parameters
-
[in] | m | The matrix to check. |
- Returns
- The orthogonality of m.
◆ constructQ()
void CAROM::IncrementalSVD::constructQ |
( |
double *& |
Q, |
|
|
const Vector * |
l, |
|
|
double |
k |
|
) |
| |
|
protected |
Construct the matrix Q whose SVD is needed.
- Precondition
- l != 0
-
l.dim() == numSamples()
- Parameters
-
[out] | Q | The matrix to be constructed. [d_S,l; 0,k] |
[in] | l | The last column of Q. |
[in] | k | The lower right element of Q. |
◆ getSingularValues()
const Vector * CAROM::IncrementalSVD::getSingularValues |
( |
| ) |
|
|
virtual |
Returns the singular values for the current time interval.
- Returns
- The singular values for the current time interval.
Implements CAROM::SVD.
◆ getSnapshotMatrix()
const Matrix * CAROM::IncrementalSVD::getSnapshotMatrix |
( |
| ) |
|
|
virtual |
Returns the snapshot matrix for the current time interval.
- Returns
- The snapshot matrix for the current time interval.
Implements CAROM::SVD.
◆ getSpatialBasis()
const Matrix * CAROM::IncrementalSVD::getSpatialBasis |
( |
| ) |
|
|
virtual |
◆ getTemporalBasis()
const Matrix * CAROM::IncrementalSVD::getTemporalBasis |
( |
| ) |
|
|
virtual |
Returns the temporal basis vectors for the current time interval as a Matrix.
- Returns
- The temporal basis vectors for the current time interval.
Implements CAROM::SVD.
Reimplemented in CAROM::IncrementalSVDBrand.
◆ numSamples()
int CAROM::IncrementalSVD::numSamples |
( |
| ) |
|
|
inlineprotected |
The number of samples stored.
- Returns
- The number of samples stored.
◆ svd()
Given a matrix, A, returns 2 of the 3 components of its singular value decomposition. The right singular vectors are not needed and therefore not returned.
- Precondition
- A != 0
- Parameters
-
[in] | A | The matrix whose SVD is needed. |
[out] | U | The left singular vectors of A. |
[out] | S | The singular values of A. |
[out] | V | The right singular vectors of A. |
- Returns
- True if the SVD succeeded.
◆ takeSample()
bool CAROM::IncrementalSVD::takeSample |
( |
double * |
u_in, |
|
|
double |
time, |
|
|
bool |
add_without_increase = false |
|
) |
| |
|
virtual |
Sample new state, u_in, at the given time.
- Precondition
- u_in != 0
-
time >= 0.0
- Parameters
-
[in] | u_in | The state at the specified time. |
[in] | time | The simulation time for the state. |
[in] | add_without_increase | If true, addLinearlyDependent is invoked. |
- Returns
- True if the sampling was successful.
Implements CAROM::SVD.
The documentation for this class was generated from the following files: