V3FIT
r8gridpc1.f
1  subroutine r8gridpc1(x_newgrid,nx_new,f_new,nx,xpkg,fspl,
2  > iwarn,ier)
3 c
4 c regrid a piecewise linear function f defined vs. x as in xpkg
5 c to a new grid, given by x_newgrid.
6 c
7 c set warning flag if the range x_newgrid exceeds the range of the
8 c original xpkg.
9 c
10 c (xpkg -- see genxpkg subroutine)
11 c
12 c input:
13 c
14 !============
15 ! idecl: explicitize implicit INTEGER declarations:
16  IMPLICIT NONE
17  INTEGER, PARAMETER :: R8=selected_real_kind(12,100)
18  INTEGER nx_new
19 !============
20  real*8 x_newgrid(nx_new) ! new grid
21 c
22 c output:
23 c
24  real*8 f_new(nx_new) ! f evaluated on this grid
25 c
26 c input:
27 c
28  integer nx ! size of old grid
29  real*8 xpkg(nx,4) ! old grid "package"
30  real*8 fspl(nx) ! the function data
31 c
32 c output:
33 c condition codes, =0 for normal exit
34 c
35  integer iwarn ! =1 if new grid points out of range
36  integer ier ! =1 if there is an argument error
37 c
38 c--------------------------------------------
39 c local
40 c
41  integer ict(2)
42 c
43  data ict/1,0/
44 c
45 c--------------------------------------------
46 c
47  call r8vecpc1(ict,nx_new,x_newgrid,nx_new,f_new,nx,xpkg,fspl,
48  > iwarn,ier)
49 c
50  return
51  end