aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src
diff options
context:
space:
mode:
authorhawke <>2004-03-03 14:30:00 +0000
committerhawke <>2004-03-03 14:30:00 +0000
commit64274ad05dc5a1a146f89af01cd448ee872ce920 (patch)
treed0bbc60562fe1f7a7e3234e067faf3c2f38e8e0b /Carpet/CarpetLib/src
parent9d21cbc634dc3e49a0430023bfdb3deca44f6fd0 (diff)
Essentially Non-Oscillatory prolongation operators. Again intended for
Essentially Non-Oscillatory prolongation operators. Again intended for use with things like hydro. As with the minmod operators, there seems to be small spikes at grid boundaries. The advantage of these is that they should be smoother than minmod, fitting the least oscillatory quadratic (switches to linear if best quadratic not monotone). Massively untested though. darcs-hash:20040303143040-58737-4c3c6aff889bac7a407ef3992d8fe12c45805735.gz
Diffstat (limited to 'Carpet/CarpetLib/src')
-rw-r--r--Carpet/CarpetLib/src/data.cc99
1 files changed, 98 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/data.cc b/Carpet/CarpetLib/src/data.cc
index 42db87557..b4f4c20c5 100644
--- a/Carpet/CarpetLib/src/data.cc
+++ b/Carpet/CarpetLib/src/data.cc
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/data.cc,v 1.44 2004/03/03 09:22:30 hawke Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/data.cc,v 1.45 2004/03/03 15:30:40 hawke Exp $
#include <assert.h>
#include <limits.h>
@@ -626,6 +626,14 @@ extern "C" {
const int srcbbox[3][3],
const int dstbbox[3][3],
const int regbbox[3][3]);
+ void CCTK_FCALL CCTK_FNAME(prolongate_3d_real8_eno)
+ (const CCTK_REAL8* src,
+ const int& srciext, const int& srcjext, const int& srckext,
+ CCTK_REAL8* dst,
+ const int& dstiext, const int& dstjext, const int& dstkext,
+ const int srcbbox[3][3],
+ const int dstbbox[3][3],
+ const int regbbox[3][3]);
void CCTK_FCALL CCTK_FNAME(prolongate_3d_real8_o5)
(const CCTK_REAL8* src,
const int& srciext, const int& srcjext, const int& srckext,
@@ -680,6 +688,15 @@ extern "C" {
const int srcbbox[3][3],
const int dstbbox[3][3],
const int regbbox[3][3]);
+ void CCTK_FCALL CCTK_FNAME(prolongate_3d_real8_2tl_eno)
+ (const CCTK_REAL8* src1, const CCTK_REAL8& t1,
+ const CCTK_REAL8* src2, const CCTK_REAL8& t2,
+ const int& srciext, const int& srcjext, const int& srckext,
+ CCTK_REAL8* dst, const CCTK_REAL8& t,
+ const int& dstiext, const int& dstjext, const int& dstkext,
+ const int srcbbox[3][3],
+ const int dstbbox[3][3],
+ const int regbbox[3][3]);
void CCTK_FCALL CCTK_FNAME(prolongate_3d_real8_2tl_o5)
(const CCTK_REAL8* src1, const CCTK_REAL8& t1,
const CCTK_REAL8* src2, const CCTK_REAL8& t2,
@@ -740,6 +757,16 @@ extern "C" {
const int srcbbox[3][3],
const int dstbbox[3][3],
const int regbbox[3][3]);
+ void CCTK_FCALL CCTK_FNAME(prolongate_3d_real8_3tl_eno)
+ (const CCTK_REAL8* src1, const CCTK_REAL8& t1,
+ const CCTK_REAL8* src2, const CCTK_REAL8& t2,
+ const CCTK_REAL8* src3, const CCTK_REAL8& t3,
+ const int& srciext, const int& srcjext, const int& srckext,
+ CCTK_REAL8* dst, const CCTK_REAL8& t,
+ const int& dstiext, const int& dstjext, const int& dstkext,
+ const int srcbbox[3][3],
+ const int dstbbox[3][3],
+ const int regbbox[3][3]);
void CCTK_FCALL CCTK_FNAME(prolongate_3d_real8_3tl_o5)
(const CCTK_REAL8* src1, const CCTK_REAL8& t1,
const CCTK_REAL8* src2, const CCTK_REAL8& t2,
@@ -851,6 +878,7 @@ void data<CCTK_REAL8,3>
case op_Lagrange:
case op_TVD:
+ case op_ENO:
assert (srcs.size() == 1);
if (all (dext.stride() == sext.stride() * 2)) {
CCTK_FNAME(restrict_3d_real8_rf2)
@@ -1153,6 +1181,75 @@ void data<CCTK_REAL8,3>
} // switch (order_time)
break;
+ case op_ENO:
+ switch (order_time) {
+ case 0:
+ assert (times.size() == 1);
+ assert (abs(times[0] - time) < eps);
+ switch (order_space) {
+ case 0:
+ case 1:
+ CCTK_WARN (0, "There is no stencil for op=\"ENO\" with order_space=1");
+ break;
+ case 2:
+ case 3:
+ CCTK_FNAME(prolongate_3d_real8_eno)
+ ((const CCTK_REAL8*)srcs[0]->storage(),
+ srcshp[0], srcshp[1], srcshp[2],
+ (CCTK_REAL8*)storage(),
+ dstshp[0], dstshp[1], dstshp[2],
+ srcbbox, dstbbox, regbbox);
+ break;
+ default:
+ assert (0);
+ }
+ break;
+ case 1:
+ switch (order_space) {
+ case 0:
+ case 1:
+ CCTK_WARN (0, "There is no stencil for op=\"ENO\" with order_space=1");
+ break;
+ case 2:
+ case 3:
+ CCTK_FNAME(prolongate_3d_real8_2tl_eno)
+ ((const CCTK_REAL8*)srcs[0]->storage(), times[0],
+ (const CCTK_REAL8*)srcs[1]->storage(), times[1],
+ srcshp[0], srcshp[1], srcshp[2],
+ (CCTK_REAL8*)storage(), time,
+ dstshp[0], dstshp[1], dstshp[2],
+ srcbbox, dstbbox, regbbox);
+ break;
+ default:
+ assert (0);
+ }
+ break;
+ case 2:
+ switch (order_space) {
+ case 0:
+ case 1:
+ CCTK_WARN (0, "There is no stencil for op=\"ENO\" with order_space=1");
+ break;
+ case 2:
+ case 3:
+ CCTK_FNAME(prolongate_3d_real8_3tl_eno)
+ ((const CCTK_REAL8*)srcs[0]->storage(), times[0],
+ (const CCTK_REAL8*)srcs[1]->storage(), times[1],
+ (const CCTK_REAL8*)srcs[2]->storage(), times[2],
+ srcshp[0], srcshp[1], srcshp[2],
+ (CCTK_REAL8*)storage(), time,
+ dstshp[0], dstshp[1], dstshp[2],
+ srcbbox, dstbbox, regbbox);
+ break;
+ default:
+ assert (0);
+ }
+ break;
+ default:
+ assert (0);
+ } // switch (order_time)
+ break;
+
default:
assert(0);
} // switch (transport_operator)