libROM
v1.0
Data-driven physical simulation library
|
#include <SVD.h>
Public Member Functions | |
SVD (Options options) | |
Constructor. More... | |
~SVD () | |
virtual bool | takeSample (double *u_in, double time, bool add_without_increase)=0 |
Collect the new sample, u_in at supplied time. More... | |
int | getDim () const |
Returns the dimension of the system on this processor. More... | |
virtual const Matrix * | getSpatialBasis ()=0 |
Returns the basis vectors for the current time interval. More... | |
virtual const Matrix * | getTemporalBasis ()=0 |
Returns the temporal basis vectors for the current time interval. More... | |
virtual const Vector * | getSingularValues ()=0 |
Returns the singular values for the current time interval. More... | |
virtual const Matrix * | getSnapshotMatrix ()=0 |
Returns the singular values for the current time interval. More... | |
int | getNumBasisTimeIntervals () const |
Returns the number of time intervals on which different sets of basis vectors are defined. More... | |
double | getBasisIntervalStartTime (int which_interval) const |
Returns the start time for the requested time interval. More... | |
bool | isNewTimeInterval () const |
Returns true if the next sample will result in a new time interval. More... | |
void | increaseTimeInterval () |
Increase the number of time intervals by one. | |
int | getNumSamples () const |
Get the number of samples taken. | |
Protected Attributes | |
int | d_dim |
Dimension of the system. | |
int | d_num_samples |
Number of samples stored for the current time interval. | |
int | d_num_rows_of_W |
Number of rows in right singular matrix. | |
const int | d_samples_per_time_interval |
The maximum number of samples to be collected for a time interval. | |
const int | d_max_time_intervals |
The maximum number of time intervals. | |
Matrix * | d_basis |
The globalized basis vectors for the current time interval. More... | |
Matrix * | d_basis_right |
The globalized right basis vectors for the current time interval. More... | |
Matrix * | d_U |
The matrix U which is large. More... | |
Matrix * | d_W |
The matrix U which is large. More... | |
Vector * | d_S |
The vector S which is small. More... | |
Matrix * | d_snapshots |
The globalized snapshot vectors for the current time interval. More... | |
std::vector< double > | d_time_interval_start_times |
The simulation time at which each time interval starts. | |
bool | d_debug_algorithm |
Flag to indicate if results of algorithm should be printed for debugging purposes. | |
Class SVD defines the interface to the generic SVD algorithm. The API is intentionally small. One may collect the samples, compute the SVD, and get the dimension of the system.
CAROM::SVD::SVD | ( | Options | options | ) |
CAROM::SVD::~SVD | ( | ) |
Destructor.
|
inline |
Returns the start time for the requested time interval.
[in] | which_interval | The time interval of interest. |
|
inline |
Returns the dimension of the system on this processor.
|
inline |
Returns the number of time intervals on which different sets of basis vectors are defined.
|
pure virtual |
Returns the singular values for the current time interval.
Implemented in CAROM::StaticSVD, and CAROM::IncrementalSVD.
|
pure virtual |
Returns the singular values for the current time interval.
Implemented in CAROM::StaticSVD, and CAROM::IncrementalSVD.
|
pure virtual |
Returns the basis vectors for the current time interval.
Implemented in CAROM::IncrementalSVDBrand, CAROM::StaticSVD, and CAROM::IncrementalSVD.
|
pure virtual |
Returns the temporal basis vectors for the current time interval.
Implemented in CAROM::IncrementalSVDBrand, CAROM::StaticSVD, and CAROM::IncrementalSVD.
|
inline |
Returns true if the next sample will result in a new time interval.
|
pure virtual |
Collect the new sample, u_in at supplied time.
[in] | u_in | The new sample. |
[in] | time | The simulation time of the new sample. |
[in] | add_without_increase | If true, the addLinearlyDependent is invoked. This only applies to incremental SVD. |
Implemented in CAROM::StaticSVD, and CAROM::IncrementalSVD.
|
protected |
The globalized basis vectors for the current time interval.
The basis vectors are large and each process owns all of the basis vectors.
|
protected |
The globalized right basis vectors for the current time interval.
Depending on the SVD algorithm, it may be distributed across all processors or each processor may own all of U.
|
protected |
The vector S which is small.
For all SVD algorithms, S is not distributed and the entire vector exists on each processor.
|
protected |
The globalized snapshot vectors for the current time interval.
The snapshot vectors are large and each process owns all of the snapshot vectors.
|
protected |
The matrix U which is large.
Depending on the SVD algorithm, d_U may be distributed across all processors or each processor may own all of U.
|
protected |
The matrix U which is large.
Depending on the SVD algorithm, d_W may be distributed across all processors or each processor may own all of U.