aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/prolongate_3d_real8_2tl.F77
diff options
context:
space:
mode:
authorschnetter <>2002-09-25 13:49:00 +0000
committerschnetter <>2002-09-25 13:49:00 +0000
commit1d0ee03fc1c94142dbb6fbf62de34231ea30d8f1 (patch)
tree97ad3e4d47a332592047641058e1b86f8a921391 /Carpet/CarpetLib/src/prolongate_3d_real8_2tl.F77
parent9c083ff8ffda75d10f8e2485709079a1b29642a2 (diff)
Changed the variable types for the time from int to real. This allows
Changed the variable types for the time from int to real. This allows more flexibility for time interpolation. The time interpolators now accept an explicit argument for the current time, instead of using the current time from the time hierarchy. This allows arbitrary current times, which are necessary for the intermediate time steps for time interpolators. The times that are interpolated _from_ still come from the time hierarchy. darcs-hash:20020925134915-07bb3-26927a425ca5c0b52a2ca02bc54673c4b9e1781e.gz
Diffstat (limited to 'Carpet/CarpetLib/src/prolongate_3d_real8_2tl.F77')
-rw-r--r--Carpet/CarpetLib/src/prolongate_3d_real8_2tl.F7715
1 files changed, 9 insertions, 6 deletions
diff --git a/Carpet/CarpetLib/src/prolongate_3d_real8_2tl.F77 b/Carpet/CarpetLib/src/prolongate_3d_real8_2tl.F77
index 6cb18abbb..46979c219 100644
--- a/Carpet/CarpetLib/src/prolongate_3d_real8_2tl.F77
+++ b/Carpet/CarpetLib/src/prolongate_3d_real8_2tl.F77
@@ -1,5 +1,5 @@
c -*-Fortran-*-
-c $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/prolongate_3d_real8_2tl.F77,v 1.5 2002/01/09 17:45:41 schnetter Exp $
+c $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/prolongate_3d_real8_2tl.F77,v 1.6 2002/09/25 15:49:16 schnetter Exp $
#include "cctk.h"
@@ -15,12 +15,12 @@ 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
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
@@ -105,9 +105,12 @@ c Linear (first order) interpolation
if (t1.eq.t2) then
call CCTK_WARN (0, "Internal error: arrays have same time")
end if
+ if (t.lt.min(t1,t2) .or. t.gt.max(t1,t2)) then
+ call CCTK_WARN (0, "Internal error: extrapolation")
+ end if
- s1fac = (t - t2) * one / (t1 - t2)
- s2fac = (t - t1) * one / (t2 - t1)
+ s1fac = (t - t2) / (t1 - t2)
+ s2fac = (t - t1) / (t2 - t1)