aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/operator_prototypes_4d.hh
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2012-11-16 18:55:47 -0500
committerErik Schnetter <schnetter@gmail.com>2012-11-22 09:59:16 -0500
commit53a1c146bc09c67ea709c14dab4c73ebebed86dc (patch)
treeb5bd034cf3c0e6de4cb422ceffe52e01de06f505 /Carpet/CarpetLib/src/operator_prototypes_4d.hh
parentdf843816d07d18e2c0407915d1b8113bfe7ab720 (diff)
Allow padding in transport operators
Rewrite padding infrastructure. Add padded array extents to transport operator APIs.
Diffstat (limited to 'Carpet/CarpetLib/src/operator_prototypes_4d.hh')
-rw-r--r--Carpet/CarpetLib/src/operator_prototypes_4d.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/operator_prototypes_4d.hh b/Carpet/CarpetLib/src/operator_prototypes_4d.hh
index 1d0a4609a..71d1e3bcd 100644
--- a/Carpet/CarpetLib/src/operator_prototypes_4d.hh
+++ b/Carpet/CarpetLib/src/operator_prototypes_4d.hh
@@ -22,6 +22,7 @@ namespace CarpetLib {
static inline
size_t
index4 (size_t const i, size_t const j, size_t const k, size_t const l,
+ size_t const padexti, size_t const padextj, size_t const padextk, size_t const padextl,
size_t const exti, size_t const extj, size_t const extk, size_t const extl)
{
#ifdef CARPET_DEBUG
@@ -31,7 +32,7 @@ namespace CarpetLib {
assert (static_cast <ptrdiff_t> (l) >= 0 and l < extl);
#endif
- return i + exti * (j + extj * (k + extk * l));
+ return i + padexti * (j + padextj * (k + padextk * l));
}
@@ -47,8 +48,10 @@ namespace CarpetLib {
template <typename T>
void
copy_4d (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,
@@ -61,8 +64,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,
@@ -75,8 +80,10 @@ namespace CarpetLib {
template <typename T>
void
restrict_4d_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,