From 5460dec57150cfee432bb79de47eac264d72efa0 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 29 Jul 2013 18:14:21 -0700 Subject: Carpet: Support group tag "map0group" This tag indicates that this variable group should have storage only on map 0. --- Carpet/Carpet/src/Storage.cc | 4 ++++ Carpet/Carpet/src/carpet.hh | 3 +++ Carpet/Carpet/src/helpers.cc | 26 +++++++++++++++++++++++--- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Carpet/Carpet/src/Storage.cc b/Carpet/Carpet/src/Storage.cc index f8f6f3516..eee79cbcb 100644 --- a/Carpet/Carpet/src/Storage.cc +++ b/Carpet/Carpet/src/Storage.cc @@ -168,7 +168,11 @@ namespace Carpet { // Set the new number of active time levels groupdata.AT(group).activetimelevels.AT(ml).AT(rl) = tls[n]; + // Allocate storage only on map 0? + const bool ismap0group = IsMap0Group(group); + for (int m=0; m<(int)arrdata.AT(group).size(); ++m) { + if (ismap0group) continue; for (int var=0; var #include #include +#include #include #include @@ -548,11 +549,30 @@ namespace Carpet { void UnsupportedVarType (const int vindex) { assert (vindex>=0 and vindex=0 and gindex=0); + CCTK_INT map0group; + int status = Util_TableGetInt(table, &map0group, "map0group"); + if (status==UTIL_ERROR_TABLE_NO_SUCH_KEY) { + map0group = false; + status = 1; + } + if (status!=1) { + CCTK_ERROR("illegal table value"); + } + return map0group; + } + } // namespace Carpet -- cgit v1.2.3