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 T expInField, T &expOutField, NekDouble def_value=0., NekDouble tolerance=NekConstants::kFindDistanceMin) |
Interpolate from an expansion to an expansion. More... | |
FIELD_UTILS_EXPORT void | Interpolate (const T expInField, LibUtilities::PtsFieldSharedPtr &ptsOutField, NekDouble def_value=0., NekDouble tolerance=1.E-5) |
Interpolate from an expansion to a pts field. More... | |
FIELD_UTILS_EXPORT void | Interpolate (const LibUtilities::PtsFieldSharedPtr ptsInField, T &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... | |
Public Member Functions inherited from Nektar::LibUtilities::Interpolator | |
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, bool reuseTree=false) |
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 | |
T | m_expInField |
input field More... | |
T | m_expOutField |
output field More... | |
Protected Attributes inherited from Nektar::LibUtilities::Interpolator | |
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 48 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 69 of file FieldUtils/Interpolator.h.
void Nektar::FieldUtils::Interpolator< T >::Interpolate | ( | const LibUtilities::PtsFieldSharedPtr | ptsInField, |
LibUtilities::PtsFieldSharedPtr & | ptsOutField | ||
) |
Interpolate from a pts field to a pts field.
Definition at line 345 of file FieldUtils/Interpolator.cpp.
References Nektar::LibUtilities::Interpolator::Interpolate().
void Nektar::FieldUtils::Interpolator< T >::Interpolate | ( | const LibUtilities::PtsFieldSharedPtr | ptsInField, |
T & | 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 279 of file FieldUtils/Interpolator.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, Nektar::MultiRegions::e2DH1D, Nektar::MultiRegions::e3DH1D, Nektar::MultiRegions::e3DH2D, and Nektar::LibUtilities::Interpolator::Interpolate().
void Nektar::FieldUtils::Interpolator< T >::Interpolate | ( | const T | expInField, |
LibUtilities::PtsFieldSharedPtr & | ptsOutField, | ||
NekDouble | def_value = 0. , |
||
NekDouble | tolerance = 1.E-5 |
||
) |
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 138 of file FieldUtils/Interpolator.cpp.
References ASSERTL0, Nektar::MultiRegions::e2DH1D, Nektar::MultiRegions::e3DH1D, Nektar::MultiRegions::e3DH2D, Nektar::LibUtilities::eNoMethod, and Nektar::NekConstants::kGeomFactorsTol.
void Nektar::FieldUtils::Interpolator< T >::Interpolate | ( | const T | expInField, |
T & | expOutField, | ||
NekDouble | def_value = 0. , |
||
NekDouble | tolerance = NekConstants::kFindDistanceMin |
||
) |
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 62 of file FieldUtils/Interpolator.cpp.
References ASSERTL0, and Nektar::LibUtilities::eNoMethod.
Referenced by Nektar::SolverUtils::SessionFunction::EvaluatePts(), Nektar::FieldUtils::ProcessInterpPoints::InterpolateFieldToPts(), Nektar::FieldUtils::ProcessInterpPtsToPts::InterpolatePtsToPts(), Nektar::FieldUtils::ProcessInterpPointDataToFld::v_Process(), and Nektar::FieldUtils::ProcessWallNormalData::v_Process().
|
protected |
input field
Definition at line 97 of file FieldUtils/Interpolator.h.
|
protected |
output field
Definition at line 99 of file FieldUtils/Interpolator.h.