aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-10-09 23:10:57 -0500
committerErik Schnetter <schnetter@cct.lsu.edu>2008-10-09 23:10:57 -0500
commitbf4b44a12f0dfc2508b004c2bd9e063f65db72a5 (patch)
tree3c50d8ad8d42ed62c1c7dd636f387c87ba2342fb
parent742523fcf3c8c4816361b82cde00277cc1ae7d13 (diff)
parenta6a3b7903ae2c248848f95cbf8e0c0ed006d2028 (diff)
Merge branch 'master' of carpetgit@carpetcode.dyndns.org:carpet
-rw-r--r--Carpet/CarpetLib/src/prolongate_3d_real8_eno.F9012
1 files changed, 10 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/prolongate_3d_real8_eno.F90 b/Carpet/CarpetLib/src/prolongate_3d_real8_eno.F90
index b29b21580..4b5be092e 100644
--- a/Carpet/CarpetLib/src/prolongate_3d_real8_eno.F90
+++ b/Carpet/CarpetLib/src/prolongate_3d_real8_eno.F90
@@ -40,6 +40,8 @@ function eno1d(q)
CCTK_REAL8 :: diffleft, diffright
!!$ Directly find the second undivided differences
+!!$ We need to pick between discrete values at
+!!$ 1 2 3 4 for the interpolation between 2 and 3.
diffleft = q(1) + q(3) - two * q(2)
diffright = q(2) + q(4) - two * q(3)
@@ -58,9 +60,15 @@ function eno1d(q)
end if
-!!$ Check that the quadratic is reasonable
+!!$ Check that the quadratic is reasonable:
+!!$ Check 1: interpolated value between
+!!$ values at interpolation points
+!!$ Check 2: sign of the curvature of the interpolating
+!!$ polynomial does not change.
- if ( (eno1d-q(2)) * (q(3)-eno1d) .lt. zero ) then
+ if ( ((eno1d-q(2)) * (q(3)-eno1d) .lt. zero) &
+ .or. &
+ (diffleft*diffright .le. zero) ) then
!!$ Not reasonable. Linear interpolation