Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 7b6289bc authored by frey_m's avatar frey_m
Browse files

RectangularDomain: Fix compile errors

parent 4461c3bb
No related branches found
No related tags found
1 merge request!372Resolve "SAAMG: Enable RectangularDomain"
...@@ -128,7 +128,7 @@ MGPoissonSolver::MGPoissonSolver ( PartBunch *beam, ...@@ -128,7 +128,7 @@ MGPoissonSolver::MGPoissonSolver ( PartBunch *beam,
currentGeometry->getL2(), currentGeometry->getL2(),
orig_nr_m, hr_m, interpl)); orig_nr_m, hr_m, interpl));
bp_m->compute(itsBunch_m->get_hr()); bp_m->compute(itsBunch_m->get_hr());
} else if (currentGeometry->getTopology() == "RECTANGULAR") } else if (currentGeometry->getTopology() == "RECTANGULAR") {
bp_m = std::unique_ptr<IrregularDomain>( bp_m = std::unique_ptr<IrregularDomain>(
new RectangularDomain(currentGeometry->getA(), new RectangularDomain(currentGeometry->getA(),
currentGeometry->getB(), currentGeometry->getB(),
......
...@@ -106,8 +106,8 @@ void RectangularDomain::getBoundaryStencil(int idx, double &W, double &E, ...@@ -106,8 +106,8 @@ void RectangularDomain::getBoundaryStencil(int idx, double &W, double &E,
} }
void RectangularDomain::getNeighbours(int idx, double &W, double &E, double &S, void RectangularDomain::getNeighbours(int idx, int &W, int &E, int &S,
double &N, double &F, double &B) int &N, int &F, int &B)
{ {
int x = 0, y = 0, z = 0; int x = 0, y = 0, z = 0;
...@@ -116,8 +116,8 @@ void RectangularDomain::getNeighbours(int idx, double &W, double &E, double &S, ...@@ -116,8 +116,8 @@ void RectangularDomain::getNeighbours(int idx, double &W, double &E, double &S,
} }
void RectangularDomain::getNeighbours(int x, int y, int z, double &W, double &E, void RectangularDomain::getNeighbours(int x, int y, int z, int &W, int &E,
double &S, double &N, double &F, double &B) int &S, int &N, int &F, int &B)
{ {
if (x > 0) if (x > 0)
W = getIdx(x - 1, y, z); W = getIdx(x - 1, y, z);
...@@ -152,11 +152,13 @@ void RectangularDomain::resizeMesh(Vector_t& origin, Vector_t& hr, const Vector_ ...@@ -152,11 +152,13 @@ void RectangularDomain::resizeMesh(Vector_t& origin, Vector_t& hr, const Vector_
{ {
// apply bounding box increment, i.e., "BBOXINCR" input argument // apply bounding box increment, i.e., "BBOXINCR" input argument
double zsize = rmax[2] - rmin[2]; double zsize = rmax[2] - rmin[2];
this->zMin_m = rmin[2] - zsize * (1.0 + dh);
this->zMax_m = rmax[2] + zsize * (1.0 + dh);
origin = Vector_t(-a_m, -b_m, this->zMin_m); setMinMaxZ(rmin[2] - zsize * (1.0 + dh),
mymax = Vector_t( a_m, b_m, this->zMax_m); rmax[2] + zsize * (1.0 + dh));
origin = Vector_t(-a_m, -b_m, getMinZ());
Vector_t mymax = Vector_t(a_m, b_m, getMaxZ());
for (int i = 0; i < 3; ++i) for (int i = 0; i < 3; ++i)
hr[i] = (mymax[i] - origin[i]) / nr[i]; hr[i] = (mymax[i] - origin[i]) / nr[i];
......
...@@ -44,6 +44,10 @@ public: ...@@ -44,6 +44,10 @@ public:
/// calculates intersection with the beam pipe /// calculates intersection with the beam pipe
void compute(Vector_t hr); void compute(Vector_t hr);
void compute(Vector_t /*hr*/, NDIndex<3> /*localId*/) {
// we have no intersections
}
/// returns number of nodes in xy plane (here independent of z coordinate) /// returns number of nodes in xy plane (here independent of z coordinate)
int getNumXY(int z); int getNumXY(int z);
...@@ -60,12 +64,14 @@ public: ...@@ -60,12 +64,14 @@ public:
/// returns index of neighbours at (x,y,z) /// returns index of neighbours at (x,y,z)
using IrregularDomain::getNeighbours; using IrregularDomain::getNeighbours;
void getNeighbours(int x, int y, int z, double &W, double &E, void getNeighbours(int x, int y, int z, int &W, int &E,
double &S, double &N, double &F, double &B); int &S, int &N, int &F, int &B);
/// returns index of neighbours at 3D index /// returns index of neighbours at 3D index
void getNeighbours(int idx, double &W, double &E, double &S, void getNeighbours(int idx, int &W, int &E, int &S,
double &N, double &F, double &B); int &N, int &F, int &B);
bool hasGeometryChanged() { return false; }
void resizeMesh(Vector_t& origin, Vector_t& hr, const Vector_t& rmin, void resizeMesh(Vector_t& origin, Vector_t& hr, const Vector_t& rmin,
const Vector_t& rmax, double dh); const Vector_t& rmax, double dh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment