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 );
virtual void load(const std::string &a_fname_root)
std::pair< double, double > Interval
std::vector< CAROM::DMD * > m_dmd
Base class defining a ROM object.
virtual void takeSample(const CAROM::Vector &, const double)
std::vector< Interval > m_intervals
Base class for a libROM object.
bool m_write_snapshot_mat
std::vector< bool > m_dmd_is_trained
virtual const CAROM::Vector *const predict(const double a_t) const
virtual void projectInitialSolution(CAROM::Vector &a_U)
virtual void save(const std::string &a_fname_root) const
ROM object of type DMD (see libROM)
DMDROMObject(const int, const double, const int, const int, const int, const int, const int a_var_idx=-1)