28 #ifndef _CLASSIC_FIELDS_THREEDGRID_HH_
29 #define _CLASSIC_FIELDS_THREEDGRID_HH_
86 int numberOfXCoords,
int numberOfYCoords,
int numberOfZCoords);
101 int ySize,
const double *
y,
102 int zSize,
const double *
z);
112 std::vector<double>
y,
113 std::vector<double>
z);
122 inline double&
x(
const int& i) {
return x_m[i-1];}
128 inline double&
y(
const int& j) {
return y_m[j-1];}
134 inline double&
z(
const int& k) {
return z_m[k-1];}
140 inline const double&
x(
const int& i)
const {
return x_m[i-1];}
146 inline const double&
y(
const int& j)
const {
return y_m[j-1];}
152 inline const double&
z(
const int& j)
const {
return z_m[j-1];}
155 inline int xSize()
const {
return static_cast<int>(
x_m.size());}
158 inline int ySize()
const {
return static_cast<int>(
y_m.size());}
161 inline int zSize()
const {
return static_cast<int>(
z_m.size());}
164 std::vector<double>
xVector() {
return std::vector<double>(
x_m);}
167 std::vector<double>
yVector() {
return std::vector<double>(
y_m);}
170 std::vector<double>
zVector() {
return std::vector<double>(
z_m);}
186 inline void xLowerBound(
const double&
x,
int& xIndex)
const;
193 inline void yLowerBound(
const double&
y,
int& yIndex)
const;
200 inline void zLowerBound(
const double&
z,
int& zIndex)
const;
207 inline void lowerBound(
const double&
x,
int& xIndex,
208 const double&
y,
int& yIndex,
209 const double&
z,
int& zIndex)
const;
216 inline void lowerBound(
const double&
x,
const double&
y,
const double&
z,
220 inline double minX()
const;
223 inline double maxX()
const;
226 inline double minY()
const;
229 inline double maxY()
const;
232 inline double minZ()
const;
235 inline double maxZ()
const;
238 inline void setX(
int nXCoords,
double *
x);
241 inline void setY(
int nYCoords,
double *
y);
244 inline void setZ(
int nZCoords,
double *
z);
308 int difference)
const;
310 int difference)
const;
359 double *
x =
new double[
x_m.size()];
360 for (
unsigned int i = 0; i <
x_m.size(); i++)
366 double *
y =
new double[
y_m.size()];
367 for (
unsigned int i = 0; i <
y_m.size(); i++)
373 double *
z =
new double[
z_m.size()];
374 for (
unsigned int i = 0; i <
z_m.size(); i++)
380 const double& y,
int& yIndex,
381 const double& z,
int& zIndex)
const {
447 x_m = std::vector<double>(
x,
x+nXCoords);
451 y_m = std::vector<double>(
y,
y+nYCoords);
455 z_m = std::vector<double>(
z,
z+nZCoords);
PETE_TUTree< FnFloor, typename T::PETE_Expr_t > floor(const PETE_Expr< T > &l)
Base class for meshing routines.
std::vector< int > getState() const
const double & x(const int &i) const
Mesh::Iterator begin() const
void yLowerBound(const double &y, int &yIndex) const
std::vector< double > xVector()
friend bool operator>(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
void setY(int nYCoords, double *y)
std::vector< double > zVector()
void setZ(int nZCoords, double *z)
void setConstantSpacing()
friend bool operator<(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
std::vector< double > y_m
virtual void getPosition(const Mesh::Iterator &it, double *position) const
friend Mesh::Iterator & operator--(Mesh::Iterator &lhs)
friend Mesh::Iterator & operator++(Mesh::Iterator &lhs)
static void vectorLowerBound(std::vector< double > vec, double x, int &index)
Mesh::Iterator end() const
std::vector< double > x_m
virtual Mesh::Iterator & subEquals(Mesh::Iterator &lhs, int difference) const
void remove(VectorMap *map)
friend bool operator!=(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
std::vector< double > z_m
std::vector< double > yVector()
void zLowerBound(const double &z, int &zIndex) const
bool getConstantSpacing() const
void xLowerBound(const double &x, int &xIndex) const
friend bool operator==(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
virtual Mesh::Iterator & subOne(Mesh::Iterator &lhs) const
friend bool operator<=(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
friend Mesh::Iterator operator--(Mesh::Iterator &lhs, int)
virtual bool isGreater(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs) const
void setX(int nXCoords, double *x)
const double & y(const int &j) const
int getPositionDimension() const
const double & z(const int &j) const
virtual Mesh::Iterator & addOne(Mesh::Iterator &lhs) const
virtual Mesh::Iterator & addEquals(Mesh::Iterator &lhs, int difference) const
int toInteger(const Mesh::Iterator &lhs) const
void lowerBound(const double &x, int &xIndex, const double &y, int &yIndex, const double &z, int &zIndex) const
friend bool operator>=(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
std::vector< VectorMap * > maps_m
Mesh::Iterator getNearest(const double *position) const
friend Mesh::Iterator operator++(Mesh::Iterator &lhs, int)