aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/prolongate_4d_o1_rf2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/prolongate_4d_o1_rf2.cc')
-rw-r--r--Carpet/CarpetLib/src/prolongate_4d_o1_rf2.cc29
1 files changed, 19 insertions, 10 deletions
diff --git a/Carpet/CarpetLib/src/prolongate_4d_o1_rf2.cc b/Carpet/CarpetLib/src/prolongate_4d_o1_rf2.cc
index 1f7e8203e..58b22f719 100644
--- a/Carpet/CarpetLib/src/prolongate_4d_o1_rf2.cc
+++ b/Carpet/CarpetLib/src/prolongate_4d_o1_rf2.cc
@@ -6,7 +6,6 @@
#include <cmath>
#include <cstdlib>
-#include "gdata.hh"
#include "operator_prototypes_4d.hh"
#include "typeprops.hh"
@@ -18,11 +17,13 @@ namespace CarpetLib {
-#define SRCIND4(i,j,k,l) \
- index4 (i, j, k, l, \
+#define SRCIND4(i,j,k,l) \
+ index4 (i, j, k, l, \
+ srcipadext, srcjpadext, srckpadext, srclpadext, \
srciext, srcjext, srckext, srclext)
-#define DSTIND4(i,j,k,l) \
- index4 (i, j, k, l, \
+#define DSTIND4(i,j,k,l) \
+ index4 (i, j, k, l, \
+ dstipadext, dstjpadext, dstkpadext, dstlpadext, \
dstiext, dstjext, dstkext, dstlext)
@@ -30,8 +31,10 @@ namespace CarpetLib {
template <typename T>
void
prolongate_4d_o1_rf2 (T const * restrict const src,
+ ivect4 const & restrict srcpadext,
ivect4 const & restrict srcext,
T * restrict const dst,
+ ivect4 const & restrict dstpadext,
ivect4 const & restrict dstext,
ibbox4 const & restrict srcbbox,
ibbox4 const & restrict dstbbox,
@@ -84,13 +87,17 @@ namespace CarpetLib {
CCTK_WARN (0, "Internal error: region extent is not contained in array extent");
}
- if (any (srcext != gdata::allocated_memory_shape(srcbbox.shape() / srcbbox.stride()) or
- dstext != gdata::allocated_memory_shape(dstbbox.shape() / dstbbox.stride())))
- {
- CCTK_WARN (0, "Internal error: array sizes don't agree with bounding boxes");
- }
+ size_t const srcipadext = srcpadext[0];
+ size_t const srcjpadext = srcpadext[1];
+ size_t const srckpadext = srcpadext[2];
+ size_t const srclpadext = srcpadext[3];
+
+ size_t const dstipadext = dstpadext[0];
+ size_t const dstjpadext = dstpadext[1];
+ size_t const dstkpadext = dstpadext[2];
+ size_t const dstlpadext = dstpadext[3];
size_t const srciext = srcext[0];
size_t const srcjext = srcext[1];
@@ -593,8 +600,10 @@ namespace CarpetLib {
template \
void \
prolongate_4d_o1_rf2 (T const * restrict const src, \
+ ivect4 const & restrict srcpadext, \
ivect4 const & restrict srcext, \
T * restrict const dst, \
+ ivect4 const & restrict dstpadext, \
ivect4 const & restrict dstext, \
ibbox4 const & restrict srcbbox, \
ibbox4 const & restrict dstbbox, \