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

RectangularDomain: isInside + reuse existing constructor

parent d131d96e
No related branches found
No related tags found
1 merge request!372Resolve "SAAMG: Enable RectangularDomain"
......@@ -30,13 +30,8 @@
#include "Utilities/OpalException.h"
RectangularDomain::RectangularDomain(Vector_t nr, Vector_t hr)
: a_m(0.1)
, b_m(0.1)
, nxy_m(nr[0] * nr[1])
{
setNr(nr);
setHr(hr);
}
: RectangularDomain(0.1, 0.1, nr, hr)
{}
RectangularDomain::RectangularDomain(double a, double b, Vector_t nr, Vector_t hr)
: a_m(a)
......@@ -94,7 +89,7 @@ void RectangularDomain::getBoundaryStencil(int x, int y, int z, double &W,
//simple check if center value of stencil is positive
#ifdef DEBUG
if(C <= 0)
if (C <= 0)
throw OpalException("RectangularDomain::getBoundaryStencil",
"Stencil C is <= 0! This case should never occure!");
#endif
......
......@@ -75,19 +75,18 @@ public:
/// queries if a given (x,y,z) coordinate lies inside the domain
inline bool isInside(int x, int y, int /*z*/) {
return true;
// double xx = - a_m + hr[0] * (x + 0.5);
// double yy = - b_m + hr[1] * (y + 0.5);
// return (xx <= a_m && yy < b_m);
double xx = std::abs(-a_m + hr[0] * (x + 0.5));
double yy = std::abs(-b_m + hr[1] * (y + 0.5));
return (xx < a_m && yy < b_m);
}
void setB_m(double b) {b_m = b;}
void setA_m(double a) {a_m = a;}
double getXRangeMin() { return -a_m; }
double getXRangeMax() { return a_m; }
double getXRangeMax() { return a_m; }
double getYRangeMin() { return -b_m; }
double getYRangeMax() { return b_m; }
double getYRangeMax() { return b_m; }
double getZRangeMin() { return getMinZ(); }
double getZRangeMax() { return getMaxZ(); }
......
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