#include "implicit_f.inc"
Go to the source code of this file.
|
| subroutine | interp (tf, tt, npoint, f, tg) |
◆ interp()
| subroutine interp |
( |
| tf, |
|
|
| tt, |
|
|
integer | npoint, |
|
|
| f, |
|
|
| tg ) |
Definition at line 34 of file interp.F.
35
36
37
38#include "implicit_f.inc"
39
40
41
42 INTEGER NPOINT
45
46
47
48 INTEGER I, M
50
51 IF (tt-tf(1,npoint)>zero) GO TO 50
52 DO 20 i=2,npoint
53 m=i
54 IF (tt-tf(1,m)<=zero) GO TO 30
55 20 CONTINUE
56 50 f=zero
57 tg=zero
58 RETURN
59 30 dt1=tt-tf(1,m-1)
60 dt2=-tt+tf(1,m)
61 d1=tf(1,m)-tf(1,m-1)
62 d2=tf(2,m)-tf(2,m-1)
63 tg=zero
64 IF(d1/=zero)tg=d2/d1
65
66 IF(dt1<=dt2)THEN
67 f =tf(2,m-1)+dt1*tg
68 ELSE
69 f =tf(2,m)-dt2*tg
70 ENDIF
71 RETURN