8 #ifndef _ROM_OBJECT_DMD_H_
9 #define _ROM_OBJECT_DMD_H_
12 #define _ROM_TYPE_DMD_ "DMD"
17 #include <linalg/Matrix.h>
48 const int a_var_idx = -1);
53 for (
int i = 0; i <
m_dmd.size(); i++)
delete m_dmd[i];
62 if (
m_dmd.size() == 0) {
64 printf(
"ERROR in DMDROMObject::projectInitialSolution() - m_dmd is a vector of size 0.\n");
69 m_dmd[0]->projectInitialCondition( &a_U );
70 for (
int i = 1; i <
m_dmd.size(); i++) {
77 virtual void takeSample(
const CAROM::Vector&,
const double );
84 const CAROM::Vector*
const predict(
const double a_t )
const
86 for (
int i = 0; i <
m_dmd.size(); i++) {
89 return m_dmd[i]->predict(a_t);
92 printf(
"ERROR in DMDROMObject::predict(): m_dmd is of size zero or interval not found!");
97 virtual void save(
const std::string& a_fname_root )
const;
100 virtual void load(
const std::string& a_fname_root );
std::vector< bool > m_dmd_is_trained
virtual void save(const std::string &a_fname_root) const
virtual void load(const std::string &a_fname_root)
Base class for a libROM object.
Base class defining a ROM object.
bool m_write_snapshot_mat
virtual void takeSample(const CAROM::Vector &, const double)
virtual void projectInitialSolution(CAROM::Vector &a_U)
std::pair< double, double > Interval
virtual const CAROM::Vector *const predict(const double a_t) const
std::vector< Interval > m_intervals
ROM object of type DMD (see libROM)
std::vector< CAROM::DMD * > m_dmd
DMDROMObject(const int, const double, const int, const int, const int, const int, const int a_var_idx=-1)