Portage::Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys > Class Template Reference

second-order interpolate class specialization for scalar fields on nodes. More...

#include <interpolate_2nd_order.h>

Public Member Functions

 Interpolate_2ndOrder (SourceMeshType const &source_mesh, TargetMeshType const &target_mesh, SourceStateType const &source_state, NumericTolerances_t num_tols)
 Constructor without interface reconstructor. More...
 
Interpolate_2ndOrderoperator= (const Interpolate_2ndOrder &)=delete
 Assignment operator (disabled). More...
 
 ~Interpolate_2ndOrder ()=default
 Destructor. More...
 
void set_material (int m)
 Set the material we are operating on. More...
 
void set_interpolation_variable (std::string const variable_name, Portage::vector< Vector< D >> *gradient_field=nullptr)
 Set the name of the interpolation variable and the gradient field. More...
 
double operator() (int node_id, std::vector< Weights_t > const &sources_and_weights) const
 Functor to compute the interpolation of node values. More...
 

Static Public Attributes

static constexpr int order = 2
 

Detailed Description

template<int D, typename SourceMeshType, typename TargetMeshType, typename SourceStateType, typename TargetStateType, template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter, class Matpoly_Clipper, class CoordSys>
class Portage::Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >

second-order interpolate class specialization for scalar fields on nodes.

Template Parameters
Dspatial dimension of problem
SourceMeshTypemesh wrapper class used to access source mesh info
TargetMeshTypemesh wrapper class used to access target mesh info
SourceStateTypestate manager used to access source data.
InterfaceReconstructorTypeclass for material interfaces reconstruction
MatPoly_Splitterclass used for splitting material polygons
MatPoly_Clipperclass used for clipping material polygons
CoordSyswhat coordinate system are we operating in?

Constructor & Destructor Documentation

◆ Interpolate_2ndOrder()

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
Portage::Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, 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_meshmesh wrapper used to query source mesh info.
[in]target_meshmesh wrapper used to query target mesh info.
[in]source_statestate-manager wrapper used to query field info.
[in]num_tolsnumerical tolerances.

◆ ~Interpolate_2ndOrder()

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
Portage::Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::~Interpolate_2ndOrder ( )
default

Destructor.

Member Function Documentation

◆ operator()()

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
double Portage::Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::operator() ( int  node_id,
std::vector< Weights_t > const &  sources_and_weights 
) const
inline

Functor to compute the interpolation of node values.

Parameters
[in]node_idtarget node index
[in]sources_and_weightslist of source mesh entities and corresponding weight vectors. 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 (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:
: must remove assumption that field is scalar.

◆ operator=()

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
Interpolate_2ndOrder& Portage::Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::operator= ( const Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys > &  )
delete

Assignment operator (disabled).

Parameters
[in]otherthe interpolator to copy
Returns
current interpolator reference

◆ set_interpolation_variable()

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
void Portage::Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::set_interpolation_variable ( std::string const  variable_name,
Portage::vector< Vector< D >> *  gradient_field = nullptr 
)
inline

Set the name of the interpolation variable and the gradient field.

Parameters
[in]variable_namethe variable name
[in]gradient_fieldthe gradient field to use

◆ set_material()

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
void Portage::Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::set_material ( int  m)
inline

Set the material we are operating on.

Parameters
[in]mthe material ID.

Member Data Documentation

◆ order

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
constexpr int Portage::Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::order = 2
static

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