diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-10-09 23:10:57 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-10-09 23:10:57 -0500 |
commit | bf4b44a12f0dfc2508b004c2bd9e063f65db72a5 (patch) | |
tree | 3c50d8ad8d42ed62c1c7dd636f387c87ba2342fb | |
parent | 742523fcf3c8c4816361b82cde00277cc1ae7d13 (diff) | |
parent | a6a3b7903ae2c248848f95cbf8e0c0ed006d2028 (diff) |
Merge branch 'master' of carpetgit@carpetcode.dyndns.org:carpet
-rw-r--r-- | Carpet/CarpetLib/src/prolongate_3d_real8_eno.F90 | 12 |
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 |