22 "singular value decomposition in PODMapping.");
25 "pod_mapping",
"The PODMapping object whose singular triplets should be printed.");
28 "variables",
"The names of the variables whose SVD should be printed.");
36 _variable_names(getParam<
std::vector<VariableName>>(
"variables")),
37 _left_singular_vectors(
38 declareValueByName<
std::map<VariableName,
std::vector<DenseVector<
Real>>>>(
40 _right_singular_vectors(
41 declareValueByName<
std::map<VariableName,
std::vector<DenseVector<
Real>>>>(
43 _singular_values(declareValueByName<
std::map<VariableName,
std::vector<
Real>>>(
61 paramError(
"pod_mapping",
"The given mapping is not a PODMapping!");
65 if (std::find(pod_mapping_variables.begin(), pod_mapping_variables.end(), vname) ==
66 pod_mapping_variables.end())
68 "The SVD of the requested variable " + vname +
69 " is not in the PODMapping object!");
void initialSetup() override
Reporter class which can print Singular Value Decompositions from PODMapping objects.
std::map< VariableName, std::vector< DenseVector< Real > > > & _right_singular_vectors
static InputParameters validParams()
const ReporterMode REPORTER_MODE_ROOT
VariableMappingBase & getMapping(const std::string &name) const
Get the mapping using the parameters of the moose object.
registerMooseObject("StochasticToolsApp", SingularTripletReporter)
static InputParameters validParams()
std::map< VariableName, std::vector< DenseVector< Real > > > & _left_singular_vectors
const std::vector< Real > & singularValues(const VariableName &vname)
Return all of the singular values for a given variable.
const std::vector< DenseVector< Real > > & leftBasis(const VariableName &vname)
Return all of the left basis functions for a given variable.
virtual void buildMapping(const VariableName &vname) override
Abstract function for building mapping for a given variable.
PODMapping * _pod_mapping
Link to the PODMapping object which contains the SVDs.
void paramError(const std::string ¶m, Args... args) const
SingularTripletReporter(const InputParameters ¶meters)
An interface class that helps getting access to Mapping objects.
const std::vector< VariableName > & _variable_names
The names of the variables whose SVD should be printed.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Class which provides a Proper Orthogonal Decomposition (POD)-based mapping between full-order and red...
virtual const std::vector< VariableName > & getVariableNames()
Get the available variable names in this mapping.
std::map< VariableName, std::vector< Real > > & _singular_values
static InputParameters validParams()
const std::vector< DenseVector< Real > > & rightBasis(const VariableName &vname)
Return all of the right basis functions for a given variable.
auto index_range(const T &sizable)