16 #include "libmesh/petsc_vector.h" 17 #include "libmesh/petsc_matrix.h" 35 virtual void buildMapping(
const VariableName & vname) = 0;
44 virtual void map(
const VariableName & vname,
45 const DenseVector<Real> & full_order_vector,
46 std::vector<Real> & reduced_order_vector)
const = 0;
55 virtual void map(
const VariableName & vname,
56 const unsigned int global_sample_i,
57 std::vector<Real> & reduced_order_vector)
const = 0;
66 virtual void inverse_map(
const VariableName & vname,
67 const std::vector<Real> & reduced_order_vector,
68 DenseVector<Real> & full_order_vector)
const = 0;
VariableMappingBase(const InputParameters ¶meters)
virtual ~VariableMappingBase()
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 t...
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 DenseVect...
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.
virtual void buildMapping(const VariableName &vname)=0
Abstract function for building mapping for a given variable.
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 ve...
virtual const std::vector< VariableName > & getVariableNames()
Get the available variable names in this mapping.
const InputParameters & parameters() const
const std::vector< VariableName > & _variable_names
Storage for the names of the variables this mapping can handle.
This is an abstract base class for objects that provide mapping between a full-order and a latent spa...
static InputParameters validParams()
An interface class which manages the model data save and load functionalities from moose objects (suc...