aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src/Storage.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@aei.mpg.de>2005-03-03 10:17:00 +0000
committerErik Schnetter <schnetter@aei.mpg.de>2005-03-03 10:17:00 +0000
commit2a6fa8359b9bdcaa7e99423a548cac72fbb0aab4 (patch)
tree33fa723f8b30d0fa482d4ed0cae038e164c66d75 /Carpet/Carpet/src/Storage.cc
parent9b7fc7d9f272d075ac3c78bb2f856d72d05170a0 (diff)
Carpet: Correct errors in en-/disabling of storage
darcs-hash:20050303101750-891bb-030a589a06caf7a6a2e0228d48f822a0a075cc90.gz
Diffstat (limited to 'Carpet/Carpet/src/Storage.cc')
-rw-r--r--Carpet/Carpet/src/Storage.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/Carpet/Carpet/src/Storage.cc b/Carpet/Carpet/src/Storage.cc
index c0cccde03..f08e8d6cf 100644
--- a/Carpet/Carpet/src/Storage.cc
+++ b/Carpet/Carpet/src/Storage.cc
@@ -6,6 +6,7 @@
#include "dh.hh"
#include "gf.hh"
+#include "operators.hh"
#include "carpet.hh"
@@ -44,9 +45,6 @@ namespace Carpet {
bool const all_ml = is_meta_mode();
int const min_ml = all_ml ? 0 : mglevel;
int const max_ml = all_ml ? mglevels : mglevel+1;
- bool const all_rl = is_meta_mode() or is_global_mode();
- int const min_rl = all_rl ? 0 : reflevel;
- int const max_rl = all_rl ? reflevels : reflevel+1;
int total_num_timelevels = 0;
@@ -57,6 +55,11 @@ namespace Carpet {
const int ierr = CCTK_GroupData (group, &gp);
assert (! ierr);
+ bool const all_rl = is_meta_mode() or is_global_mode();
+ bool const is_array = gp.grouptype != CCTK_GF;
+ int const min_rl = is_array ? 0 : all_rl ? 0 : reflevel;
+ int const max_rl = is_array ? 1 : all_rl ? reflevels : reflevel+1;
+
int const firstvarindex = CCTK_FirstVarIndexI (group);
assert (gp.numvars == 0
or (firstvarindex >= 0 and firstvarindex < CCTK_NumVars()));
@@ -108,7 +111,8 @@ namespace Carpet {
for (int ml=min_ml; ml<max_ml; ++ml) {
for (int rl=min_rl; rl<max_rl; ++rl) {
for (int m=0; m<(int)arrdata.at(group).size(); ++m) {
- for (int var=0; var<gp.numvars; ++var) {
+ for (int var0=0; var0<gp.numvars; ++var0) {
+ int const var = do_increase ? var0 : gp.numvars - var0 - 1;
const int vectorindex
= gp.vectorgroup ? var % gp.vectorlength : 0;
const int vectorlength
@@ -163,14 +167,13 @@ namespace Carpet {
} // if really change the number of active time levels
-#if 0
// Complain if there are not enough active time levels
if (gp.grouptype == CCTK_GF) {
if (max_refinement_levels > 1) {
if (groupdata.at(group).transport_operator != op_none) {
if (groupdata.at(group).info.activetimelevels != 0
and (groupdata.at(group).info.activetimelevels
- <= prolongation_order_time))
+ < prolongation_order_time+1))
{
char * const groupname = CCTK_GroupName (group);
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
@@ -182,7 +185,6 @@ namespace Carpet {
}
}
}
-#endif
// Record current number of time levels
total_num_timelevels += groupdata.at(group).info.activetimelevels;