aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2011-11-18 11:48:04 -0500
committerErik Schnetter <schnetter@cct.lsu.edu>2011-11-18 11:48:04 -0500
commitd5935caeec999a8f7c1c46a8ee381a491dc483b7 (patch)
treec646821713aef128a8ba587b83feeb577dee1a39
parent0aa97c853844178e9c89fe623908819da80c9752 (diff)
Carpet: Correct error in previous commit regarding no_split_direction
-rw-r--r--Carpet/Carpet/src/Recompose.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/Carpet/Carpet/src/Recompose.cc b/Carpet/Carpet/src/Recompose.cc
index 8dd7e3e3d..81f967a3e 100644
--- a/Carpet/Carpet/src/Recompose.cc
+++ b/Carpet/Carpet/src/Recompose.cc
@@ -1470,6 +1470,10 @@ namespace Carpet {
int mydim = -1;
int nslices = -1;
if (no_split_direction!=-1 and not dims[no_split_direction]) {
+ // Treat the no_split_direction first
+ mydim = no_split_direction;
+ nslices = 1;
+ } else {
int alldims = 0;
CCTK_REAL mycost = 0;
CCTK_REAL totalcost = 1;
@@ -1494,9 +1498,6 @@ namespace Carpet {
CCTK_REAL const mycost1 =
mycost * pow(nprocs / totalcost, CCTK_REAL(1) / alldims);
nslices = min (nprocs, int (floor (mycost1 + CCTK_REAL(0.5))));
- } else {
- mydim = no_split_direction;
- nslices = 1;
}
assert (nslices <= nprocs);
if (recompose_verbose) cout << "SRMAR " << mydim << " nprocs " << nprocs << endl;