Portage::Interpolate_3rdOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType > Class Template Reference

Interpolate_3rdOrder does a 3rd order interpolation of scalars. More...

#include <interpolate_3rd_order.h>

Public Member Functions

 Interpolate_3rdOrder (SourceMeshType const &source_mesh, TargetMeshType const &target_mesh, SourceStateType const &source_state, NumericTolerances_t num_tols)
 Constructor. More...
 
Interpolate_3rdOrderoperator= (const Interpolate_3rdOrder &)=delete
 Copy constructor (disabled) More...
 
 ~Interpolate_3rdOrder ()=default
 Destructor. More...
 
void set_interpolation_variable (std::string const &interp_var_name, Limiter_type limiter_type=NOLIMITER, Boundary_Limiter_type boundary_limiter_type=BND_NOLIMITER, Portage::vector< Vector< D >> *gradients=nullptr)
 Set the name of the interpolation variable and the limiter type. More...
 
double operator() (int const targetCellID, std::vector< Weights_t > const &sources_and_weights) const
 Functor to do the actual interpolate calculation. More...
 

Static Public Attributes

static constexpr int order = 3
 

Detailed Description

template<int D, Entity_kind on_what, typename SourceMeshType, typename TargetMeshType, typename SourceStateType, typename TargetStateType = SourceStateType>
class Portage::Interpolate_3rdOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType >

Interpolate_3rdOrder does a 3rd order interpolation of scalars.

Template Parameters
MeshTypeThe type of the mesh wrapper used to access mesh info
SourceStateTypeThe type of the state manager used to access data.
OnWhatTypeThe type of entity-based data we wish to interpolate; e.g. does it live on nodes, cells, edges, etc.

[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.

Todo:
Template on variable type (YES)

Constructor & Destructor Documentation

◆ Interpolate_3rdOrder()

template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType = SourceStateType>
Portage::Interpolate_3rdOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType >::Interpolate_3rdOrder ( SourceMeshType const &  source_mesh,
TargetMeshType const &  target_mesh,
SourceStateType const &  source_state,
NumericTolerances_t  num_tols 
)
inline

Constructor.

Parameters
[in]source_meshThe mesh wrapper used to query source mesh info
[in]target_meshThe mesh wrapper used to query target mesh info
[in]source_stateThe state-manager wrapper used to query field info
[in]sources_and_weightsVector of source entities and their weights for each target entity

◆ ~Interpolate_3rdOrder()

template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType = SourceStateType>
Portage::Interpolate_3rdOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType >::~Interpolate_3rdOrder ( )
default

Destructor.

Member Function Documentation

◆ operator()()

template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType = SourceStateType>
double Portage::Interpolate_3rdOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType >::operator() ( int const  targetCellID,
std::vector< Weights_t > const &  sources_and_weights 
) const
inline

Functor to do the actual interpolate calculation.

Parameters
[in]cells_and_weightsA pair of two vectors sources_and_weights.first() is the vector of source entity indices in the source mesh that will contribute to the current target mesh entity. sources_and_weights.second() is the vector of vector weights for each of the source mesh entities in sources_and_weights.first(). Each element of the weights vector is a moment of the source data over the target entity; for first order interpolate, only the first element (or zero'th moment) of the weights vector (i.e. the volume of intersection) is used. Source entities may be repeated in the list if the intersection of a target entity and a source entity consists of two or more disjoint pieces
[in]targetCellIDThe index of the target cell.
Todo:

Cleanup the datatype for sources_and_weights - it is somewhat confusing.

must remove assumption that field is scalar

◆ operator=()

template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType = SourceStateType>
Interpolate_3rdOrder& Portage::Interpolate_3rdOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType >::operator= ( const Interpolate_3rdOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType > &  )
delete

Copy constructor (disabled)

Assignment operator (disabled)

◆ set_interpolation_variable()

template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType = SourceStateType>
void Portage::Interpolate_3rdOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType >::set_interpolation_variable ( std::string const &  interp_var_name,
Limiter_type  limiter_type = NOLIMITER,
Boundary_Limiter_type  boundary_limiter_type = BND_NOLIMITER,
Portage::vector< Vector< D >> *  gradients = nullptr 
)
inline

Set the name of the interpolation variable and the limiter type.

Member Data Documentation

◆ order

template<int D, Entity_kind on_what, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType = SourceStateType>
constexpr int Portage::Interpolate_3rdOrder< D, on_what, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType >::order = 3
static

The documentation for this class was generated from the following file: