|
| UberDriver (SourceMesh const &source_mesh, SourceState const &source_state, TargetMesh const &target_mesh, TargetState &target_state, std::vector< std::string > const &source_vars_to_remap, Wonton::Executor_type const *executor=nullptr, std::string *errmsg=nullptr) |
| Constructor for the remap driver. More...
|
|
| UberDriver (SourceMesh const &source_mesh, SourceState const &source_state, TargetMesh const &target_mesh, TargetState &target_state, Wonton::Executor_type const *executor=nullptr, std::string *errmsg=nullptr) |
| Constructor for the remap driver. More...
|
|
| UberDriver (const UberDriver &)=delete |
| Copy constructor (disabled) More...
|
|
UberDriver & | operator= (const UberDriver &)=delete |
| Assignment operator (disabled) More...
|
|
| UberDriver (UberDriver &&) noexcept=default |
| Enable move semantics. More...
|
|
| ~UberDriver ()=default |
| Destructor. More...
|
|
bool | is_distributed_run (Wonton::Executor_type const *executor=nullptr) |
| Is this a distributed (multi-rank) run? More...
|
|
bool | source_needs_redistribution (Wonton::Executor_type const *executor=nullptr) |
|
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> |
void | compute_interpolation_weights () |
| Compute interpolation weights in advance of actual interpolation of variables. More...
|
|
void | set_num_tols (const double min_absolute_distance, const double min_absolute_volume) |
| Set numerical tolerances for small distances and volumes in core driver. More...
|
|
void | set_num_tols (const NumericTolerances_t &num_tols) |
| set numerical tolerances in core driver More...
|
|
template<Entity_kind ONWHAT, template< int, Entity_kind, class, class > class Search> |
Portage::vector< std::vector< int > > | search () |
| search for candidate source entities whose control volumes (cells, dual cells) overlap the control volumes of target cells More...
|
|
template<Entity_kind ONWHAT, template< Entity_kind, class, class, class, template< class, int, class, class > class, class, class > class Intersect> |
Portage::vector< std::vector< Portage::Weights_t > > | intersect_meshes (Portage::vector< std::vector< int >> const &candidates) |
| intersect target control volumes with source control volumes More...
|
|
template<template< Entity_kind, class, class, class, template< class, int, class, class > class, class, class > class Intersect> |
std::vector< Portage::vector< std::vector< Portage::Weights_t > > > | intersect_materials (Portage::vector< std::vector< int >> const &candidates) |
|
template<typename T = double, Entity_kind ONWHAT, template< int, Entity_kind, class, class, class, class, class, template< class, int, class, class > class, class, class, class > class Interpolate> |
void | interpolate (std::string srcvarname, T lower_bound, T upper_bound, Limiter_type limiter=DEFAULT_LIMITER, Boundary_Limiter_type bnd_limiter=DEFAULT_BND_LIMITER, Partial_fixup_type partial_fixup_type=DEFAULT_PARTIAL_FIXUP_TYPE, Empty_fixup_type empty_fixup_type=DEFAULT_EMPTY_FIXUP_TYPE, double conservation_tol=DEFAULT_NUMERIC_TOLERANCES< D >.relative_conservation_eps, int max_fixup_iter=DEFAULT_NUMERIC_TOLERANCES< D >.max_num_fixup_iter) |
|
template<typename T = double, Entity_kind ONWHAT, template< int, Entity_kind, class, class, class, class, class, template< class, int, class, class > class, class, class, class > class Interpolate> |
void | interpolate (std::string srcvarname, std::string trgvarname, T lower_bound, T upper_bound, Limiter_type limiter=DEFAULT_LIMITER, Boundary_Limiter_type bnd_limiter=DEFAULT_BND_LIMITER, Partial_fixup_type partial_fixup_type=DEFAULT_PARTIAL_FIXUP_TYPE, Empty_fixup_type empty_fixup_type=DEFAULT_EMPTY_FIXUP_TYPE, double conservation_tol=DEFAULT_NUMERIC_TOLERANCES< D >.relative_conservation_eps, int max_fixup_iter=DEFAULT_NUMERIC_TOLERANCES< D >.max_num_fixup_iter) |
|
template<typename T = double, Entity_kind ONWHAT, template< int, Entity_kind, class, class, class, class, class, template< class, int, class, class > class, class, class, class > class Interpolate> |
void | interpolate_mesh_var (std::string srcvarname, std::string trgvarname, Portage::vector< std::vector< Weights_t >> const &sources_and_weights_in, T lower_bound, T upper_bound, Limiter_type limiter, Boundary_Limiter_type bnd_limiter, Partial_fixup_type partial_fixup_type, Empty_fixup_type empty_fixup_type, double conservation_tol, int max_fixup_iter) |
|
template<typename T = double, template< int, Entity_kind, class, class, class, class, class, template< class, int, class, class > class, class, class, class > class Interpolate> |
void | interpolate_mat_var (std::string srcvarname, std::string trgvarname, std::vector< Portage::vector< std::vector< Weights_t >>> const &sources_and_weights_by_mat_in, T lower_bound, T upper_bound, Limiter_type limiter, Boundary_Limiter_type bnd_limiter, Partial_fixup_type partial_fixup_type, Empty_fixup_type empty_fixup_type, double conservation_tol, int max_fixup_iter) |
|
template<int D, class SourceMesh, class SourceState, class TargetMesh = SourceMesh, class TargetState = SourceState, template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
class Portage::UberDriver< D, SourceMesh, SourceState, TargetMesh, TargetState, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >
UberDriver provides the API to mapping multi-material data from one mesh to another in a general way.
- Template Parameters
-
SourceMesh | A lightweight wrapper to a specific input mesh implementation that provides certain functionality. |
SourceState | A lightweight wrapper to a specific input state manager implementation that provides certain functionality. |
TargetMesh | A lightweight wrapper to a specific target mesh implementation that provides certain functionality. |
TargetState | 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 |
Matpoly_Splitter | A polygon/polyhedron splitting class (returns both pieces of the polygon) |
Matpoly_Clipper | A polygon/polyhedron clipping class (returns only the piece below/behind the clipping plane) |
CoordinateSystem | |
template<int D, class SourceMesh , class SourceState , class TargetMesh = SourceMesh, class TargetState = SourceState, template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
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>
void Portage::UberDriver< D, SourceMesh, SourceState, TargetMesh, TargetState, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::compute_interpolation_weights |
( |
| ) |
|
|
inline |
Compute interpolation weights in advance of actual interpolation of variables.
- 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 |
template<int D, class SourceMesh , class SourceState , class TargetMesh = SourceMesh, class TargetState = SourceState, template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
template<typename T = double, Entity_kind ONWHAT, template< int, Entity_kind, class, class, class, class, class, template< class, int, class, class > class, class, class, class > class Interpolate>
void Portage::UberDriver< D, SourceMesh, SourceState, TargetMesh, TargetState, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::interpolate |
( |
std::string |
srcvarname, |
|
|
T |
lower_bound, |
|
|
T |
upper_bound, |
|
|
Limiter_type |
limiter = DEFAULT_LIMITER , |
|
|
Boundary_Limiter_type |
bnd_limiter = DEFAULT_BND_LIMITER , |
|
|
Partial_fixup_type |
partial_fixup_type = DEFAULT_PARTIAL_FIXUP_TYPE , |
|
|
Empty_fixup_type |
empty_fixup_type = DEFAULT_EMPTY_FIXUP_TYPE , |
|
|
double |
conservation_tol = DEFAULT_NUMERIC_TOLERANCES<D>.relative_conservation_eps , |
|
|
int |
max_fixup_iter = DEFAULT_NUMERIC_TOLERANCES<D>.max_num_fixup_iter |
|
) |
| |
|
inline |
Interpolate a mesh variable of type T residing on entity kind ONWHAT using previously computed intersection weights (same variable name on source and target)
- Template Parameters
-
T | type of variable being remapped (default double) - underlying interpolator must be able to handle this type |
ONWHAT | Entity kind on which variable resides |
Interpolate | Interpolate functor to do the actual interpolation |
- Parameters
-
[in] | srcvarname | Variable name on source and target meshes |
[in] | lower_bound | Lower bound for variable |
[in] | upper_bound | Upper bound for variable |
[in] | limiter | Limiter to use for second order reconstruction |
[in] | bnd_limiter | Boundary limiter to use for second order reconstruction |
[in] | partial_fixup_type | Method to populate fields on partially filled target entities (cells or dual cells) |
[in] | empty_fixup_type | Method to populate fields on empty target entities (cells or dual cells) |
[in] | conservation_tol | Tolerance to which source and target integral quantities are to be matched |
[in] | max_fixup_iter | Max number of iterations for global repair |
See support/portage.h for options on limiter, partial_fixup_type and empty_fixup_type
template<int D, class SourceMesh , class SourceState , class TargetMesh = SourceMesh, class TargetState = SourceState, template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
template<typename T = double, Entity_kind ONWHAT, template< int, Entity_kind, class, class, class, class, class, template< class, int, class, class > class, class, class, class > class Interpolate>
void Portage::UberDriver< D, SourceMesh, SourceState, TargetMesh, TargetState, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::interpolate |
( |
std::string |
srcvarname, |
|
|
std::string |
trgvarname, |
|
|
T |
lower_bound, |
|
|
T |
upper_bound, |
|
|
Limiter_type |
limiter = DEFAULT_LIMITER , |
|
|
Boundary_Limiter_type |
bnd_limiter = DEFAULT_BND_LIMITER , |
|
|
Partial_fixup_type |
partial_fixup_type = DEFAULT_PARTIAL_FIXUP_TYPE , |
|
|
Empty_fixup_type |
empty_fixup_type = DEFAULT_EMPTY_FIXUP_TYPE , |
|
|
double |
conservation_tol = DEFAULT_NUMERIC_TOLERANCES<D>.relative_conservation_eps , |
|
|
int |
max_fixup_iter = DEFAULT_NUMERIC_TOLERANCES<D>.max_num_fixup_iter |
|
) |
| |
|
inline |
Interpolate a mesh variable of type T residing on entity kind ONWHAT using previously computed intersection weights (different variable name on source and target)
- Template Parameters
-
T | type of variable being remapped (default double) - underlying interpolator must be able to handle this type |
- Parameters
-
[in] | srcvarname | Variable name on source mesh |
[in] | trgvarname | Variable name on target mesh |
[in] | lower_bound | Lower bound for variable |
[in] | upper_bound | Upper bound for variable |
[in] | limiter | Limiter to use for second order reconstruction |
[in] | bnd_limiter | Boundary limiter to use for second order reconstruction |
[in] | partial_fixup_type | Method to populate fields on partially filled target entities (cells or dual cells) |
[in] | empty_fixup_type | Method to populate fields on empty target entities (cells or dual cells) |
[in] | conservation_tol | Tolerance to which source and target integral quantities are to be matched |
[in] | max_fixup_iter | Max number of iterations for global repair |
See support/portage.h for options on limiter, partial_fixup_type and empty_fixup_type
template<int D, class SourceMesh , class SourceState , class TargetMesh = SourceMesh, class TargetState = SourceState, template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
template<typename T = double, template< int, Entity_kind, class, class, class, class, class, template< class, int, class, class > class, class, class, class > class Interpolate>
void Portage::UberDriver< D, SourceMesh, SourceState, TargetMesh, TargetState, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::interpolate_mat_var |
( |
std::string |
srcvarname, |
|
|
std::string |
trgvarname, |
|
|
std::vector< Portage::vector< std::vector< Weights_t >>> const & |
sources_and_weights_by_mat_in, |
|
|
T |
lower_bound, |
|
|
T |
upper_bound, |
|
|
Limiter_type |
limiter, |
|
|
Boundary_Limiter_type |
bnd_limiter, |
|
|
Partial_fixup_type |
partial_fixup_type, |
|
|
Empty_fixup_type |
empty_fixup_type, |
|
|
double |
conservation_tol, |
|
|
int |
max_fixup_iter |
|
) |
| |
|
inline |
Interpolate a (multi-)material variable of type T residing on CELLs
- Parameters
-
[in] | srcvarname | Variable name on source mesh |
[in] | trgvarname | Variable name on target mesh |
[in] | lower_bound | Lower bound for variable |
[in] | upper_bound | Upper bound for variable |
[in] | limiter | Limiter to use for second order reconstruction |
[in] | bnd_limiter | Boundary limiter to use for second order reconstruction |
[in] | partial_fixup_type | Method to populate fields on partially filled target entities (cells or dual cells) |
[in] | empty_fixup_type | Method to populate fields on empty target entities (cells or dual cells) |
[in] | conservation_tol | Tolerance to which source and target integral quantities are to be matched |
[in] | max_fixup_iter | Max number of iterations for global repair |
See support/portage.h for options on limiter, partial_fixup_type and empty_fixup_type
Since this call explicitly takes intersection weights we don't have to check if intersection step is complete
template<int D, class SourceMesh , class SourceState , class TargetMesh = SourceMesh, class TargetState = SourceState, template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
template<typename T = double, Entity_kind ONWHAT, template< int, Entity_kind, class, class, class, class, class, template< class, int, class, class > class, class, class, class > class Interpolate>
void Portage::UberDriver< D, SourceMesh, SourceState, TargetMesh, TargetState, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::interpolate_mesh_var |
( |
std::string |
srcvarname, |
|
|
std::string |
trgvarname, |
|
|
Portage::vector< std::vector< Weights_t >> const & |
sources_and_weights_in, |
|
|
T |
lower_bound, |
|
|
T |
upper_bound, |
|
|
Limiter_type |
limiter, |
|
|
Boundary_Limiter_type |
bnd_limiter, |
|
|
Partial_fixup_type |
partial_fixup_type, |
|
|
Empty_fixup_type |
empty_fixup_type, |
|
|
double |
conservation_tol, |
|
|
int |
max_fixup_iter |
|
) |
| |
|
inline |
Interpolate a mesh variable of type T residing on entity kind ONWHAT using previously computed intersection weights
- Template Parameters
-
T | type of variable |
ONWHAT | Entity_kind that field resides on |
Interpolate | Functor for doing the interpolate from mesh to mesh |
- Parameters
-
[in] | srcvarname | Variable name on source mesh |
[in] | trgvarname | Variable name on target mesh |
[in] | lower_bound | Lower bound for variable |
[in] | upper_bound | Upper bound for variable |
[in] | limiter | Limiter to use for second order reconstruction |
[in] | bnd_limiter | Boundary limiter to use for second order reconstruction |
[in] | partial_fixup_type | Method to populate fields on partially filled target entities (cells or dual cells) |
[in] | empty_fixup_type | Method to populate fields on empty target entities (cells or dual cells) |
[in] | conservation_tol | Tolerance to which source and target integral quantities are to be matched |
[in] | max_fixup_iter | Max number of iterations for global repair |
See support/portage.h for options on limiter, partial_fixup_type and empty_fixup_type
Since this call explicitly takes intersection weights we don't have to check if intersection step is complete