14 #ifndef included_StaticSVD_h
15 #define included_StaticSVD_h
18 #include "linalg/Options.h"
19 #include "linalg/scalapack_wrapper.h"
54 bool add_without_increase =
false)
override;
64 std::shared_ptr<const Matrix>
75 std::shared_ptr<const Matrix>
85 std::shared_ptr<const Vector>
93 std::shared_ptr<const Matrix>
242 bool d_preserve_snapshot;
double d_singular_value_tol
The tolerance for singular values below which to drop vectors.
std::shared_ptr< const Matrix > getSpatialBasis() override
Returns the basis vectors for the current time interval as a Matrix.
int d_rank
The rank of the process this object belongs to.
int d_nprow
The number of processor rows in the grid.
std::shared_ptr< const Matrix > getTemporalBasis() override
Returns the temporal basis vectors for the current time interval as a Matrix.
virtual void computeSVD()
Gathers samples from all other processors to form complete sample of system and computes the SVD.
int d_npcol
The number of processor columns in the grid.
void delete_factorizer()
Delete the factorizer from ScaLAPACK.
void get_global_info()
Get the system's total row dimension and where my rows sit in the matrix.
void delete_samples()
Delete the samples from ScaLAPACK.
void broadcast_sample(const double *u_in)
Broadcast the sample to all processors.
bool d_basis_is_current
Flag to indicate if the basis vectors for the current time interval are up to date.
std::vector< int > d_istarts
The starting row (0-based) of the matrix that each process owns. Stored to avoid an MPI operation to ...
int d_total_dim
The total dimension of the system (row dimension)
std::shared_ptr< const Vector > getSingularValues() override
Returns the singular values for the current time interval.
int d_max_basis_dimension
The max number of basis vectors to return.
virtual bool takeSample(double *u_in, bool add_without_increase=false) override
Collect the new sample, u_in at the supplied time.
std::unique_ptr< SLPK_Matrix > d_samples
Current samples of the system.
std::unique_ptr< SVDManager > d_factorizer
Factorization manager object used to compute the SVD.
int d_blocksize
The block size used internally for computing the SVD.
bool isBasisCurrent()
Checks if the basis vectors are computed from the current snapshot.
int d_num_procs
The number of processors being run on.
std::vector< int > d_dims
The number of rows that each process owns. Stored to avoid an MPI operation to get this operation eve...
std::shared_ptr< const Matrix > getSnapshotMatrix() override
Returns the snapshot matrix for the current time interval.