7#ifndef STRUCTUREDINTERPOLATION_H
8#define STRUCTUREDINTERPOLATION_H
20 const MPI_Comm structuredCommunicator);
98 static constexpr MInt m_pyramidPoints[72] = {0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0,
99 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1,
100 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0};
This class is a ScratchSpace.
MBool m_donorIsCellCentered
void loadDonorVariable(MString varName)
Loads a Q file.
void trilinearInterpolation(MFloat *, MInt, MInt, MFloat *, MInt)
void prepareInterpolationField(MInt *noReceiverCells, MFloat **receiverCoordinates)
Prepares interpolation for field For a given 3D coordinate field the method computes the transformed ...
void computeInterpolationCoefficients(MFloat *, MInt)
Computes trilinear interpolation coefficients.
MInt * m_donorBlockOffsets
void nearestNeighbourInterpolation(MInt, MInt, MFloat *)
Nearest neighbour interpolation.
MFloat getInterpolatedVariable(MInt, MInt)
Trilinear interpolation for single point.
~StructuredInterpolation()
MInt cellIndex(MInt i, MInt j, MInt k, MInt solverId)
MFloat interpolateVariableZonal(MFloat *, MInt)
MFloat ** m_transformedReceiverPoints
MInt ic(MInt, MInt, MInt)
MFloat ** m_donorVariables
void prepareInterpolation(MInt, MFloat **, MInt *)
Prepares interpolation neighbours and coefficients For a given number of points the methods computes ...
void interpolateVariables(MFloat **)
MInt getBlockId(MInt cellId)
void transformPoint(MInt hexOrigin, MFloat intPoint[3], MFloat transformedPoint[3])
Transforms point from physical to computational space.
void loadDonorGrid()
Loads a grid file.
void crossProduct(MFloat result[3], MFloat vec1[3], MFloat vec2[3])
MInt ** m_noDonorPointsDir
MInt ** m_noDonorCellsDir
void computeCellCentreCoordinates(MInt *, MFloatScratchSpace &, MInt, MInt)
Computes cell centered coordinates.
MBool approx(const MFloat &, const MFloat &, const MFloat)
MBool m_hasInterpolationPartnerDomain
MFloat * m_globalDonorDistanceMin
MInt * m_hasInterpolationPartnersZonalGlobal
std::vector< Point< 3 > > m_donorPoints
void interpolateField(MString, MFloat *)
interpolates a field interpolates a given varName and varF
static constexpr MInt m_pyramidPoints[72]
void buildDonorTree()
Builds a kd-tree Creates a kd-tree from the predefined grid-data in m_donorCoordinates.
MInt findSurroundingHexahedron(MFloat intPoint[3], MInt centerCellId, MInt stencil)
Finds surrounding hexahedron for point For a given cellId it finds out which of the 8 eight surroundi...
void interpolateAtPoint(MFloat *intPoint)
interpolates variables at point For a given 3D coordinate the method interpolates from the donor grid
MFloat ** m_receiverVariables
MFloat scalarProduct(MFloat vec1[3], MFloat vec2[3])
MBool * m_hasInterpolationPartners
MFloat ** m_donorCoordinates
MFloat ** m_interpolationCoefficients
MBool m_isFieldInterpolation
MFloat getInterpolatedVariableZonal(MFloat *, MInt)
KDtree< 3 > * m_donorTree
const MPI_Comm m_StructuredComm
MInt getCellIdfromCell(MInt origin, MInt incI, MInt incJ, MInt incK, MInt solverId)
MInt * m_hasInterpolationPartnersZonal
void trilinearInterpolation(MFloat *, MInt, MFloat *, MInt)
void prepareZonalInterpolation(MInt, MFloat **, MInt *, MBool)
computes the interpolation coefficients Interpolates all variables with precomputed interpolation coe...
std::basic_string< char > MString