This is an abstract base class for objects that provide mapping between a full-order and a latent space. More...
#include <VariableMappingBase.h>
Public Types | |
typedef DataFileName | DataFileParameterType |
Public Member Functions | |
VariableMappingBase (const InputParameters ¶meters) | |
virtual | ~VariableMappingBase () |
virtual void | buildMapping (const VariableName &vname)=0 |
Abstract function for building mapping for a given variable. More... | |
virtual void | map (const VariableName &vname, const DenseVector< Real > &full_order_vector, std::vector< Real > &reduced_order_vector) const =0 |
Map a full-order solution vector (in DenseVector format) for a given variable into a reduced-order vector (in a standard vector format) More... | |
virtual void | map (const VariableName &vname, const unsigned int global_sample_i, std::vector< Real > &reduced_order_vector) const =0 |
Map a full-order solution vector with a given global sample number for a given variable into a reduced-order vector (in a standard vector format) More... | |
virtual void | inverse_map (const VariableName &vname, const std::vector< Real > &reduced_order_vector, DenseVector< Real > &full_order_vector) const =0 |
Map a reduced-order vector (from the latent space) back to a full-order solution vector (in DenseVector format) for a given variable. More... | |
virtual const std::vector< VariableName > & | getVariableNames () |
Get the available variable names in this mapping. More... | |
virtual bool | enabled () const |
std::shared_ptr< MooseObject > | getSharedPtr () |
std::shared_ptr< const MooseObject > | getSharedPtr () const |
MooseApp & | getMooseApp () const |
const std::string & | type () const |
virtual const std::string & | name () const |
std::string | typeAndName () const |
std::string | errorPrefix (const std::string &error_type) const |
void | callMooseError (std::string msg, const bool with_prefix) const |
MooseObjectParameterName | uniqueParameterName (const std::string ¶meter_name) const |
const InputParameters & | parameters () const |
MooseObjectName | uniqueName () const |
const T & | getParam (const std::string &name) const |
std::vector< std::pair< T1, T2 > > | getParam (const std::string ¶m1, const std::string ¶m2) const |
const T * | queryParam (const std::string &name) const |
const T & | getRenamedParam (const std::string &old_name, const std::string &new_name) const |
T | getCheckedPointerParam (const std::string &name, const std::string &error_string="") const |
bool | isParamValid (const std::string &name) const |
bool | isParamSetByUser (const std::string &nm) const |
void | paramError (const std::string ¶m, Args... args) const |
void | paramWarning (const std::string ¶m, Args... args) const |
void | paramInfo (const std::string ¶m, Args... args) const |
void | connectControllableParams (const std::string ¶meter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const |
void | mooseError (Args &&... args) const |
void | mooseErrorNonPrefixed (Args &&... args) const |
void | mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const |
void | mooseWarning (Args &&... args) const |
void | mooseWarningNonPrefixed (Args &&... args) const |
void | mooseDeprecated (Args &&... args) const |
void | mooseInfo (Args &&... args) const |
std::string | getDataFileName (const std::string ¶m) const |
std::string | getDataFileNameByName (const std::string &relative_path) const |
std::string | getDataFilePath (const std::string &relative_path) const |
const Parallel::Communicator & | comm () const |
processor_id_type | n_processors () const |
processor_id_type | processor_id () const |
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 () |
Public Attributes | |
const ConsoleStream | _console |
Protected Member Functions | |
void | checkIfReadyToUse (const VariableName &libmesh_dbg_var(vname)) const |
Check if we have a mapping for the variable and if it is ready to be used. More... | |
Protected Attributes | |
const std::vector< VariableName > & | _variable_names |
Storage for the names of the variables this mapping can handle. More... | |
std::map< VariableName, bool > & | _mapping_ready_to_use |
Bool to decide if we already have the mapping built or not to make sure it is not computed multiple times unless the user requests it. More... | |
const bool & | _enabled |
MooseApp & | _app |
const std::string | _type |
const std::string | _name |
const InputParameters & | _pars |
Factory & | _factory |
ActionFactory & | _action_factory |
const Parallel::Communicator & | _communicator |
This is an abstract base class for objects that provide mapping between a full-order and a latent space.
Definition at line 23 of file VariableMappingBase.h.
VariableMappingBase::VariableMappingBase | ( | const InputParameters & | parameters | ) |
Definition at line 25 of file VariableMappingBase.C.
|
inlinevirtual |
Definition at line 29 of file VariableMappingBase.h.
|
pure virtual |
Abstract function for building mapping for a given variable.
vname | The name of the variable |
Implemented in PODMapping.
Referenced by MappingReporter::mapParallelStorageData().
|
protected |
Check if we have a mapping for the variable and if it is ready to be used.
Definition at line 37 of file VariableMappingBase.C.
Referenced by PODMapping::inverse_map(), PODMapping::leftBasis(), PODMapping::leftBasisFunction(), PODMapping::map(), PODMapping::rightBasis(), PODMapping::rightBasisFunction(), and PODMapping::singularValues().
|
inherited |
Declare model data for loading from file as well as restart.
Definition at line 78 of file RestartableModelInterface.h.
|
inherited |
Retrieve model data from the interface.
Definition at line 85 of file RestartableModelInterface.h.
|
inherited |
Get the associated filename.
Definition at line 33 of file RestartableModelInterface.C.
|
inlinevirtual |
Get the available variable names in this mapping.
Definition at line 71 of file VariableMappingBase.h.
Referenced by SingularTripletReporter::initialSetup(), and InverseMapping::initialSetup().
|
inherited |
Check if we need to load model data (if the filename parameter is used)
Definition at line 39 of file RestartableModelInterface.C.
|
pure virtual |
Map a reduced-order vector (from the latent space) back to a full-order solution vector (in DenseVector format) for a given variable.
vname | The name of the variable |
reduced_order_vector | The reduced-order vector |
full_order_vector | The full order vector to fill |
Implemented in PODMapping.
Referenced by InverseMapping::execute().
|
pure virtual |
Map a full-order solution vector (in DenseVector format) for a given variable into a reduced-order vector (in a standard vector format)
vname | The name of the variable |
full_order_vector | The full-order vector |
reduced_order_vector | The reduced-order vector to fill |
Implemented in PODMapping.
Referenced by MappingReporter::mapParallelStorageData(), and MappingReporter::mapVariableData().
|
pure virtual |
Map a full-order solution vector with a given global sample number for a given variable into a reduced-order vector (in a standard vector format)
vname | The name of the variable |
global_sample_i | The global sample index |
reduced_order_vector | The reduced-order vector to fill |
Implemented in PODMapping.
|
inlineinherited |
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 VariableMappingBase.C.
Referenced by PODMapping::validParams().
|
protected |
Bool to decide if we already have the mapping built or not to make sure it is not computed multiple times unless the user requests it.
Definition at line 82 of file VariableMappingBase.h.
Referenced by PODMapping::buildMapping(), checkIfReadyToUse(), and PODMapping::PODMapping().
|
protected |
Storage for the names of the variables this mapping can handle.
Definition at line 78 of file VariableMappingBase.h.
Referenced by PODMapping::buildMapping(), getVariableNames(), PODMapping::inverse_map(), PODMapping::leftBasisFunction(), PODMapping::PODMapping(), and PODMapping::rightBasisFunction().