VariableMapping System
Overview
The mapping system is dedicated to holding objects which map high-dimensional solution vectors to lower-dimensional spaces (latent spaces). These objects do not get executed on their own, but only used in other objects which need mapping functionality.
Creating a VariableMapping
A mapping object can be created by inheriting from VariableMappingBase
and overriding the methods in the base class. These methods describe the mapping from high to low dimensional spaces and the corresponding inverse mapping procedures.
Using a Mapping
The VariableMappings block
In an input file, one can create Mapping Objects by specifying them in the [VariableMappings]
block.
Mapping from high- to low-dimensional spaces
High-dimensional data can be mapped to lower-dimensional spaces using MappingReporter. This can either map the fields in a ParallelSolutionStorage or map multiple solution variables in a given nonlinear system. The results are stored in a standard vector format in the reporter data structure.
Inverse mapping from low- to high-dimensional spaces
Low-dimensional data can be mapped to higher-dimensional spaces using InverseMapping. This can either utilize surrogate models to determine the low-dimensional vectors given a specific set of model parameters or take a custom low-dimensional vector and use inverse mapping to populate AuxVariable
s with the reconstructed approximate fields.
MappingInterface
By inheriting from MappingInterface
, classes can easily fetch mapping objects from the object warehouse using the helper functions. Good examples are the MappingReporter and InverseMapping.
Example Input File Syntax
[VariableMappings<<<{"href": "index.html"}>>>]
[pod_mapping]
type = PODMapping<<<{"description": "Class which provides a Proper Orthogonal Decomposition-based mapping between full-order and reduced-order spaces.", "href": "../../source/variablemappings/PODMapping.html"}>>>
solution_storage<<<{"description": "The name of the storage reporter where the snapshots are located."}>>> = parallel_storage
variables<<<{"description": "The names of the variables which need a mapping."}>>> = "v"
num_modes_to_compute<<<{"description": "The number of modes that this object should compute. Modes with 0 eigenvalues are filtered out, so the real number of modes might be lower than this. This is also used for setting the subspace sizes for distributed singular value solves. By default, the subspace used for the SVD is twice as big as the number of requested vectors. For more information see the SLEPc manual. If not specified, only one mode is computed per variable."}>>> = '2'
extra_slepc_options<<<{"description": "Additional options for the singular/eigenvalue solvers in SLEPc."}>>> = "-svd_monitor_all"
[]
[]
(moose/modules/stochastic_tools/test/tests/variablemappings/pod_mapping/pod_mapping_main.i)Available Objects
- Stochastic Tools App
- PODMappingClass which provides a Proper Orthogonal Decomposition-based mapping between full-order and reduced-order spaces.
Available Actions
- Stochastic Tools App
- AddVariableMappingActionAdds Mapping objects from a VariableMappings block.