From 11c4d98017cbb86d08e15fd1b549180184b58a26 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 3 Sep 2009 16:19:15 -0500 Subject: Import Carpet Ignore-this: 309b4dd613f4af2b84aa5d6743fdb6b3 --- Carpet/CarpetLib/src/operator_prototypes_3d.hh | 305 +++++++++++++++++++++++++ 1 file changed, 305 insertions(+) create mode 100644 Carpet/CarpetLib/src/operator_prototypes_3d.hh (limited to 'Carpet/CarpetLib/src/operator_prototypes_3d.hh') diff --git a/Carpet/CarpetLib/src/operator_prototypes_3d.hh b/Carpet/CarpetLib/src/operator_prototypes_3d.hh new file mode 100644 index 000000000..19deccea8 --- /dev/null +++ b/Carpet/CarpetLib/src/operator_prototypes_3d.hh @@ -0,0 +1,305 @@ +#ifndef OPERATOR_PROTOTYPES_3D +#define OPERATOR_PROTOTYPES_3D + +#include + +#include + +#include "defs.hh" +#include "bbox.hh" +#include "vect.hh" + +#include "operator_prototypes.hh" + + + +namespace CarpetLib { + + using namespace std; + + + + static inline + size_t + index3 (size_t const i, size_t const j, size_t const k, + size_t const exti, size_t const extj, size_t const extk) + CCTK_ATTRIBUTE_CONST; + static inline + size_t + index3 (size_t const i, size_t const j, size_t const k, + size_t const exti, size_t const extj, size_t const extk) + { +#ifdef CARPET_DEBUG + assert (static_cast (i) >= 0 and i < exti); + assert (static_cast (j) >= 0 and j < extj); + assert (static_cast (k) >= 0 and k < extk); +#endif + + return i + exti * (j + extj * k); + } + + + + static int const dim3 = 3; + + typedef vect bvect3; + typedef vect ivect3; + typedef bbox ibbox3; + + + + template + void + copy_3d (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_o1_rf2 (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_o3_rf2 (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_o5_rf2 (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_o7_rf2 (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_o9_rf2 (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_o11_rf2 (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_o5_monotone_rf2 (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_o0_rf2 (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_o1_rf2 (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_o2_rf2 (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 + restrict_3d_rf2 (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 + interpolate_3d_2tl (T const * restrict const src1, + CCTK_REAL const t1, + T const * restrict const src2, + CCTK_REAL const t2, + ivect3 const & restrict srcext, + T * restrict const dst, + CCTK_REAL const t, + ivect3 const & restrict dstext, + ibbox3 const & restrict srcbbox, + ibbox3 const & restrict dstbbox, + ibbox3 const & restrict regbbox); + + template + void + interpolate_3d_3tl (T const * restrict const src1, + CCTK_REAL const t1, + T const * restrict const src2, + CCTK_REAL const t2, + T const * restrict const src3, + CCTK_REAL const t3, + ivect3 const & restrict srcext, + T * restrict const dst, + CCTK_REAL const t, + ivect3 const & restrict dstext, + ibbox3 const & restrict srcbbox, + ibbox3 const & restrict dstbbox, + ibbox3 const & restrict regbbox); + + template + void + interpolate_3d_4tl (T const * restrict const src1, + CCTK_REAL const t1, + T const * restrict const src2, + CCTK_REAL const t2, + T const * restrict const src3, + CCTK_REAL const t3, + T const * restrict const src4, + CCTK_REAL const t4, + ivect3 const & restrict srcext, + T * restrict const dst, + CCTK_REAL const t, + ivect3 const & restrict dstext, + ibbox3 const & restrict srcbbox, + ibbox3 const & restrict dstbbox, + ibbox3 const & restrict regbbox); + + template + void + interpolate_3d_5tl (T const * restrict const src1, + CCTK_REAL const t1, + T const * restrict const src2, + CCTK_REAL const t2, + T const * restrict const src3, + CCTK_REAL const t3, + T const * restrict const src4, + CCTK_REAL const t4, + T const * restrict const src5, + CCTK_REAL const t5, + ivect3 const & restrict srcext, + T * restrict const dst, + CCTK_REAL const t, + ivect3 const & restrict dstext, + ibbox3 const & restrict srcbbox, + ibbox3 const & restrict dstbbox, + ibbox3 const & restrict regbbox); + + template + void + interpolate_eno_3d_3tl (T const * restrict const src1, + CCTK_REAL const t1, + T const * restrict const src2, + CCTK_REAL const t2, + T const * restrict const src3, + CCTK_REAL const t3, + ivect3 const & restrict srcext, + T * restrict const dst, + CCTK_REAL const t, + ivect3 const & restrict dstext, + ibbox3 const & restrict srcbbox, + ibbox3 const & restrict dstbbox, + ibbox3 const & restrict regbbox); + + + + template + void + prolongate_3d_cc_rf2_std2prim (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_prim2std (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 + restrict_3d_cc_rf2 (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); + + + +} // namespace CarpetLib + + + +#endif // #ifndef OPERATOR_PROTOTYPES_3D -- cgit v1.2.3