V3FIT
splbrk.f
1 C--------------------------------------------------------------------
2 C SPLBRK -- make a spline with a break (C0 only) at specified locn
3 C
4  SUBROUTINE splbrk (IOPT, N, NBRK, X, Y, B, C, D)
5 C
6 C Spline the whole interval, and then respline a subinterval, saving
7 C the endpt coeffs from the original spline.
8 C
9 C Result is a spline that is C2 everywhere except C0 only at one
10 C interior break point.
11 C
12 C IOPT=0 use SPLAAN for dy/dx=0 at LHS bc
13 C IOPT=1 use SPLINE for standard bc
14 C
15 C N -- no. of data pts
16 C NBRK -- break point
17 C
18  real X(N),Y(N),B(N),C(N),D(N)
19 C
20  if(iopt.eq.0) then
21  call splaan(n, x, y, b, c, d)
22  else
23  call spline_ez1(n, x, y, b, c, d)
24  endif
25 C
26  bsave=b(nbrk)
27  csave=c(nbrk)
28  dsave=d(nbrk)
29 C
30  call nspline(nbrk, x, y, b, c, d)
31 C
32  b(nbrk)=bsave
33  c(nbrk)=csave
34  d(nbrk)=dsave
35 C
36  return
37  end