template<int D, Entity_kind on_what, typename SourceMeshType, typename TargetMeshType, typename SourceStateType, typename TargetStateType, typename T, template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
class Portage::Interpolate_2ndOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >
Interpolate_2ndOrder does a 2nd order interpolation of scalars.
- Template Parameters
-
D | spatial dimension of problem |
on_what | The type of entity-based data we wish to interpolate; e.g. does it live on nodes, cells, edges, etc. |
SourceMeshType | Mesh wrapper class used to access source mesh info |
TargetMeshType | Mesh wrapper class used to access target mesh info |
SourceStateType | State manager used to access source data. |
InterfaceReconstructorType | Class for reconstructing material interfaces |
MatPoly_Splitter | Class used for splitting material polygons |
MatPoly_Clipper | Class used for clipping material polygons |
CoordSys | What coordinate system are we operating in? |
[1] Margolin, L.G. and Shashkov, M.J. "Second-order sign-preserving
conservative interpolation (remapping) on general grids." Journal of Computational Physics, v 184, n 1, pp. 266-298, 2003.
[2] Dukowicz, J.K. and Kodis, J.W. "Accurate Conservative Remapping
(Rezoning) for Arbitrary Lagrangian-Eulerian Computations," SIAM Journal on Scientific and Statistical Computing, Vol. 8, No. 3, pp. 305-321, 1987.
template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
Portage::Interpolate_2ndOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::Interpolate_2ndOrder |
( |
SourceMeshType const & |
source_mesh, |
|
|
TargetMeshType const & |
target_mesh, |
|
|
SourceStateType const & |
source_state, |
|
|
NumericTolerances_t |
num_tols |
|
) |
| |
|
inline |
Constructor without interface reconstructor.
- Parameters
-
[in] | source_mesh | mesh wrapper used to query source mesh info. |
[in] | target_mesh | mesh wrapper used to query target mesh info. |
[in] | source_state | state-manager wrapper used to query field info. |
template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
Portage::Interpolate_2ndOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::~Interpolate_2ndOrder |
( |
| ) |
|
|
default |
template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
double Portage::Interpolate_2ndOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::operator() |
( |
int const |
targetCellID, |
|
|
std::vector< Weights_t > const & |
sources_and_weights |
|
) |
| const |
|
inline |
Functor to do the actual interpolate calculation.
- Parameters
-
targetCellID | the target cell index. |
sources_and_weights | a list of source cells and intersection weights. Each element of the weights vector is a moment of the source data over the target entity. For first-order interpolation, only the first element (or zero'th moment) of the weights vector (the volume of intersection) is used. Source entities may be repeated in the list if the intersection of a target cell and a source cell consists of two or more disjoint pieces. |
- Returns
- the interpolated value.
- Todo:
cleanup the datatype for sources_and_weights - it is somewhat confusing.
must remove assumption that field is scalar.
template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
Interpolate_2ndOrder& Portage::Interpolate_2ndOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::operator= |
( |
const Interpolate_2ndOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys > & |
other | ) |
|
|
delete |
Assignment operator (disabled).
- Parameters
-
[in] | other | the interpolator to copy |
- Returns
- current interpolator reference
template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
void Portage::Interpolate_2ndOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::set_interpolation_variable |
( |
std::string const & |
variable_name, |
|
|
const Portage::vector< Vector< D >> * |
gradient_field = nullptr |
|
) |
| |
|
inline |
Set the name of the interpolation variable and the gradient field.
- Parameters
-
[in] | variable_name | the variable name |
[in] | gradient_field | the gradient field |
template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
void Portage::Interpolate_2ndOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::set_material |
( |
int |
m | ) |
|
|
inline |
Set the material we are operating on.
- Parameters
-
template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void, class CoordSys = Wonton::DefaultCoordSys>
constexpr int Portage::Interpolate_2ndOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::order = 2 |
|
static |