libROM  v1.0
Data-driven physical simulation library
Public Member Functions | Public Attributes | List of all members
CAROM::Options Class Reference

#include <Options.h>

Public Member Functions

 Options (int dim_, int max_num_samples_, bool update_right_SV_=false, bool write_snapshots_=false)
 Constructor. More...
 
Options setMaxBasisDimension (int max_basis_dimension_)
 Sets the maximum basis dimension of the SVD algorithm. More...
 
Options setSingularValueTol (double singular_value_tol_)
 Sets the singular value tolerance of the SVD algorithm. More...
 
Options setDebugMode (bool debug_algorithm_)
 Sets whether debugging is turned on. More...
 
Options setRandomizedSVD (bool randomized_, int randomized_subspace_dim_=-1, int random_seed_=1)
 Sets the parameters of the randomized SVD algorithm. More...
 
Options setIncrementalSVD (double linearity_tol_, double initial_dt_, double sampling_tol_, double max_time_between_samples_, bool fast_update_=false, bool fast_update_brand_=false, bool skip_linearly_dependent_=false)
 Sets the essential parameters of the incremental SVD algorithm. More...
 
Options setStateIO (bool save_state_, bool restore_state_)
 Sets the state IO parameters of the incremental SVD algorithm. More...
 
Options setSamplingTimeStepScale (double min_sampling_time_step_scale_, double sampling_time_step_scale_, double max_sampling_time_step_scale_)
 Sets the sampling time step scaling of the incremental SVD algorithm. More...
 

Public Attributes

int dim = -1
 The dimension of the system on this processor.
 
int max_num_samples = -1
 The maximum number of samples.
 
bool update_right_SV = false
 Whether to update the right singular values.
 
bool write_snapshots = false
 Whether to write snapshots or bases.
 
int max_basis_dimension = -1
 The maximum dimension of the basis.
 
double singular_value_tol = 0
 The singular value tolerance used in the SVD algorithm.
 
bool debug_algorithm = false
 Whether debugging is turned on (any randomness is turned off).
 
bool randomized = false
 Whether to use the randomized SVD algorithm.
 
int randomized_subspace_dim = -1
 The dimension of the randomized subspace used in the randomized SVD algogrithm.
 
int random_seed = 1
 The random seed used to initialize the algorithm.
 
double linearity_tol = -1
 The tolerance of the incremental SVD algorithm to determine whether or not a sample is linearly dependent.
 
double initial_dt = -1
 The initial simulation time step of the incremental SVD algorithm.
 
double sampling_tol = -1
 The sampling control tolerance of the incremental SVD algorithm. Limits error in projection of solution into reduced order space.
 
double max_time_between_samples = -1
 The upper bound on time between samples of the incremental SVD algorithm.
 
bool fast_update = false
 If true use the fast update version of the incremental SVD algorithm.
 
bool fast_update_brand = false
 If true use the exact Brand's algorithm for the incremental SVD.
 
bool skip_linearly_dependent = false
 If true skip linearly dependent samples of the incremental SVD algorithm.
 
bool save_state = false
 If true the state of the incremental SVD will be written to disk when the object is deleted. If there are multiple time intervals then the state will not be saved as restoring such a state makes no sense.
 
bool restore_state = false
 If true the state of the incremental SVD will be restored when the object is created.
 
double min_sampling_time_step_scale = 0.1
 The minimum overall scale factor to apply to time step of the incremental SVD algorithm.
 
double sampling_time_step_scale = 0.8
 The scaling factor to apply to sampling algorithm of the incremental SVD algorithm.
 
double max_sampling_time_step_scale = 5.0
 The maximum overall scale factor to apply to time step of the incremental SVD algorithm.
 
bool static_svd_preserve_snapshot = false
 Option to preserve snapshot in StaticSVD::computeSVD.
 

Detailed Description

Class Options defines the parameters to the BasisGenerator class and SVD algorithm. StaticSVD, RandomizedSVD, and IncrementalSVD parameters can be set.

Definition at line 26 of file Options.h.

Constructor & Destructor Documentation

◆ Options()

CAROM::Options::Options ( int  dim_,
int  max_num_samples_,
bool  update_right_SV_ = false,
bool  write_snapshots_ = false 
)
inline

Constructor.

Precondition
dim_ > 0
max_num_samples_ > 0
Parameters
[in]dim_The dimension of the system on this processor.
[in]max_num_samples_The maximum number of samples in each time interval.
[in]update_right_SV_Whether to update the right SV or not.
[in]write_snapshots_Whether to automatically write snapshots matrices instead of basis matrices.

Definition at line 43 of file Options.h.

Member Function Documentation

◆ setDebugMode()

Options CAROM::Options::setDebugMode ( bool  debug_algorithm_)
inline

Sets whether debugging is turned on.

Parameters
[in]debug_algorithm_Whether to turn on debugging.

Definition at line 95 of file Options.h.

◆ setIncrementalSVD()

Options CAROM::Options::setIncrementalSVD ( double  linearity_tol_,
double  initial_dt_,
double  sampling_tol_,
double  max_time_between_samples_,
bool  fast_update_ = false,
bool  fast_update_brand_ = false,
bool  skip_linearly_dependent_ = false 
)
inline

Sets the essential parameters of the incremental SVD algorithm.

Precondition
linearity_tol_ > 0.0
initial_dt_ > 0.0
sampling_tol_ > 0.0
Parameters
[in]linearity_tol_Tolerance to determine whether or not a sample is linearly dependent.
[in]initial_dt_Initial simulation time step.
[in]sampling_tol_Sampling control tolerance. Limits error in projection of solution into reduced order space.
[in]max_time_between_samples_Upper bound on time between samples.
[in]fast_update_If true use the fast update algorithm.
[in]skip_linearly_dependent_If true skip linearly dependent samples.

Definition at line 142 of file Options.h.

◆ setMaxBasisDimension()

Options CAROM::Options::setMaxBasisDimension ( int  max_basis_dimension_)
inline

Sets the maximum basis dimension of the SVD algorithm.

Precondition
max_basis_dimension_ > 0
Parameters
[in]max_basis_dimension_The maximum basis dimension of the basis.

Definition at line 62 of file Options.h.

◆ setRandomizedSVD()

Options CAROM::Options::setRandomizedSVD ( bool  randomized_,
int  randomized_subspace_dim_ = -1,
int  random_seed_ = 1 
)
inline

Sets the parameters of the randomized SVD algorithm.

Parameters
[in]randomized_Whether to use randomization.
[in]randomized_subspace_dim_The dimension of the randomized subspace
[in]random_seed_The random seed used to initialize the algorithm.

Definition at line 111 of file Options.h.

◆ setSamplingTimeStepScale()

Options CAROM::Options::setSamplingTimeStepScale ( double  min_sampling_time_step_scale_,
double  sampling_time_step_scale_,
double  max_sampling_time_step_scale_ 
)
inline

Sets the sampling time step scaling of the incremental SVD algorithm.

Precondition
max_time_between_samples_ > 0.0
min_sampling_time_step_scale_ >= 0.0
sampling_time_step_scale_ >= 0.0
max_sampling_time_step_scale_ >= 0.0
min_sampling_time_step_scale_ <= max_sampling_time_step_scale
Parameters
[in]min_sampling_time_step_scale_Minimum overall scale factor to apply to time step.
[in]sampling_time_step_scale_Scale factor to apply to sampling algorithm.
[in]max_sampling_time_step_scale_Maximum overall scale factor to apply to time step.

Definition at line 200 of file Options.h.

◆ setSingularValueTol()

Options CAROM::Options::setSingularValueTol ( double  singular_value_tol_)
inline

Sets the singular value tolerance of the SVD algorithm.

Precondition
singular_value_tol_ >= 0
Parameters
[in]singular_value_tol_The singular value tolerance of the SVD algorithm. If both max_basis_dimension and singular_value_tol would result in truncating the basis, the dimension of the returned basis will be the minimum of the number of vectors that is computed from each.

Definition at line 82 of file Options.h.

◆ setStateIO()

Options CAROM::Options::setStateIO ( bool  save_state_,
bool  restore_state_ 
)
inline

Sets the state IO parameters of the incremental SVD algorithm.

Parameters
[in]save_state_If true the state of the SVD will be written to disk when the object is deleted. If there are multiple time intervals then the state will not be saved as restoring such a state makes no sense.
[in]restore_state_If true the state of the SVD will be restored when the object is created.

Definition at line 173 of file Options.h.


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