libROM  v1.0
Data-driven physical simulation library
 All Classes Functions Variables Enumerations
Public Member Functions | Protected Attributes | List of all members
CAROM::SVD Class Referenceabstract

#include <SVD.h>

Inheritance diagram for CAROM::SVD:
CAROM::IncrementalSVD CAROM::StaticSVD CAROM::IncrementalSVDFastUpdate CAROM::IncrementalSVDStandard CAROM::RandomizedSVD

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 MatrixgetSpatialBasis ()=0
 Returns the basis vectors for the current time interval. More...
 
virtual const MatrixgetTemporalBasis ()=0
 Returns the temporal basis vectors for the current time interval. More...
 
virtual const VectorgetSingularValues ()=0
 Returns the singular values for the current time interval. More...
 
virtual const MatrixgetSnapshotMatrix ()=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.
 
Matrixd_basis
 The globalized basis vectors for the current time interval. More...
 
Matrixd_basis_right
 The globalized right basis vectors for the current time interval. More...
 
Matrixd_U
 The matrix U which is large. More...
 
Matrixd_W
 The matrix U which is large. More...
 
Vectord_S
 The vector S which is small. More...
 
Matrixd_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.
 

Detailed Description

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.

Constructor & Destructor Documentation

CAROM::SVD::SVD ( Options  options)

Constructor.

Parameters
[in]optionsThe struct containing the options for this abstract SVD class.
See Also
Options
CAROM::SVD::~SVD ( )

Destructor.

Member Function Documentation

double CAROM::SVD::getBasisIntervalStartTime ( int  which_interval) const
inline

Returns the start time for the requested time interval.

Precondition
0 <= which_interval
which_interval < getNumBasisTimeIntervals()
Parameters
[in]which_intervalThe time interval of interest.
Returns
The start time for the requested time interval.
int CAROM::SVD::getDim ( ) const
inline

Returns the dimension of the system on this processor.

Returns
The dimension of the system on this processor.
int CAROM::SVD::getNumBasisTimeIntervals ( ) const
inline

Returns the number of time intervals on which different sets of basis vectors are defined.

Returns
The number of time intervals on which there are basis vectors.
virtual const Vector* CAROM::SVD::getSingularValues ( )
pure virtual

Returns the singular values for the current time interval.

Returns
The singular values for the current time interval.

Implemented in CAROM::IncrementalSVD, and CAROM::StaticSVD.

virtual const Matrix* CAROM::SVD::getSnapshotMatrix ( )
pure virtual

Returns the singular values for the current time interval.

Returns
The singular values for the current time interval.

Implemented in CAROM::IncrementalSVD, and CAROM::StaticSVD.

virtual const Matrix* CAROM::SVD::getSpatialBasis ( )
pure virtual

Returns the basis vectors for the current time interval.

Returns
The basis vectors for the current time interval.

Implemented in CAROM::IncrementalSVD, and CAROM::StaticSVD.

virtual const Matrix* CAROM::SVD::getTemporalBasis ( )
pure virtual

Returns the temporal basis vectors for the current time interval.

Returns
The temporal basis vectors for the current time interval.

Implemented in CAROM::IncrementalSVD, and CAROM::StaticSVD.

bool CAROM::SVD::isNewTimeInterval ( ) const
inline

Returns true if the next sample will result in a new time interval.

Returns
True if the next sample results in the creation of a new time interval.
virtual bool CAROM::SVD::takeSample ( double *  u_in,
double  time,
bool  add_without_increase 
)
pure virtual

Collect the new sample, u_in at supplied time.

Precondition
u_in != 0
time >= 0.0
Parameters
[in]u_inThe new sample.
[in]timeThe simulation time of the new sample.
[in]add_without_increaseIf true, the addLinearlyDependent is invoked. This only applies to incremental SVD.
Returns
True if the sampling was successful.

Implemented in CAROM::IncrementalSVD, and CAROM::StaticSVD.

Member Data Documentation

Matrix* CAROM::SVD::d_basis
protected

The globalized basis vectors for the current time interval.

The basis vectors are large and each process owns all of the basis vectors.

Matrix* CAROM::SVD::d_basis_right
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.

Vector* CAROM::SVD::d_S
protected

The vector S which is small.

For all SVD algorithms, S is not distributed and the entire vector exists on each processor.

Matrix* CAROM::SVD::d_snapshots
protected

The globalized snapshot vectors for the current time interval.

The snapshot vectors are large and each process owns all of the snapshot vectors.

Matrix* CAROM::SVD::d_U
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.

Matrix* CAROM::SVD::d_W
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.


The documentation for this class was generated from the following file: