diff options
author | Erik Schnetter <schnetter@aei.mpg.de> | 2006-09-27 02:34:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@aei.mpg.de> | 2006-09-27 02:34:00 +0000 |
commit | 33a0013a014531967b4d60148c875e22aa710b1d (patch) | |
tree | 16749d9c82ccfee565ada2b90f0c31c7ce9a5ee7 | |
parent | 523a4b5647589c035bfe06a7086bc8a1a687868d (diff) |
Carpet: Handle storage for contiguous groups
darcs-hash:20060927023406-891bb-88251433aa64511dea9bdb4833f0772d57946245.gz
-rw-r--r-- | Carpet/Carpet/src/Storage.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Carpet/Carpet/src/Storage.cc b/Carpet/Carpet/src/Storage.cc index 8643ebf0f..711374fe0 100644 --- a/Carpet/Carpet/src/Storage.cc +++ b/Carpet/Carpet/src/Storage.cc @@ -136,10 +136,19 @@ namespace Carpet { for (int m=0; m<(int)arrdata.at(group).size(); ++m) { for (int var=0; var<gp.numvars; ++var) { +#ifdef CCTK_HAVE_CONTIGUOUS_GROUPS + bool const contiguous = gp.contiguous; +#else + bool const contiguous = false; +#endif const int vectorindex - = gp.vectorgroup ? var % gp.vectorlength : 0; + = (contiguous + ? var + : gp.vectorgroup ? var % gp.vectorlength : 0); const int vectorlength - = gp.vectorgroup ? gp.vectorlength : 1; + = (contiguous + ? gp.numvars + : gp.vectorgroup ? gp.vectorlength : 1); assert (vectorindex>=0 and vectorindex<gp.numvars); assert (vectorlength>0 and vectorlength<=gp.numvars); ggf* const vectorleader |