aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2013-04-03 15:35:40 -0400
committerErik Schnetter <schnetter@gmail.com>2013-04-03 15:57:21 -0400
commit40f113decf0d0de18aeabb8cce90bdc835f56fdd (patch)
tree154f6cf6d01b3ca361aea365c49693cf60df0765
parent27715e024145ff1a792eb1e190e1bceb04fccd57 (diff)
Requirements: Beautify code
-rw-r--r--Carpet/Carpet/src/Restrict.cc9
-rw-r--r--Carpet/Carpet/src/SetupGH.cc2
-rw-r--r--Carpet/Requirements/schedule.ccl4
3 files changed, 9 insertions, 6 deletions
diff --git a/Carpet/Carpet/src/Restrict.cc b/Carpet/Carpet/src/Restrict.cc
index f20a711fd..35e9fffcb 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<int> 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 4db6b8106..896194651 100644
--- a/Carpet/Carpet/src/SetupGH.cc
+++ b/Carpet/Carpet/src/SetupGH.cc
@@ -2272,7 +2272,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);
diff --git a/Carpet/Requirements/schedule.ccl b/Carpet/Requirements/schedule.ccl
index a8a1fb38f..978b6743b 100644
--- a/Carpet/Requirements/schedule.ccl
+++ b/Carpet/Requirements/schedule.ccl
@@ -4,13 +4,13 @@
# of the internal workings of thorn boundary.
if (check_requirements)
{
- schedule CarpetCheckReadsBeforeBoundary IN ApplyBCs BEFORE BoundaryConditions
+ SCHEDULE CarpetCheckReadsBeforeBoundary IN ApplyBCs BEFORE BoundaryConditions
{
LANG: C
OPTIONS: singlemap # local would also work but we don't really need it
} "Check that interior of grid function is valid before boundary conditions are applied"
- schedule CarpetNotifyWritesAfterBoundary IN ApplyBCs AFTER Boundary_ApplyPhysicalBCs BEFORE Boundary_ClearSelection
+ SCHEDULE CarpetNotifyWritesAfterBoundary IN ApplyBCs AFTER Boundary_ApplyPhysicalBCs BEFORE Boundary_ClearSelection
{
LANG: C
OPTIONS: singlemap # local would also work but we don't really need it