Commit d8a653c9 authored by frey_m's avatar frey_m

SAAMG: remove duplicated getBoundaryStencil function

parent c2fdcdc0
......@@ -383,16 +383,6 @@ int ArbitraryDomain::getNumXY(int z) {
return numXY[z];
}
void ArbitraryDomain::getBoundaryStencil(int idxyz, double &W, double &E, double &S,
double &N, double &F, double &B, double &C,
double &scaleFactor)
{
int idx = 0, idy = 0, idz = 0;
getCoord(idxyz, idx, idy, idz);
getBoundaryStencil(idx, idy, idz, W, E, S, N, F, B, C, scaleFactor);
}
void ArbitraryDomain::getBoundaryStencil(int idx, int idy, int idz, double &W,
double &E, double &S, double &N, double &F,
double &B, double &C, double &scaleFactor)
......
......@@ -58,10 +58,6 @@ public:
double &S, double &N, double &F, double &B, double &C,
double &scaleFactor);
/// returns discretization at 3D index
void getBoundaryStencil(int idxyz, double &W, double &E, double &S, double &N,
double &F, double &B, double &C, double &scaleFactor);
/// returns index of neighbours at (x,y,z)
void getNeighbours(int idx, int idy, int idz, int &W,
int &E, int &S, int &N, int &F, int &B);
......
......@@ -174,15 +174,6 @@ void BoxCornerDomain::getBoundaryStencil(int x, int y, int z, double &W, double
assert(C > 0);
}
void BoxCornerDomain::getBoundaryStencil(int idx, double &W, double &E, double &S, double &N, double &F, double &B, double &C, double &scaleFactor) {
int x = 0, y = 0, z = 0;
getCoord(idx, x, y, z);
getBoundaryStencil(x, y, z, W, E, S, N, F, B, C, scaleFactor);
}
void BoxCornerDomain::getNeighbours(int x, int y, int z, int &W, int &E, int &S, int &N, int &F, int &B) {
if(x > 0)
......
......@@ -79,10 +79,6 @@ public:
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
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)
void getNeighbours(int x, int y, int z, int &W, int &E, int &S, int &N, int &F, int &B);
......
......@@ -203,16 +203,6 @@ void EllipticDomain::getBoundaryStencil(int x, int y, int z, double &W,
assert(C > 0);
}
void EllipticDomain::getBoundaryStencil(int idx, double &W, double &E,
double &S, double &N, double &F,
double &B, double &C, double &scaleFactor)
{
int x = 0, y = 0, z = 0;
getCoord(idx, x, y, z);
getBoundaryStencil(x, y, z, W, E, S, N, F, B, C, scaleFactor);
}
void EllipticDomain::getNeighbours(int x, int y, int z, int &W, int &E,
int &S, int &N, int &F, int &B)
{
......
......@@ -58,11 +58,6 @@ public:
double &N, double &F, double &B,
double &C, double &scaleFactor);
/// 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);
/// returns index of neighbours at (x,y,z)
void getNeighbours(int x, int y, int z, int &W, int &E,
int &S, int &N, int &F, int &B);
......
......@@ -32,4 +32,14 @@ void IrregularDomain::getNeighbours(int id, int &W, int &E, int &S,
int x = 0, y = 0, z = 0;
getCoord(id, x, y, z);
getNeighbours(x, y, z, W, E, S, N, F, B);
}
void IrregularDomain::getBoundaryStencil(int id, double &W, double &E, double &S,
double &N, double &F, double &B, double &C,
double &scaleFactor)
{
int idx = 0, idy = 0, idz = 0;
getCoord(id, idx, idy, idz);
getBoundaryStencil(idx, idy, idz, W, E, S, N, F, B, C, scaleFactor);
}
\ No newline at end of file
......@@ -71,7 +71,7 @@ public:
double &C, double &scaleFactor) = 0;
/// method to calculate the stencil at a boundary points
/// \param idx index of the current element in the matrix
/// \param id index of the current element in the matrix
/// \param W stencil value of the element in the west of idx: (x-1)
/// \param E stencil value of the element in the east of idx: (x+1)
/// \param S stencil value of the element in the south of idx: (y-1)
......@@ -79,9 +79,9 @@ public:
/// \param F stencil value of the element in front of idx: (z-1)
/// \param B stencil value of the element in the back of idx: (z+1)
/// \param C stencil value of the element in the center
virtual void getBoundaryStencil(int idx, double &W, double &E, double &S,
double &N, double &F, double &B, double &C,
double &scaleFactor) = 0;
void getBoundaryStencil(int id, double &W, double &E, double &S,
double &N, double &F, double &B, double &C,
double &scaleFactor);
/// method to calculate the neighbours in the matrix of the current index (x,y,z)
/// \param x index of the current element in the matrix
......
......@@ -132,15 +132,6 @@ void RectangularDomain::getBoundaryStencil(int x, int y, int z, double &W, doubl
#endif
}
void RectangularDomain::getBoundaryStencil(int idx, double &W, double &E, double &S, double &N, double &F, double &B, double &C, double &scaleFactor) {
int x = 0, y = 0, z = 0;
getCoord(idx, x, y, z);
getBoundaryStencil(x, y, z, W, E, S, N, F, B, C, scaleFactor);
}
void RectangularDomain::getNeighbours(int x, int y, int z, double &W, double &E, double &S, double &N, double &F, double &B) {
if(x > 0)
......
......@@ -46,8 +46,6 @@ public:
int getNumXY(int 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);
/// 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);
/// returns index of neighbours at (x,y,z)
using IrregularDomain::getNeighbours;
void getNeighbours(int x, int y, int z, double &W, double &E, double &S, double &N, double &F, double &B);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment