33 const std::string& interpl)
37 if (interpl ==
"CONSTANT")
39 else if (interpl ==
"LINEAR")
41 else if (interpl ==
"QUADRATIC")
76 int x = 0, y = 0, z = 0;
85 y = (xy - x) /
nr_m[0];
90 if (x < 0 || y < 0 || z < 0 || !
isInside(x, y, z))
96 double &scaleFactor)
const
119 double &scaleFactor)
const
121 int idx = 0, idy = 0, idz = 0;
132 for (
int i = 0; i < 3; i++)
140 throw OpalException(
"IrregularDomain::constantInterpolation()",
141 "No constant interpolation method Implemented!");
148 throw OpalException(
"IrregularDomain::linearInterpolation()",
149 "No linear interpolation method Implemented!");
156 throw OpalException(
"IrregularDomain::quadraticInterpolation()",
157 "No quadratic interpolation method Implemented!");
IntVector_t nr_m
number of mesh points in each direction
virtual int coordAccess(int idx) const =0
void getBoundaryStencil(int x, int y, int z, StencilValue_t &value, double &scaleFactor) const
virtual int getNumXY() const
int interpolationMethod_m
interpolation type
int getIdx(int x, int y, int z) const
Conversion from (x,y,z) to index on the 3D grid.
virtual void resizeMesh(Vector_t &origin, Vector_t &hr, const Vector_t &, const Vector_t &, double)
virtual void quadraticInterpolation(int x, int y, int z, StencilValue_t &value, double &scaleFactor) const
void getNeighbours(int x, int y, int z, StencilIndex_t &index) const
virtual bool isInside(int x, int y, int z) const =0
virtual void constantInterpolation(int x, int y, int z, StencilValue_t &value, double &scaleFactor) const
different interpolation methods for boundary points
IrregularDomain(const IntVector_t &nr, const Vector_t &hr, const std::string &interpl)
virtual void linearInterpolation(int x, int y, int z, StencilValue_t &value, double &scaleFactor) const
virtual int indexAccess(int x, int y, int z) const =0
virtual void getCoord(int idx, int &x, int &y, int &z) const
Conversion from a 3D index to (x,y,z)
The base class for all OPAL exceptions.