8 #ifndef _LIBROM_INTERFACE_H_ 9 #define _LIBROM_INTERFACE_H_ 12 #define _ROM_MODE_NONE_ "none" 14 #define _ROM_MODE_TRAIN_ "train" 16 #define _ROM_MODE_PREDICT_ "predict" 19 #define _ROM_MODE_INITIAL_GUESS_ "initial_guess" 22 #define _ROM_COMP_MODE_MONOLITHIC_ "monolithic" 24 #define _ROM_COMP_MODE_COMPONENTWISE_ "component-wise" 30 #include <linalg/Vector.h> 76 define( a_s, a_nsims, a_rank, a_nproc, a_dt );
80 void define(
void*,
int,
int,
int,
double);
85 for (
int i = 0; i <
m_rom.size(); i++)
delete m_rom[i];
87 for (
int i = 0; i <
m_U.size(); i++)
delete m_U[i];
94 inline const std::string&
mode()
const {
return m_mode; }
105 void takeSample(
void* a_s,
const double a_t );
114 void predict(
void* a_s,
const double a_t)
const;
117 void saveROM(
const std::string& a_fname_root=
"")
const;
120 void loadROM(
const std::string& a_fname_root=
"");
126 void copyToHyPar(
const CAROM::Vector&,
void*,
int )
const;
129 void copyToHyPar(
const CAROM::Vector&,
void*,
int,
int )
const;
151 std::vector<CAROM::Vector*>
m_U;
const std::string & mode() const
struct timeval m_train_start
libROMInterface(void *a_s, int a_nsims, int a_rank, int a_nproc, double a_dt)
void takeSample(void *a_s, const double a_t)
void saveROM(const std::string &a_fname_root="") const
struct timeval m_train_end
std::vector< ROMObject * > m_rom
Base class for a libROM object.
struct timeval m_predict_start
struct timeval m_predict_end
void loadROM(const std::string &a_fname_root="")
void copyFromHyPar(std::vector< CAROM::Vector *> &, void *)
std::vector< CAROM::Vector * > m_U
void projectInitialSolution(void *a_s)
double predictWallclockTime() const
Class implementing interface with libROM.
int samplingFrequency() const
std::vector< int > m_ncomps
double trainWallclockTime() const
std::vector< int > m_vec_size
const std::string & componentMode() const
void define(void *, int, int, int, double)
void predict(void *a_s, const double a_t) const
void copyToHyPar(const CAROM::Vector &, void *, int) const
const std::string & type() const