Portage::Interpolate_1stOrder< D, Entity_kind::CELL, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys > Class Template Reference

Interpolate_1stOrder specialization for cells. More...

#include <interpolate_1st_order.h>

Public Member Functions

 Interpolate_1stOrder (SourceMeshType const &source_mesh, TargetMeshType const &target_mesh, SourceStateType const &source_state, NumericTolerances_t num_tols, const Parts *const parts=nullptr)
 Constructor. More...
 
 ~Interpolate_1stOrder ()=default
 Copy constructor (disabled) More...
 
void set_material (int m)
 Set the material we are operating on. More...
 
void set_interpolation_variable (std::string const &interp_var_name, Portage::vector< Wonton::Vector< D >> *gradients=nullptr)
 Set the variable name to be interpolated. More...
 
operator() (int const targetCellID, std::vector< Weights_t > const &sources_and_weights) const
 Functor to do the actual interpolation. More...
 

Static Public Attributes

static constexpr int order = 1
 

Detailed Description

template<int D, typename SourceMeshType, typename TargetMeshType, typename SourceStateType, typename TargetStateType, typename T, template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter, class Matpoly_Clipper, class CoordSys>
class Portage::Interpolate_1stOrder< D, Entity_kind::CELL, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >

Interpolate_1stOrder specialization for cells.

Constructor & Destructor Documentation

◆ Interpolate_1stOrder()

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
Portage::Interpolate_1stOrder< D, Entity_kind::CELL, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::Interpolate_1stOrder ( SourceMeshType const &  source_mesh,
TargetMeshType const &  target_mesh,
SourceStateType const &  source_state,
NumericTolerances_t  num_tols,
const Parts *const  parts = nullptr 
)
inline

Constructor.

Parameters
[in]source_meshThe input mesh.
[in]target_meshThe output mesh.
[in]source_stateThe state manager for data on the input mesh.
[in]interp_var_nameThe string name of the variable to interpolate.
[in]sources_and_weightsVector of source entities and their weights for each target entity

◆ ~Interpolate_1stOrder()

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
Portage::Interpolate_1stOrder< D, Entity_kind::CELL, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::~Interpolate_1stOrder ( )
default

Copy constructor (disabled)

Assignment operator (disabled) Destructor

Member Function Documentation

◆ operator()()

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
T Portage::Interpolate_1stOrder< D, Entity_kind::CELL, 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 interpolation.

Parameters
[in]sources_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 interpolation, 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.

◆ set_interpolation_variable()

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
void Portage::Interpolate_1stOrder< D, Entity_kind::CELL, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::set_interpolation_variable ( std::string const &  interp_var_name,
Portage::vector< Wonton::Vector< D >> *  gradients = nullptr 
)
inline

Set the variable name to be interpolated.

◆ set_material()

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

Set the material we are operating on.

Member Data Documentation

◆ order

template<int D, typename SourceMeshType , typename TargetMeshType , typename SourceStateType , typename TargetStateType , typename T , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
constexpr int Portage::Interpolate_1stOrder< D, Entity_kind::CELL, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >::order = 1
static

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