28 #ifndef _CLASSIC_FIELDS_THREEDGRID_HH_
29 #define _CLASSIC_FIELDS_THREEDGRID_HH_
37 namespace interpolation {
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);
std::vector< double > xVector()
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two distribute and or modify the software for each author s protection and we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed we want its recipients to know that what they have is not the so that any problems introduced by others will not reflect on the original authors reputations any free program is threatened constantly by software patents We wish to avoid the danger that redistributors of a free program will individually obtain patent in effect making the program proprietary To prevent we have made it clear that any patent must be licensed for everyone s free use or not licensed at all The precise terms and conditions for distribution and modification follow GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR DISTRIBUTION AND MODIFICATION This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License The refers to any such program or and a work based on the Program means either the Program or any derivative work under copyright a work containing the Program or a portion of it
std::vector< double > yVector()
std::vector< double > z_m
bool getConstantSpacing() const
void yLowerBound(const double &y, int &yIndex) const
friend bool operator<(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
std::vector< double > zVector()
int toInteger(const Mesh::Iterator &lhs) const
void setConstantSpacing()
virtual bool isGreater(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs) const
std::vector< double > x_m
friend bool operator==(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
Mesh::Iterator begin() const
void lowerBound(const double &x, int &xIndex, const double &y, int &yIndex, const double &z, int &zIndex) const
Base class for meshing routines.
std::vector< VectorMap * > maps_m
const double & z(const int &j) const
virtual void getPosition(const Mesh::Iterator &it, double *position) const
const double & y(const int &j) const
virtual Mesh::Iterator & subEquals(Mesh::Iterator &lhs, int difference) const
friend Mesh::Iterator operator++(Mesh::Iterator &lhs, int)
std::vector< double > y_m
friend Mesh::Iterator operator--(Mesh::Iterator &lhs, int)
void setY(int nYCoords, double *y)
virtual Mesh::Iterator & subOne(Mesh::Iterator &lhs) const
void setZ(int nZCoords, double *z)
Mesh::Iterator getNearest(const double *position) const
void zLowerBound(const double &z, int &zIndex) const
int getPositionDimension() const
friend bool operator!=(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
const double & x(const int &i) const
friend bool operator>(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
std::vector< int > getState() const
friend bool operator>=(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
virtual Mesh::Iterator & addEquals(Mesh::Iterator &lhs, int difference) const
static void vectorLowerBound(std::vector< double > vec, double x, int &index)
Mesh::Iterator end() const
void setX(int nXCoords, double *x)
friend bool operator<=(const Mesh::Iterator &lhs, const Mesh::Iterator &rhs)
PETE_TUTree< FnFloor, typename T::PETE_Expr_t > floor(const PETE_Expr< T > &l)
virtual Mesh::Iterator & addOne(Mesh::Iterator &lhs) const
void xLowerBound(const double &x, int &xIndex) const