diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2010-12-23 16:26:39 -0600 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 18:25:52 +0000 |
commit | 7b60158b2e7c2ece65fc232b71c1d8d5a3f52b37 (patch) | |
tree | 36b80f2bad170e8fc767b840f1f76b12cd2d6d54 | |
parent | e6d02ed45d119bf27d0fe1726675f5dc8c9df625 (diff) |
CarpetLib: Add up to 5th order cell-centred prolongation operators
-rw-r--r-- | Carpet/CarpetLib/src/data.cc | 9 | ||||
-rw-r--r-- | Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc | 57 |
2 files changed, 63 insertions, 3 deletions
diff --git a/Carpet/CarpetLib/src/data.cc b/Carpet/CarpetLib/src/data.cc index 55b21f256..b671b2f10 100644 --- a/Carpet/CarpetLib/src/data.cc +++ b/Carpet/CarpetLib/src/data.cc @@ -662,11 +662,14 @@ transfer_prolongate (data const * const src, { & prolongate_3d_cc_rf2<T,0>, & prolongate_3d_cc_rf2<T,1>, - & prolongate_3d_cc_rf2<T,2> + & prolongate_3d_cc_rf2<T,2>, + & prolongate_3d_cc_rf2<T,3>, + & prolongate_3d_cc_rf2<T,4>, + & prolongate_3d_cc_rf2<T,5> }; - if (order_space < 0 or order_space > 2) { + if (order_space < 0 or order_space > 5) { CCTK_WARN (CCTK_WARN_ABORT, - "There is no cell-centred stencil for op=\"LAGRANGE\" or op=\"COPY\" with order_space not in {0, 1, 2}"); + "There is no cell-centred stencil for op=\"LAGRANGE\" or op=\"COPY\" with order_space not in {0, 1, 2, 3, 4, 5}"); } call_operator<T> (the_operators[order_space], static_cast <T const *> (src->storage()), diff --git a/Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc b/Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc index 7854a07c0..3bd9e6aad 100644 --- a/Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc +++ b/Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc @@ -112,6 +112,33 @@ namespace CarpetLib { + 5 / RT(32.0), \ +30 / RT(32.0), \ - 3 / RT(32.0) \ + }; \ + \ + template<> \ + const RT coeffs1d<RT,3>::coeffs[] = { \ + - 5 / RT(128.0), \ + + 35 / RT(128.0), \ + +105 / RT(128.0), \ + - 7 / RT(128.0) \ + }; \ + \ + template<> \ + const RT coeffs1d<RT,4>::coeffs[] = { \ + - 45 / RT(2048.0), \ + + 420 / RT(2048.0), \ + +1890 / RT(2048.0), \ + - 252 / RT(2048.0) \ + + 35 / RT(2048.0) \ + }; \ + \ + template<> \ + const RT coeffs1d<RT,5>::coeffs[] = { \ + + 63 / RT(8192.0), \ + - 495 / RT(8192.0), \ + +2310 / RT(8192.0), \ + +6930 / RT(8192.0), \ + - 639 / RT(8192.0), \ + + 77 / RT(8192.0) \ }; #define CARPET_NO_COMPLEX @@ -516,6 +543,36 @@ namespace CarpetLib { ivect3 const & restrict dstext, \ ibbox3 const & restrict srcbbox, \ ibbox3 const & restrict dstbbox, \ + ibbox3 const & restrict regbbox); \ + \ + template \ + void \ + prolongate_3d_cc_rf2<T,3> (T const * restrict const src, \ + ivect3 const & restrict srcext, \ + T * restrict const dst, \ + ivect3 const & restrict dstext, \ + ibbox3 const & restrict srcbbox, \ + ibbox3 const & restrict dstbbox, \ + ibbox3 const & restrict regbbox); \ + \ + template \ + void \ + prolongate_3d_cc_rf2<T,4> (T const * restrict const src, \ + ivect3 const & restrict srcext, \ + T * restrict const dst, \ + ivect3 const & restrict dstext, \ + ibbox3 const & restrict srcbbox, \ + ibbox3 const & restrict dstbbox, \ + ibbox3 const & restrict regbbox); \ + \ + template \ + void \ + prolongate_3d_cc_rf2<T,5> (T const * restrict const src, \ + ivect3 const & restrict srcext, \ + T * restrict const dst, \ + ivect3 const & restrict dstext, \ + ibbox3 const & restrict srcbbox, \ + ibbox3 const & restrict dstbbox, \ ibbox3 const & restrict regbbox); #include "typecase.hh" |