aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/prolongate_3d_real8_3tl_o3.F77
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/prolongate_3d_real8_3tl_o3.F77')
-rw-r--r--Carpet/CarpetLib/src/prolongate_3d_real8_3tl_o3.F7719
1 files changed, 11 insertions, 8 deletions
diff --git a/Carpet/CarpetLib/src/prolongate_3d_real8_3tl_o3.F77 b/Carpet/CarpetLib/src/prolongate_3d_real8_3tl_o3.F77
index 2ce036fea..b36f51439 100644
--- a/Carpet/CarpetLib/src/prolongate_3d_real8_3tl_o3.F77
+++ b/Carpet/CarpetLib/src/prolongate_3d_real8_3tl_o3.F77
@@ -1,5 +1,5 @@
c -*-Fortran-*-
-c $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/prolongate_3d_real8_3tl_o3.F77,v 1.7 2002/01/09 17:45:41 schnetter Exp $
+c $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/prolongate_3d_real8_3tl_o3.F77,v 1.8 2002/09/25 15:49:16 schnetter Exp $
#include "cctk.h"
@@ -15,14 +15,14 @@ c $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/prolongate_3d
integer srciext, srcjext, srckext
CCTK_REAL8 src1(srciext,srcjext,srckext)
- integer t1
+ CCTK_REAL8 t1
CCTK_REAL8 src2(srciext,srcjext,srckext)
- integer t2
+ CCTK_REAL8 t2
CCTK_REAL8 src3(srciext,srcjext,srckext)
- integer t3
+ CCTK_REAL8 t3
integer dstiext, dstjext, dstkext
CCTK_REAL8 dst(dstiext,dstjext,dstkext)
- integer t
+ CCTK_REAL8 t
c bbox(:,1) is lower boundary (inclusive)
c bbox(:,2) is upper boundary (inclusive)
c bbox(:,3) is stride
@@ -116,10 +116,13 @@ c Quadratic (second order) interpolation
if (t1.eq.t2 .or. t1.eq.t3 .or. t2.eq.t3) then
call CCTK_WARN (0, "Internal error: arrays have same time")
end if
+ if (t.lt.min(t1,t2,t3) .or. t.gt.max(t1,t2,t3)) then
+ call CCTK_WARN (0, "Internal error: extrapolation")
+ end if
- s1fac = (t - t2) * (t - t3) * one / ((t1 - t2) * (t1 - t3))
- s2fac = (t - t1) * (t - t3) * one / ((t2 - t1) * (t2 - t3))
- s3fac = (t - t1) * (t - t2) * one / ((t3 - t1) * (t3 - t2))
+ s1fac = (t - t2) * (t - t3) / ((t1 - t2) * (t1 - t3))
+ s2fac = (t - t1) * (t - t3) / ((t2 - t1) * (t2 - t3))
+ s3fac = (t - t1) * (t - t2) / ((t3 - t1) * (t3 - t2))