diff options
-rw-r--r-- | src/CopyBoundary.c | 6 | ||||
-rw-r--r-- | src/FlatBoundary.c | 6 | ||||
-rw-r--r-- | src/RobinBoundary.c | 6 | ||||
-rw-r--r-- | src/ScalarBoundary.c | 6 | ||||
-rw-r--r-- | src/StaticBoundary.c | 5 |
5 files changed, 15 insertions, 14 deletions
diff --git a/src/CopyBoundary.c b/src/CopyBoundary.c index 191b22b..278482f 100644 --- a/src/CopyBoundary.c +++ b/src/CopyBoundary.c @@ -122,9 +122,9 @@ int BndCopy(const cGH *GH, int num_vars, int *vars, int *faces, int *widths, for identical bcs. If all GFs had the same staggering then we could groups many GFs together. */ gi = CCTK_GroupIndexFromVarI (vars[i]); - while (i+j<num_vars && CCTK_GroupIndexFromVarI(vars[i+j])==gi && - tables[i+j]==tables[i] && faces[i+j]==faces[i] && - widths[i+j]==widths[i]) + while (i+j<num_vars && vars[i+j]==vars[i]+j && + CCTK_GroupIndexFromVarI(vars[i+j])==gi && tables[i+j]==tables[i] + && faces[i+j]==faces[i] && widths[i+j]==widths[i]) { ++j; } diff --git a/src/FlatBoundary.c b/src/FlatBoundary.c index 84d7db9..e36eaea 100644 --- a/src/FlatBoundary.c +++ b/src/FlatBoundary.c @@ -117,9 +117,9 @@ int BndFlat(const cGH *GH, int num_vars, int *vars, int *faces, int *widths, for identical bcs. If all GFs had the same staggering then we could groups many GFs together. */ gi = CCTK_GroupIndexFromVarI (vars[i]); - while (i+j<num_vars && CCTK_GroupIndexFromVarI(vars[i+j])==gi && - tables[i+j]==tables[i] && faces[i+j]==faces[i] && - widths[i+j]==widths[i]) + while (i+j<num_vars && vars[i+j]==vars[i]+j && + CCTK_GroupIndexFromVarI(vars[i+j])==gi && tables[i+j]==tables[i] + && faces[i+j]==faces[i] && widths[i+j]==widths[i]) { ++j; } diff --git a/src/RobinBoundary.c b/src/RobinBoundary.c index 0371cd8..c60f020 100644 --- a/src/RobinBoundary.c +++ b/src/RobinBoundary.c @@ -121,9 +121,9 @@ int BndRobin(const cGH *GH, int num_vars, int *vars, int *faces, int *widths, for identical bcs. If all GFs had the same staggering then we could groups many GFs together. */ gi = CCTK_GroupIndexFromVarI (vars[i]); - while (i+j<num_vars && CCTK_GroupIndexFromVarI(vars[i+j])==gi && - tables[i+j]==tables[i] && faces[i+j]==faces[i] && - widths[i+j]==widths[i]) + while (i+j<num_vars && vars[i+j]==vars[i]+j && + CCTK_GroupIndexFromVarI(vars[i+j])==gi && tables[i+j]==tables[i] + && faces[i+j]==faces[i] && widths[i+j]==widths[i]) { ++j; } diff --git a/src/ScalarBoundary.c b/src/ScalarBoundary.c index 36dd68a..49ad95c 100644 --- a/src/ScalarBoundary.c +++ b/src/ScalarBoundary.c @@ -119,9 +119,9 @@ int BndScalar(const cGH *GH, int num_vars, int *vars, int *faces, int *widths, for identical bcs. If all GFs had the same staggering then we could groups many GFs together. */ gi = CCTK_GroupIndexFromVarI (vars[i]); - while (i+j<num_vars && CCTK_GroupIndexFromVarI(vars[i+j])==gi && - tables[i+j]==tables[i] && faces[i+j]==faces[i] && - widths[i+j]==widths[i]) + while (i+j<num_vars && vars[i+j]==vars[i]+j && + CCTK_GroupIndexFromVarI(vars[i+j])==gi && tables[i+j]==tables[i] + && faces[i+j]==faces[i] && widths[i+j]==widths[i]) { ++j; } diff --git a/src/StaticBoundary.c b/src/StaticBoundary.c index d7b8324..b1b0f3d 100644 --- a/src/StaticBoundary.c +++ b/src/StaticBoundary.c @@ -112,8 +112,9 @@ int BndStatic(const cGH *GH, int num_vars, int *vars, int *faces, int *widths, for identical bcs. If all GFs had the same staggering then we could groups many GFs together. */ gi = CCTK_GroupIndexFromVarI (vars[i]); - while (i+j<num_vars && CCTK_GroupIndexFromVarI(vars[i+j])==gi && - tables[i+j]==tables[i] && faces[i+j]==faces[i] && widths[i+j]==widths[i]) + while (i+j<num_vars && vars[i+j]==vars[i]+j && + CCTK_GroupIndexFromVarI(vars[i+j])==gi && tables[i+j]==tables[i] + && faces[i+j]==faces[i] && widths[i+j]==widths[i]) { ++j; } |