An interface class which manages the model data save and load functionalities from moose objects (such as surrogates, mappings, etc.) in the stochastic tools module. More...
#include <RestartableModelInterface.h>
Public Member Functions | |
RestartableModelInterface (const MooseObject &object, const bool read_only, const std::string &meta_data_name) | |
const std::string & | modelMetaDataName () const |
Accessor for the name of the model meta data. More... | |
const FileName & | getModelDataFileName () const |
Get the associated filename. More... | |
bool | hasModelData () const |
Check if we need to load model data (if the filename parameter is used) More... | |
template<typename T , typename... Args> | |
T & | declareModelData (const std::string &data_name, Args &&... args) |
Declare model data for loading from file as well as restart. More... | |
template<typename T , typename... Args> | |
const T & | getModelData (const std::string &data_name, Args &&... args) const |
Retrieve model data from the interface. More... | |
Static Public Member Functions | |
static InputParameters | validParams () |
Private Attributes | |
const MooseObject & | _model_object |
Reference to the MooseObject that uses this interface. More... | |
const std::string | _model_meta_data_name |
The model meta data name. More... | |
PublicRestartable | _model_restartable |
Member for interfacing with the framework's restartable system. More... | |
An interface class which manages the model data save and load functionalities from moose objects (such as surrogates, mappings, etc.) in the stochastic tools module.
Definition at line 19 of file RestartableModelInterface.h.
RestartableModelInterface::RestartableModelInterface | ( | const MooseObject & | object, |
const bool | read_only, | ||
const std::string & | meta_data_name | ||
) |
Definition at line 21 of file RestartableModelInterface.C.
T & RestartableModelInterface::declareModelData | ( | const std::string & | data_name, |
Args &&... | args | ||
) |
Declare model data for loading from file as well as restart.
Definition at line 78 of file RestartableModelInterface.h.
const T & RestartableModelInterface::getModelData | ( | const std::string & | data_name, |
Args &&... | args | ||
) | const |
Retrieve model data from the interface.
Definition at line 85 of file RestartableModelInterface.h.
const FileName & RestartableModelInterface::getModelDataFileName | ( | ) | const |
Get the associated filename.
Definition at line 33 of file RestartableModelInterface.C.
bool RestartableModelInterface::hasModelData | ( | ) | const |
Check if we need to load model data (if the filename parameter is used)
Definition at line 39 of file RestartableModelInterface.C.
|
inline |
Accessor for the name of the model meta data.
Definition at line 47 of file RestartableModelInterface.h.
Referenced by SurrogateTrainerOutput::output(), and MappingOutput::output().
|
static |
Definition at line 13 of file RestartableModelInterface.C.
Referenced by SurrogateModel::validParams(), VariableMappingBase::validParams(), and SurrogateTrainerBase::validParams().
|
private |
The model meta data name.
This is used to store the restartable data within the RestartableDataMap.
Definition at line 61 of file RestartableModelInterface.h.
Referenced by modelMetaDataName(), and RestartableModelInterface().
|
private |
Reference to the MooseObject that uses this interface.
Definition at line 57 of file RestartableModelInterface.h.
Referenced by getModelDataFileName(), hasModelData(), and RestartableModelInterface().
|
private |
Member for interfacing with the framework's restartable system.
We need this because we would like to have the capability to handle the model data separately from the other data members used for checkpointing.
Definition at line 68 of file RestartableModelInterface.h.
Referenced by declareModelData(), and getModelData().