aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/data.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/data.cc')
-rw-r--r--Carpet/CarpetLib/src/data.cc36
1 files changed, 27 insertions, 9 deletions
diff --git a/Carpet/CarpetLib/src/data.cc b/Carpet/CarpetLib/src/data.cc
index 9a26eec8a..ba1a438ce 100644
--- a/Carpet/CarpetLib/src/data.cc
+++ b/Carpet/CarpetLib/src/data.cc
@@ -1141,17 +1141,35 @@ transfer_restrict (data const * const src,
srcregbox, dstregbox, NULL);
break;
}
- if (use_cc_o3 and
+ if (use_higher_order_restriction and
transport_operator != op_WENO and
transport_operator != op_ENO) { // HACK
- // Don't use call_operator, because we parallelise ourselves
- restrict_3d_cc_o3_rf2(static_cast <T const *> (src->storage()),
- src->shape(),
- static_cast <T *> (this->storage()),
- this->shape(),
- srcbox,
- dstbox,
- srcregbox, dstregbox, NULL);
+ switch (restriction_order_space) {
+ case 1:
+ // Don't use call_operator, because we parallelise ourselves
+ restrict_3d_cc_rf2(static_cast <T const *> (src->storage()),
+ src->shape(),
+ static_cast <T *> (this->storage()),
+ this->shape(),
+ srcbox,
+ dstbox,
+ srcregbox, dstregbox, NULL);
+ break;
+ case 3:
+ // Don't use call_operator, because we parallelise ourselves
+ restrict_3d_cc_o3_rf2(static_cast <T const *> (src->storage()),
+ src->shape(),
+ static_cast <T *> (this->storage()),
+ this->shape(),
+ srcbox,
+ dstbox,
+ srcregbox, dstregbox, NULL);
+ break;
+ default:
+ CCTK_VWarn (CCTK_WARN_ABORT, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "There is no restriction stencil with restriction_order_space==%d", restriction_order_space);
+ break;
+ }
break;
}
// Don't use call_operator, because we parallelise ourselves