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 ee8ea2b8 authored by frey_m's avatar frey_m
Browse files

RectangularDomain: cleanup

parent ec94d26a
No related branches found
No related tags found
1 merge request!372Resolve "SAAMG: Enable RectangularDomain"
This diff is collapsed.
...@@ -36,6 +36,7 @@ public: ...@@ -36,6 +36,7 @@ public:
/// constructor /// constructor
RectangularDomain(Vector_t nr, Vector_t hr); RectangularDomain(Vector_t nr, Vector_t hr);
/// constructor /// constructor
RectangularDomain(double a, double b, Vector_t nr, Vector_t hr); RectangularDomain(double a, double b, Vector_t nr, Vector_t hr);
...@@ -44,17 +45,29 @@ public: ...@@ -44,17 +45,29 @@ public:
/// 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);
/// returns discretization at (x,y,z) /// returns discretization at (x,y,z)
void getBoundaryStencil(int x, int y, int z, double &W, double &E, double &S, double &N, double &F, double &B, double &C, double &scaleFactor); void getBoundaryStencil(int x, int y, int z, double &W, double &E,
double &S, double &N, double &F, double &B,
double &C, double &scaleFactor);
/// returns discretization at 3D index /// returns discretization at 3D index
void getBoundaryStencil(int idx, double &W, double &E, double &S, double &N, double &F, double &B, double &C, double &scaleFactor); void getBoundaryStencil(int idx, double &W, double &E, double &S,
double &N, double &F, double &B, double &C,
double &scaleFactor);
/// 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, double &S, double &N, double &F, double &B);
void getNeighbours(int x, int y, int z, double &W, double &E,
double &S, double &N, double &F, double &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, double &N, double &F, double &B); void getNeighbours(int idx, double &W, double &E, double &S, double &N, double &F, double &B);
/// returns type of boundary condition /// returns type of boundary condition
std::string getType() {return "Rectangular";} std::string getType() {return "Rectangular";}
/// queries if a given (x,y,z) coordinate lies inside the domain /// queries if a given (x,y,z) coordinate lies inside the domain
inline bool isInside(int x, int y, int /*z*/) { inline bool isInside(int x, int y, int /*z*/) {
double xx = (x - (nr[0] - 1) / 2.0) * hr[0]; double xx = (x - (nr[0] - 1) / 2.0) * hr[0];
...@@ -86,7 +99,7 @@ private: ...@@ -86,7 +99,7 @@ private:
/// conversion from (x,y,z) to index on the 3D grid /// conversion from (x,y,z) to index on the 3D grid
inline int getIdx(int x, int y, int z) { inline int getIdx(int x, int y, int z) {
if(isInside(x, y, z) && x >= 0 && y >= 0 && z >= 0) if (isInside(x, y, z) && x >= 0 && y >= 0 && z >= 0)
return y * nr[0] + x + z * nxy_m; return y * nr[0] + x + z * nxy_m;
else else
return -1; return -1;
......
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