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 51b88dc8 authored by Daniel Winklehner's avatar Daniel Winklehner
Browse files

First commit to test. Fixed getCoord and constant interpolation -DW

parent 338a222e
No related branches found
No related tags found
No related merge requests found
......@@ -256,19 +256,19 @@ void ArbitraryDomain::constantInterpolation(int idx, int idy, int idz,
value.back = -1/(hr_m[2]*hr_m[2]);
value.center = 2/(hr_m[0]*hr_m[0]) + 2/(hr_m[1]*hr_m[1]) + 2/(hr_m[2]*hr_m[2]);
if(!isInside(idx-1,idy,idz))
if (idx == 0 || !isInside(idx - 1, idy, idz))
value.west = 0.0;
if(!isInside(idx+1,idy,idz))
if (idx == (nr_m[0] - 1) || !isInside(idx + 1, idy, idz))
value.east = 0.0;
if(!isInside(idx,idy+1,idz))
if (idy == (nr_m[1] - 1) || !isInside(idx, idy + 1, idz))
value.north = 0.0;
if(!isInside(idx,idy-1,idz))
if (idy == 0 || !isInside(idx, idy - 1, idz))
value.south = 0.0;
if(!isInside(idx,idy,idz-1))
if (idz == 0 || !isInside(idx, idy, idz - 1))
value.front = 0.0;
if(!isInside(idx,idy,idz+1))
if (idz == (nr_m[2] - 1) || !isInside(idx, idy, idz + 1))
value.back = 0.0;
}
......
......@@ -82,8 +82,8 @@ void IrregularDomain::getNeighbours(int id, StencilIndex_t& index) const {
void IrregularDomain::getCoord(int idx, int& x, int& y, int& z) const {
int xy = coordAccess(idx);
x = xy % nr_m[0];
y = (xy - x) / nr_m[0];
z = idx / getNumXY();
y = ((xy - x) / nr_m[0]) % nr_m[1];
z = ((xy - x) / nr_m[0] - y) / nr_m[1];
}
int IrregularDomain::getIdx(int x, int y, int z) const {
......
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