diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-12-06 16:38:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-12-06 16:38:00 +0000 |
commit | 52edffff86d6e1212fa40a094fb74bf9e3193fa0 (patch) | |
tree | 4e4d1bc0835a629d3f63296c003cc01addda944c /Carpet/CarpetIOASCII | |
parent | 9b7a6f7bcb9d9828395422ae665060be85678c8a (diff) |
CarpetIOASCII: Allow output in singlemap mode if there is only one map etc.
Allow output in singlemap mode if there is only one map, and in local
mode if there is only one local component.
darcs-hash:20061206163825-dae7b-a359f3f532332d5e5055c76fc9adff9012777b8a.gz
Diffstat (limited to 'Carpet/CarpetIOASCII')
-rw-r--r-- | Carpet/CarpetIOASCII/src/ioascii.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc index e7046542a..ca2435437 100644 --- a/Carpet/CarpetIOASCII/src/ioascii.cc +++ b/Carpet/CarpetIOASCII/src/ioascii.cc @@ -377,11 +377,14 @@ namespace CarpetIOASCII { return (-1); } - if (not is_level_mode()) { + if (not (is_level_mode() or + (is_singlemap_mode() and Carpet::maps == 1) or + (is_local_mode() and Carpet::maps == 1 and vhh.at(Carpet::map)->local_components(reflevel) == 1))) + { CCTK_WARN (1, "OutputVarAs must be called in level mode"); return -1; } - assert (is_level_mode()); + BEGIN_LEVEL_MODE (cctkGH) { const int group = CCTK_GroupIndexFromVarI (vindex); assert (group >= 0); @@ -950,6 +953,8 @@ namespace CarpetIOASCII { } while (not done); // all directions + } END_LEVEL_MODE; + return 0; } |