aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/prolongate_3d_cc_eno_rf2.cc
diff options
context:
space:
mode:
authorChristian Reisswig <reisswig@tapir.caltech.edu>2011-06-11 11:27:23 -0700
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 18:26:29 +0000
commit539e5cecb0bc4c41694389160c2790660212f25a (patch)
treefe4485c9db0f6798635851675624029d535cb221 /Carpet/CarpetLib/src/prolongate_3d_cc_eno_rf2.cc
parent02b7f7c4dab0d4bbb281c544439362379d77bd25 (diff)
Select 2nd order cc-eno for 3rd order interpolation since stencil radius is larger.
This is consistent with vertex-centered eno. The trouble is that Carpet derives the stencil radius from the interpolation order imposing Lagrange interpolation. I also commented out the code that checks whether we have to switch down to first order. According to Shu, this is not necessary! This way interpolation runs faster.
Diffstat (limited to 'Carpet/CarpetLib/src/prolongate_3d_cc_eno_rf2.cc')
-rw-r--r--Carpet/CarpetLib/src/prolongate_3d_cc_eno_rf2.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/Carpet/CarpetLib/src/prolongate_3d_cc_eno_rf2.cc b/Carpet/CarpetLib/src/prolongate_3d_cc_eno_rf2.cc
index 0ebb2f03d..aefdeb5d7 100644
--- a/Carpet/CarpetLib/src/prolongate_3d_cc_eno_rf2.cc
+++ b/Carpet/CarpetLib/src/prolongate_3d_cc_eno_rf2.cc
@@ -289,7 +289,7 @@ namespace CarpetLib {
}
// check that divided differences do not change sign: if so go back to first order!
- if (lV*rV <= 0)
+ /*if (lV*rV <= 0)
{
// switch back to first order!
res = 0;
@@ -298,7 +298,7 @@ namespace CarpetLib {
res += coeffs1::get(i) * f[i-coeffs1d<RT,ORDER,di>::minimin];
}
break;
- }
+ }*/
if (abs(lV) < abs(rV)) {
// use left-shifted stencil since it is smoother
@@ -338,7 +338,7 @@ namespace CarpetLib {
}
// check that divided differences do not change sign: if so go back to first order!
- if (V[0]*V[2] <= 0)
+ /*if (V[0]*V[2] <= 0)
{
// switch back to first order!
res = 0;
@@ -347,7 +347,7 @@ namespace CarpetLib {
res += coeffs1::get(i) * f[i-coeffs1d<RT,ORDER,di>::minimin];
}
break;
- }
+ }*/
int min = 0;
for (int i=0; i < 3; ++i)
@@ -379,7 +379,7 @@ namespace CarpetLib {
}
// check that result is reasonable!
- if ((res - f[-coeffs1d<RT,ORDER,di>::minimin-1+di]) * (f[-coeffs1d<RT,ORDER,di>::minimin+di] - res) < 0)
+ /*if ((res - f[-coeffs1d<RT,ORDER,di>::minimin-1+di]) * (f[-coeffs1d<RT,ORDER,di>::minimin+di] - res) < 0)
{
res = 0;
// switch back to first order
@@ -387,7 +387,7 @@ namespace CarpetLib {
for (ptrdiff_t i=coeffs1::imin; i<coeffs1::imax; ++i) {
res += coeffs1::get(i) * f[i-coeffs1d<RT,ORDER,di>::minimin];
}
- }
+ }*/
/*typedef coeffs1d<RT,1,di> coeffs;
for (ptrdiff_t i=coeffs::imin; i<coeffs::imax; ++i) {
@@ -449,7 +449,7 @@ namespace CarpetLib {
}
// check that divided differences do not change sign: if so go back to first order!
- if (lV*rV <= 0)
+ /*if (lV*rV <= 0)
{
// switch back to first order!
res = 0;
@@ -458,7 +458,7 @@ namespace CarpetLib {
res += coeffs1::get(i) * f[i-coeffs1d<RT,ORDER,dj>::minimin];
}
break;
- }
+ }*/
if (abs(lV) < abs(rV)) {
// use left-shifted stencil since it is smoother
@@ -496,7 +496,7 @@ namespace CarpetLib {
}
// check that divided differences do not change sign: if so go back to first order!
- if (V[0]*V[2] <= 0)
+ /*if (V[0]*V[2] <= 0)
{
// switch back to first order!
res = 0;
@@ -505,7 +505,7 @@ namespace CarpetLib {
res += coeffs1::get(i) * f[i-coeffs1d<RT,ORDER,dj>::minimin];
}
break;
- }
+ }*/
int min = 0;
for (int i=0; i < 3; ++i)
@@ -537,7 +537,7 @@ namespace CarpetLib {
}
// check that result is reasonable!
- if ((res - f[-coeffs1d<RT,ORDER,dj>::minimin-1+dj]) * (f[-coeffs1d<RT,ORDER,dj>::minimin+dj] - res) < 0)
+ /*if ((res - f[-coeffs1d<RT,ORDER,dj>::minimin-1+dj]) * (f[-coeffs1d<RT,ORDER,dj>::minimin+dj] - res) < 0)
{
res = 0;
// switch back to first order
@@ -545,7 +545,7 @@ namespace CarpetLib {
for (ptrdiff_t i=coeffs1::imin; i<coeffs1::imax; ++i) {
res += coeffs1::get(i) * f[i-coeffs1d<RT,ORDER,dj>::minimin];
}
- }
+ }*/
/*typedef coeffs1d<RT,1,dj> coeffs;
for (ptrdiff_t i=coeffs::imin; i<coeffs::imax; ++i) {
@@ -609,7 +609,7 @@ namespace CarpetLib {
}
// check that divided differences do not change sign: if so go back to first order!
- if (lV*rV <= 0)
+ /*if (lV*rV <= 0)
{
// switch back to first order!
res = 0;
@@ -618,7 +618,7 @@ namespace CarpetLib {
res += coeffs1::get(i) * f[i-coeffs1d<RT,ORDER,dk>::minimin];
}
break;
- }
+ }*/
if (abs(lV) < abs(rV)) {
// use left-shifted stencil since it is smoother
@@ -656,7 +656,7 @@ namespace CarpetLib {
}
// check that divided differences do not change sign: if so go back to first order!
- if (V[0]*V[2] <= 0)
+ /*if (V[0]*V[2] <= 0)
{
// switch back to first order!
res = 0;
@@ -665,7 +665,7 @@ namespace CarpetLib {
res += coeffs1::get(i) * f[i-coeffs1d<RT,ORDER,dk>::minimin];
}
break;
- }
+ }*/
int min = 0;
for (int i=0; i < 3; ++i)
@@ -697,7 +697,7 @@ namespace CarpetLib {
}
// check that result is reasonable!
- if ((res - f[-coeffs1d<RT,ORDER,dk>::minimin-1+dk]) * (f[-coeffs1d<RT,ORDER,dk>::minimin+dk] - res) < 0)
+ /*if ((res - f[-coeffs1d<RT,ORDER,dk>::minimin-1+dk]) * (f[-coeffs1d<RT,ORDER,dk>::minimin+dk] - res) < 0)
{
res = 0;
// switch back to first order
@@ -705,7 +705,7 @@ namespace CarpetLib {
for (ptrdiff_t i=coeffs1::imin; i<coeffs1::imax; ++i) {
res += coeffs1::get(i) * f[i-coeffs1d<RT,ORDER,dk>::minimin];
}
- }
+ }*/
/*typedef coeffs1d<RT,1,dk> coeffs;
for (ptrdiff_t i=coeffs::imin; i<coeffs::imax; ++i) {