Skip to content
Snippets Groups Projects
Commit dcfa26a4 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

tentative fix for some win machines

parent 70be8138
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ class cartesianBox { ...@@ -36,7 +36,7 @@ class cartesianBox {
// number of subdivisions along the xi-, eta- and zeta-axis // number of subdivisions along the xi-, eta- and zeta-axis
int _Nxi, _Neta, _Nzeta; int _Nxi, _Neta, _Nzeta;
// origin of the grid and spacing along xi, eta and zeta // origin of the grid and spacing along xi, eta and zeta
double _X, _Y, _Z, _dxi, _deta, _dzeta; double _X0, _Y0, _Z0, _dxi, _deta, _dzeta;
// xi-, eta- and zeta-axis directions // xi-, eta- and zeta-axis directions
SVector3 _xiAxis, _etaAxis, _zetaAxis; SVector3 _xiAxis, _etaAxis, _zetaAxis;
// set of active cells; the value stored for cell (i,j,k) is the // set of active cells; the value stored for cell (i,j,k) is the
...@@ -127,10 +127,10 @@ class cartesianBox { ...@@ -127,10 +127,10 @@ class cartesianBox {
if(_childBox) _childBox->_printValues(f); if(_childBox) _childBox->_printValues(f);
} }
public: public:
cartesianBox(double X, double Y, double Z, cartesianBox(double X0, double Y0, double Z0,
const SVector3 &dxi, const SVector3 &deta, const SVector3 &dzeta, const SVector3 &dxi, const SVector3 &deta, const SVector3 &dzeta,
int Nxi, int Neta, int Nzeta, int level=1) int Nxi, int Neta, int Nzeta, int level=1)
: _X(X), _Y(Y), _Z(Z), : _X0(X0), _Y0(Y0), _Z0(Z0),
_dxi(norm(dxi)), _deta(norm(deta)), _dzeta(norm(dzeta)), _dxi(norm(dxi)), _deta(norm(deta)), _dzeta(norm(dzeta)),
_xiAxis(dxi), _etaAxis(deta), _zetaAxis(dzeta), _xiAxis(dxi), _etaAxis(deta), _zetaAxis(dzeta),
_Nxi(Nxi), _Neta(Neta), _Nzeta(Nzeta), _level(level), _childBox(0) _Nxi(Nxi), _Neta(Neta), _Nzeta(Nzeta), _level(level), _childBox(0)
...@@ -139,7 +139,7 @@ class cartesianBox { ...@@ -139,7 +139,7 @@ class cartesianBox {
_etaAxis.normalize(); _etaAxis.normalize();
_zetaAxis.normalize(); _zetaAxis.normalize();
if(level > 1) if(level > 1)
_childBox = new cartesianBox<scalar>(X, Y, Z, dxi, deta, dzeta, _childBox = new cartesianBox<scalar>(X0, Y0, Z0, dxi, deta, dzeta,
2 * Nxi, 2 * Neta, 2 * Nzeta, 2 * Nxi, 2 * Neta, 2 * Nzeta,
level - 1); level - 1);
} }
...@@ -176,7 +176,7 @@ class cartesianBox { ...@@ -176,7 +176,7 @@ class cartesianBox {
double getValueContainingPoint(double x, double y, double z) double getValueContainingPoint(double x, double y, double z)
{ {
SVector3 DP (x - _X, y - _Y, z - _Z); SVector3 DP (x - _X0, y - _Y0, z - _Z0);
double xa = dot(DP, _xiAxis); double xa = dot(DP, _xiAxis);
double ya = dot(DP, _etaAxis); double ya = dot(DP, _etaAxis);
double za = dot(DP, _zetaAxis); double za = dot(DP, _zetaAxis);
...@@ -258,7 +258,7 @@ class cartesianBox { ...@@ -258,7 +258,7 @@ class cartesianBox {
{ {
// P = P_0 + xi * _vdx + eta * _vdy + zeta *vdz // P = P_0 + xi * _vdx + eta * _vdy + zeta *vdz
// DP = P-P_0 * _vdx = xi // DP = P-P_0 * _vdx = xi
SVector3 DP (x - _X, y - _Y, z - _Z); SVector3 DP (x - _X0, y - _Y0, z - _Z0);
double xi = dot(DP, _xiAxis); double xi = dot(DP, _xiAxis);
double eta = dot(DP, _etaAxis); double eta = dot(DP, _etaAxis);
double zeta = dot(DP, _zetaAxis); double zeta = dot(DP, _zetaAxis);
...@@ -278,7 +278,7 @@ class cartesianBox { ...@@ -278,7 +278,7 @@ class cartesianBox {
const double eta = j * _deta / _Neta; const double eta = j * _deta / _Neta;
const double zeta = k * _dzeta / _Nzeta; const double zeta = k * _dzeta / _Nzeta;
SVector3 D = xi * _xiAxis + eta * _etaAxis + zeta * _zetaAxis; SVector3 D = xi * _xiAxis + eta * _etaAxis + zeta * _zetaAxis;
return SPoint3(_X + D.x(), _Y + D.y(), _Z + D.z()); return SPoint3(_X0 + D.x(), _Y0 + D.y(), _Z0 + D.z());
} }
void insertActiveCell(int t){ _activeCells.insert(t); } void insertActiveCell(int t){ _activeCells.insert(t); }
void eraseActiveCell(int t){ _activeCells.erase(t); } void eraseActiveCell(int t){ _activeCells.erase(t); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment