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