19 |
|
|
20 |
! "vs" has rank 1. |
! "vs" has rank 1. |
21 |
|
|
22 |
use nrutil, only: assert_eq |
use numer_rec, only: assert_eq, hunt !!, polint |
|
use interpolation, only: hunt, polint |
|
23 |
|
|
24 |
real, intent(in):: vs(:) |
real, intent(in):: vs(:) |
25 |
! (values of the function at source points "xs") |
! (values of the function at source points "xs") |
45 |
do it = 1, size(xt) |
do it = 1, size(xt) |
46 |
call hunt(xs, xt(it), is) |
call hunt(xs, xt(it), is) |
47 |
is_b = min(max(is, 1), ns - 1) |
is_b = min(max(is, 1), ns - 1) |
48 |
call polint(xs(is_b:is_b+1), vs(is_b:is_b+1), xt(it), vt(it)) |
!! call polint(xs(is_b:is_b+1), vs(is_b:is_b+1), xt(it), vt(it)) |
49 |
!!$ vt(it) = ((xs(is_b+1) - xt(it)) * vs(is_b) & |
vt(it) = ((xs(is_b+1) - xt(it)) * vs(is_b) & |
50 |
!!$ + (xt(it) - xs(is_b)) * vs(is_b+1)) / (xs(is_b+1) - xs(is_b)) |
+ (xt(it) - xs(is_b)) * vs(is_b+1)) / (xs(is_b+1) - xs(is_b)) |
51 |
end do |
end do |
52 |
|
|
53 |
end function regr11_lint |
end function regr11_lint |
58 |
|
|
59 |
! "vs" has rank 2. |
! "vs" has rank 2. |
60 |
|
|
61 |
use nrutil, only: assert_eq |
use numer_rec, only: assert_eq, hunt |
|
use interpolation, only: hunt |
|
62 |
|
|
63 |
real, intent(in):: vs(:, :) |
real, intent(in):: vs(:, :) |
64 |
! (values of the function at source points "xs") |
! (values of the function at source points "xs") |