MMDriver provides the API to mapping multi-material data from one mesh to another. More...
#include <mmdriver.h>
Public Member Functions | |
MMDriver (SourceMesh_Wrapper const &sourceMesh, SourceState_Wrapper const &sourceState, TargetMesh_Wrapper const &targetMesh, TargetState_Wrapper &targetState) | |
Constructor for running the interpolation driver. More... | |
MMDriver (const MMDriver &)=delete | |
Copy constructor (disabled) More... | |
MMDriver & | operator= (const MMDriver &)=delete |
Assignment operator (disabled) More... | |
~MMDriver ()=default | |
Destructor. More... | |
MMDriver (MMDriver &&) noexcept=default | |
Enable move semantics. More... | |
void | set_remap_var_names (std::vector< std::string > const &remap_var_names) |
Specify the names of the variables to be interpolated. More... | |
void | set_remap_var_names (std::vector< std::string > const &source_remap_var_names, std::vector< std::string > const &target_remap_var_names) |
Specify the names of the variables to be interpolated. More... | |
void | set_limiter (Limiter_type limiter) |
set limiter for all variables More... | |
void | set_bnd_limiter (Boundary_Limiter_type bnd_limiter) |
set boundary limiter for all variables More... | |
void | set_limiter (std::string const &source_var_name, Limiter_type limiter) |
set limiter for a variable More... | |
void | set_bnd_limiter (std::string const &source_var_name, Boundary_Limiter_type bnd_limiter) |
set boundary limiter for a variable More... | |
void | set_partial_fixup_type (Partial_fixup_type fixup_type) |
set repair method in partially filled cells for all variables More... | |
void | set_partial_fixup_type (std::string const &target_var_name, Partial_fixup_type fixup_type) |
set repair method in partially filled cells for all variables More... | |
void | set_empty_fixup_type (Empty_fixup_type fixup_type) |
set repair method in empty cells for all variables More... | |
void | set_empty_fixup_type (std::string const &target_var_name, Empty_fixup_type fixup_type) |
set repair method in empty cells for all variables More... | |
void | set_max_fixup_iter (int maxiter) |
void | set_num_tols (const double min_absolute_distance, const double min_absolute_volume) |
Set core numerical tolerances. More... | |
void | set_num_tols (const NumericTolerances_t &num_tols) |
Set all numerical tolerances. More... | |
template<typename T > | |
void | set_remap_var_bounds (std::string target_var_name, T lower_bound, T upper_bound) |
set the bounds of variable to be remapped on target More... | |
template<typename T > | |
void | set_conservation_tolerance (std::string target_var_name, T conservation_tol) |
set conservation tolerance of variable to be remapped on target More... | |
std::vector< std::string > | source_remap_var_names () const |
Get the names of the variables to be remapped from the source mesh. More... | |
std::vector< std::string > | target_remap_var_names () const |
Get the names of the variables to be remapped to the target mesh. More... | |
unsigned int | dim () const |
Get the dimensionality of the meshes. More... | |
template<class SourceMesh_Wrapper2 , class SourceState_Wrapper2 > | |
int | cell_remap (SourceMesh_Wrapper2 const &source_mesh2, SourceState_Wrapper2 const &source_state2, std::vector< std::string > const &src_meshvar_names, std::vector< std::string > const &trg_meshvar_names, std::vector< std::string > const &src_matvar_names, std::vector< std::string > const &trg_matvar_names, Wonton::Executor_type const *executor=nullptr) |
remap for a given set of MESH and MATERIAL variables on CELLS More... | |
template<class SourceMesh_Wrapper2 , class SourceState_Wrapper2 > | |
int | node_remap (SourceMesh_Wrapper2 const &source_mesh2, SourceState_Wrapper2 const &source_state2, std::vector< std::string > const &src_meshvar_names, std::vector< std::string > const &trg_meshvar_names, Wonton::Executor_type const *executor=nullptr) |
remap for a given set of MESH variables on NODES More... | |
template<class SourceState_Wrapper2 , Entity_kind onwhat> | |
void | compute_bounds (SourceState_Wrapper2 const &source_state2, std::vector< std::string > const &src_meshvar_names, std::vector< std::string > const &trg_meshvar_names, Wonton::Executor_type const *executor=nullptr) |
Compute mismatch fixup bounds dynamically. More... | |
int | run (Wonton::Executor_type const *executor=nullptr, std::string *errmsg=nullptr) |
Execute the remapping process. More... | |
Detailed Description
template<template< int, Entity_kind, class, class > class Search, template< Entity_kind, class, class, class, template< class, int, class, class > class, class, class > class Intersect, template< int, Entity_kind, class, class, class, class, class, template< class, int, class, class > class, class, class, class=Wonton::DefaultCoordSys > class Interpolate, int D, class SourceMesh_Wrapper, class SourceState_Wrapper, class TargetMesh_Wrapper = SourceMesh_Wrapper, class TargetState_Wrapper = SourceState_Wrapper, template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void>
class Portage::MMDriver< Search, Intersect, Interpolate, D, SourceMesh_Wrapper, SourceState_Wrapper, TargetMesh_Wrapper, TargetState_Wrapper, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper >
MMDriver provides the API to mapping multi-material data from one mesh to another.
- Template Parameters
-
Search A search method that takes the dimension, source mesh class and target mesh class as template parameters Intersect A polyhedron-polyhedron intersection class that takes the source and taget mesh classes as template parameters Interpolate An interpolation class that takes the source and target mesh classes, the source state class (that stores source field values), the kind of entity the interpolation is on and the dimension of the problem as template parameters SourceMesh_Wrapper A lightweight wrapper to a specific input mesh implementation that provides certain functionality. SourceState_Wrapper A lightweight wrapper to a specific input state manager implementation that provides certain functionality. TargetMesh_Wrapper A lightweight wrapper to a specific target mesh implementation that provides certain functionality. TargetState_Wrapper A lightweight wrapper to a specific target state manager implementation that provides certain functionality. InterfaceReconstructorType An interface reconstruction class that takes the raw interface reconstruction method, the dimension of the problem and the source mesh class as template parameters
Constructor & Destructor Documentation
◆ MMDriver() [1/3]
|
inline |
Constructor for running the interpolation driver.
- Parameters
-
[in] sourceMesh A SourceMesh_Wrapper
to the source mesh.[in] sourceState A SourceState_Wrapperfor
the data that lives on the source mesh.[in] targetMesh A TargetMesh_Wrapper
to the target mesh.[in,out] targetState A TargetState_Wrapper
for the data that will be mapped to the target mesh.
◆ MMDriver() [2/3]
|
delete |
Copy constructor (disabled)
◆ ~MMDriver()
|
default |
Destructor.
◆ MMDriver() [3/3]
|
defaultnoexcept |
Enable move semantics.
Member Function Documentation
◆ cell_remap()
int Portage::MMDriver< Search, Intersect, Interpolate, D, SourceMesh_Wrapper, SourceState_Wrapper, TargetMesh_Wrapper, TargetState_Wrapper, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper >::cell_remap | ( | SourceMesh_Wrapper2 const & | source_mesh2, |
SourceState_Wrapper2 const & | source_state2, | ||
std::vector< std::string > const & | src_meshvar_names, | ||
std::vector< std::string > const & | trg_meshvar_names, | ||
std::vector< std::string > const & | src_matvar_names, | ||
std::vector< std::string > const & | trg_matvar_names, | ||
Wonton::Executor_type const * | executor = nullptr |
||
) |
remap for a given set of MESH and MATERIAL variables on CELLS
- Template Parameters
-
SourceMesh_Wrapper2 May be the mesh wrapper sent into MMDriver or the Flat_Mesh_Wrapper created for redistribution SourceState_Wrapper2 May be the state wrapper sent into MMDriver or the Flat_State_Wrapper created for redistribution entity_kind Kind of entity that variables live on
- Parameters
-
source_meshvar_names names of remap variables on source mesh target_meshvar_names names of remap variables on target mesh source_matvar_names names of remap variables on materials of source mesh target_matvar_names names of remap variables on materials of target mesh executor pointer to Serial Executor (generally not needed but introduced for future proofing)
- Returns
- status of remap (1 if successful, 0 if not)
◆ compute_bounds()
|
inline |
Compute mismatch fixup bounds dynamically.
- Template Parameters
-
SourceState_Wrapper2 May be the state wrapper sent into MMDriver or the Flat_State_Wrapper created for redistribution entity_kind Kind of entity that variables live on
- Parameters
-
source_state2 source state wrapper source_meshvar_names names of remap variables on source mesh target_meshvar_names names of remap variables on target mesh sources_and_weights mesh-mesh intersection weights executor pointer to Executor
◆ dim()
|
inline |
Get the dimensionality of the meshes.
- Returns
- The dimensionality of the meshes.
◆ node_remap()
int Portage::MMDriver< Search, Intersect, Interpolate, D, SourceMesh_Wrapper, SourceState_Wrapper, TargetMesh_Wrapper, TargetState_Wrapper, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper >::node_remap | ( | SourceMesh_Wrapper2 const & | source_mesh2, |
SourceState_Wrapper2 const & | source_state2, | ||
std::vector< std::string > const & | src_meshvar_names, | ||
std::vector< std::string > const & | trg_meshvar_names, | ||
Wonton::Executor_type const * | executor = nullptr |
||
) |
remap for a given set of MESH variables on NODES
- Template Parameters
-
SourceMesh_Wrapper2 May be the mesh wrapper sent into MMDriver or the Flat_Mesh_Wrapper created for redistribution SourceState_Wrapper2 May be the state wrapper sent into MMDriver or the Flat_State_Wrapper created for redistribution entity_kind Kind of entity that variables live on
- Parameters
-
source_meshvar_names names of remap variables on source mesh target_meshvar_names names of remap variables on target mesh executor pointer to Serial Executor (generally not needed but introduced for future proofing)
- Returns
- status of remap (1 if successful, 0 if not)
◆ operator=()
|
delete |
Assignment operator (disabled)
◆ run()
|
inline |
Execute the remapping process.
- Returns
- status of remap (1 if successful, 0 if not)
◆ set_bnd_limiter() [1/2]
|
inline |
set boundary limiter for all variables
- Parameters
-
bnd_limiter Boundary limiter to use for second order reconstruction (BND_NOLIMITER BND_ZERO_GRADIENT, or BND_BARTH_JESPERSEN))
◆ set_bnd_limiter() [2/2]
|
inline |
set boundary limiter for a variable
- Parameters
-
target_var_name Source mesh variable whose gradient is to be limited on the boundary bnd_limiter Boundary limiter to use for second order reconstruction (BND_NOLIMITER, BND_ZERO_GRADIENT, or BND_BARTH_JESPERSEN))
◆ set_conservation_tolerance()
|
inline |
set conservation tolerance of variable to be remapped on target
- Parameters
-
target_var_name Name of variable in target mesh to limit
◆ set_empty_fixup_type() [1/2]
|
inline |
set repair method in empty cells for all variables
- Parameters
-
fixup_type Can be Empty_fixup_type::LEAVE_EMPTY, Empty_fixup_type::EXTRAPOLATE
◆ set_empty_fixup_type() [2/2]
|
inline |
set repair method in empty cells for all variables
- Parameters
-
target_var_name Target mesh variable to set fixup option for fixup_type Can be Empty_fixup_type::LEAVE_EMPTY, Empty_fixup_type::EXTRAPOLATE
◆ set_limiter() [1/2]
|
inline |
set limiter for all variables
- Parameters
-
limiter Limiter to use for second order reconstruction (NOLIMITER or BARTH_JESPERSEN)
◆ set_limiter() [2/2]
|
inline |
set limiter for a variable
- Parameters
-
target_var_name Source mesh variable whose gradient is to be limited limiter Limiter to use for second order reconstruction (NOLIMITER or BARTH_JESPERSEN)
◆ set_max_fixup_iter()
|
inline |
◆ set_num_tols() [1/2]
|
inline |
Set core numerical tolerances.
◆ set_num_tols() [2/2]
|
inline |
Set all numerical tolerances.
◆ set_partial_fixup_type() [1/2]
|
inline |
set repair method in partially filled cells for all variables
- Parameters
-
fixup_type Can be Partial_fixup_type::CONSTANT, Partial_fixup_type::LOCALLY_CONSERVATIVE, Partial_fixup_type::SHIFTED_CONSERVATIVE
◆ set_partial_fixup_type() [2/2]
|
inline |
set repair method in partially filled cells for all variables
- Parameters
-
target_var_name Target mesh variable to set fixup option for fixup_type Can be Partial_fixup_type::CONSTANT, Partial_fixup_type::LOCALLY_CONSERVATIVE, Partial_fixup_type::SHIFTED_CONSERVATIVE
◆ set_remap_var_bounds()
|
inline |
set the bounds of variable to be remapped on target
- Parameters
-
target_var_name Name of variable in target mesh to limit
◆ set_remap_var_names() [1/2]
|
inline |
Specify the names of the variables to be interpolated.
- Parameters
-
[in] remap_var_names A list of variable names of the variables to interpolate from the source mesh to the target mesh. This variable must exist in both meshes' state manager
◆ set_remap_var_names() [2/2]
|
inline |
Specify the names of the variables to be interpolated.
- Parameters
-
[in] source_remap_var_names A list of the variables names of the variables to interpolate from the source mesh. [in] target_remap_var_names A list of the variables names of the variables to interpolate to the target mesh.
◆ source_remap_var_names()
|
inline |
Get the names of the variables to be remapped from the source mesh.
- Returns
- A vector of variable names to be remapped.
◆ target_remap_var_names()
|
inline |
Get the names of the variables to be remapped to the target mesh.
- Returns
- A vector of variable names to be remapped.
The documentation for this class was generated from the following file:
- /home/portage/portage/portage/driver/mmdriver.h