From ef9e9276df5c348f0c3d382cebd080cd1d78c92e Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 4 Apr 2013 12:14:53 -0400 Subject: Carpet: Do not restrict variables marked as "don't restrict" Do not restrict variables marked as op_none or op_sync. Mark grid arrays as op_sync, not op_copy, which would still prolongate and restrict them. --- Carpet/Carpet/src/Restrict.cc | 9 ++++++--- Carpet/Carpet/src/SetupGH.cc | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'Carpet/Carpet') diff --git a/Carpet/Carpet/src/Restrict.cc b/Carpet/Carpet/src/Restrict.cc index 10d537671..f07715a86 100644 --- a/Carpet/Carpet/src/Restrict.cc +++ b/Carpet/Carpet/src/Restrict.cc @@ -41,14 +41,17 @@ namespace Carpet { return; } - // remove all groups with are non-GFs, empty, or have no storage assigned + // remove all groups that are non-GFs, empty, or have no storage assigned vector groups; groups.reserve (CCTK_NumGroups()); for (int group = 0; group < CCTK_NumGroups(); ++group) { - if (CCTK_GroupTypeI(group) == CCTK_GF + operator_type const op = groupdata.AT(group).transport_operator; + bool const do_restrict = op != op_none and op != op_sync; + if (do_restrict and CCTK_NumVarsInGroupI(group) > 0 - and CCTK_QueryGroupStorageI(cctkGH, group)) { + and CCTK_QueryGroupStorageI(cctkGH, group)) + { groups.push_back (group); } } diff --git a/Carpet/Carpet/src/SetupGH.cc b/Carpet/Carpet/src/SetupGH.cc index 23fda6d94..138e0f63a 100644 --- a/Carpet/Carpet/src/SetupGH.cc +++ b/Carpet/Carpet/src/SetupGH.cc @@ -2273,7 +2273,7 @@ namespace Carpet { if (gdata.grouptype != CCTK_GF) { // Ignore everything but true grid functions - return op_copy; + return op_sync; // was: op_copy -- why? } bool const can_transfer = can_transfer_variable_type (cctkGH, group, gdata); -- cgit v1.2.3