Nektar++
|
A class that contains algorithms for interpolation between pts fields, expansions and different meshes. More...
#include <Interpolator.h>
Public Member Functions | |
Interpolator (LibUtilities::InterpMethod method=LibUtilities::eNoMethod, short int coordId=-1, NekDouble filtWidth=0.0, int maxPts=1000) | |
Constructor of the Interpolator class. More... | |
FIELD_UTILS_EXPORT void | Interpolate (const std::vector< MultiRegions::ExpListSharedPtr > expInField, std::vector< MultiRegions::ExpListSharedPtr > &expOutField, NekDouble def_value=0.0) |
Interpolate from an expansion to an expansion. More... | |
FIELD_UTILS_EXPORT void | Interpolate (const std::vector< MultiRegions::ExpListSharedPtr > expInField, LibUtilities::PtsFieldSharedPtr &ptsOutField, NekDouble def_value=0.0) |
Interpolate from an expansion to a pts field. More... | |
FIELD_UTILS_EXPORT void | Interpolate (const LibUtilities::PtsFieldSharedPtr ptsInField, std::vector< MultiRegions::ExpListSharedPtr > &expOutField) |
Interpolate from a pts field to an expansion. More... | |
FIELD_UTILS_EXPORT void | Interpolate (const LibUtilities::PtsFieldSharedPtr ptsInField, LibUtilities::PtsFieldSharedPtr &ptsOutField) |
Interpolate from a pts field to a pts field. More... | |
![]() | |
Interpolator (InterpMethod method=eNoMethod, short int coordId=-1, NekDouble filtWidth=0.0, int maxPts=1000) | |
Constructor of the Interpolator class. More... | |
void | CalcWeights (const LibUtilities::PtsFieldSharedPtr ptsInField, LibUtilities::PtsFieldSharedPtr &ptsOutField) |
Compute interpolation weights without doing any interpolation. More... | |
void | Interpolate (const LibUtilities::PtsFieldSharedPtr ptsInField, LibUtilities::PtsFieldSharedPtr &ptsOutField) |
Interpolate from a pts field to a pts field. More... | |
int | GetDim () const |
returns the dimension of the Interpolator. Should be higher than the dimensions of the interpolated fields More... | |
NekDouble | GetFiltWidth () const |
Returns the filter width. More... | |
int | GetCoordId () const |
Returns the coordinate id along which the interpolation should be performed. More... | |
InterpMethod | GetInterpMethod () const |
Returns the interpolation method used by this interpolator. More... | |
LibUtilities::PtsFieldSharedPtr | GetInField () const |
Returns the input field. More... | |
LibUtilities::PtsFieldSharedPtr | GetOutField () const |
Returns the output field. More... | |
void | PrintStatistics () |
Returns if the weights have already been computed. More... | |
template<typename FuncPointerT , typename ObjectPointerT > | |
void | SetProgressCallback (FuncPointerT func, ObjectPointerT obj) |
sets a callback funtion which gets called every time the interpolation progresses More... | |
Protected Attributes | |
std::vector< MultiRegions::ExpListSharedPtr > | m_expInField |
input field More... | |
std::vector< MultiRegions::ExpListSharedPtr > | m_expOutField |
output field More... | |
![]() | |
LibUtilities::PtsFieldSharedPtr | m_ptsInField |
input field More... | |
LibUtilities::PtsFieldSharedPtr | m_ptsOutField |
output field More... | |
std::function< void(const int position, const int goal)> | m_progressCallback |
A class that contains algorithms for interpolation between pts fields, expansions and different meshes.
Definition at line 50 of file FieldUtils/Interpolator.h.
|
inline |
Constructor of the Interpolator class.
method | interpolation method, defaults to a sensible value if not set |
coordId | coordinate id along which the interpolation should be performed |
filtWidth | filter width, required by some algorithms such as eGauss |
maxPts | limit number of considered points |
if method is not specified, the best algorithm is chosen autpomatically.
If coordId is not specified, a full 1D/2D/3D interpolation is performed without collapsing any coordinate.
filtWidth must be specified for the eGauss algorithm only.
Definition at line 71 of file FieldUtils/Interpolator.h.
References FIELD_UTILS_EXPORT, and Interpolate().
void Nektar::FieldUtils::Interpolator::Interpolate | ( | const std::vector< MultiRegions::ExpListSharedPtr > | expInField, |
std::vector< MultiRegions::ExpListSharedPtr > & | expOutField, | ||
NekDouble | def_value = 0.0 |
||
) |
Interpolate from an expansion to an expansion.
Interpolate from one expansion to an other.
expInField | input field |
expOutField | output field |
In and output fields must have the same dimension and number of fields. Weights are currently not stored for later use. The interpolation is performed by evaluating the expInField at the quadrature points of expOutField, so only eNoMethod is supported. If both expansions use the same mesh, use LibUtilities/Foundations/Interp.h instead.
Definition at line 63 of file FieldUtils/Interpolator.cpp.
References ASSERTL0, Nektar::LibUtilities::eNoMethod, and Nektar::NekConstants::kGeomFactorsTol.
Referenced by Nektar::FieldUtils::ProcessInterpPoints::InterpolateFieldToPts(), Nektar::FieldUtils::ProcessInterpPtsToPts::InterpolatePtsToPts(), Interpolator(), Nektar::FieldUtils::ProcessInterpField::Process(), and Nektar::FieldUtils::ProcessInterpPointDataToFld::Process().
void Nektar::FieldUtils::Interpolator::Interpolate | ( | const std::vector< MultiRegions::ExpListSharedPtr > | expInField, |
LibUtilities::PtsFieldSharedPtr & | ptsOutField, | ||
NekDouble | def_value = 0.0 |
||
) |
Interpolate from an expansion to a pts field.
expInField | input field |
ptsOutField | output field |
In and output fields must have the same dimension and number of fields. Weights are currently not stored for later use. The interpolation is performed by evaluating the expInField at the points of ptsOutField, so only eNoMethod is supported.
Definition at line 174 of file FieldUtils/Interpolator.cpp.
References ASSERTL0, Nektar::LibUtilities::eNoMethod, and Nektar::NekConstants::kGeomFactorsTol.
void Nektar::FieldUtils::Interpolator::Interpolate | ( | const LibUtilities::PtsFieldSharedPtr | ptsInField, |
std::vector< MultiRegions::ExpListSharedPtr > & | expOutField | ||
) |
Interpolate from a pts field to an expansion.
ptsInField | input field |
expOutField | output field |
In and output fields must have the same dimension and number of fields.
Definition at line 266 of file FieldUtils/Interpolator.cpp.
References ASSERTL0.
void Nektar::FieldUtils::Interpolator::Interpolate | ( | const LibUtilities::PtsFieldSharedPtr | ptsInField, |
LibUtilities::PtsFieldSharedPtr & | ptsOutField | ||
) |
Interpolate from a pts field to a pts field.
Definition at line 323 of file FieldUtils/Interpolator.cpp.
|
protected |
input field
Definition at line 103 of file FieldUtils/Interpolator.h.
|
protected |
output field
Definition at line 105 of file FieldUtils/Interpolator.h.