************80
! EVNNOT is a version of NEWNOT returning uniform knots.
Discussion:
EVNNOT returns LNEW+1 knots in BRKNEW which are evenly spaced between
BREAK(1) and BREAK(L+1).
Modified:
14 February 2007
Author:
Carl DeBoor
Reference:
Carl DeBoor,
A Practical Guide to Splines,
Springer, 2001,
ISBN: 0387953663,
LC: QA1.A647.v27.
Parameters:
Input, real ( kind = 8 ) BREAK(L+1), real ( kind = 8 ) COEF(K,L),
integer ( kind = 4 ) L, integer K, the piecewise polynomial representation
of a certain function F of order K. Specifically,
d**(K-1) F(X) = COEF(K,I) for BREAK(I) <= X < BREAK(I+1).
Input, integer ( kind = 4 ) LNEW, the number of subintervals into which
the interval (A,B) is to be sectioned by the new breakpoint
sequence BRKNEW.
Output, real ( kind = 8 ) BRKNEW(LNEW+1), the new breakpoints.
Output, real (kind = 8 ) COEFG(2,L), the coefficient part of the
piecewise polynomial representation BREAK, COEFG, L, 2 for the monotone
piecewise linear function G with respect to which BRKNEW will
be equidistributed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=8) | :: | break(l+1) | ||||
real(kind=8) | :: | coef(k,l) | ||||
integer(kind=4) | :: | l | ||||
integer(kind=4) | :: | k | ||||
real(kind=8) | :: | brknew(lnew+1) | ||||
integer(kind=4) | :: | lnew | ||||
real(kind=8) | :: | coefg(2,l) |
subroutine evnnot ( break, coef, l, k, brknew, lnew, coefg ) !*****************************************************************************80 ! !! EVNNOT is a version of NEWNOT returning uniform knots. ! ! Discussion: ! ! EVNNOT returns LNEW+1 knots in BRKNEW which are evenly spaced between ! BREAK(1) and BREAK(L+1). ! ! Modified: ! ! 14 February 2007 ! ! Author: ! ! Carl DeBoor ! ! Reference: ! ! Carl DeBoor, ! A Practical Guide to Splines, ! Springer, 2001, ! ISBN: 0387953663, ! LC: QA1.A647.v27. ! ! Parameters: ! ! Input, real ( kind = 8 ) BREAK(L+1), real ( kind = 8 ) COEF(K,L), ! integer ( kind = 4 ) L, integer K, the piecewise polynomial representation ! of a certain function F of order K. Specifically, ! d**(K-1) F(X) = COEF(K,I) for BREAK(I) <= X < BREAK(I+1). ! ! Input, integer ( kind = 4 ) LNEW, the number of subintervals into which ! the interval (A,B) is to be sectioned by the new breakpoint ! sequence BRKNEW. ! ! Output, real ( kind = 8 ) BRKNEW(LNEW+1), the new breakpoints. ! ! Output, real (kind = 8 ) COEFG(2,L), the coefficient part of the ! piecewise polynomial representation BREAK, COEFG, L, 2 for the monotone ! piecewise linear function G with respect to which BRKNEW will ! be equidistributed. ! implicit none integer ( kind = 4 ) k integer ( kind = 4 ) l integer ( kind = 4 ) lnew real ( kind = 8 ) break(l+1) real ( kind = 8 ) brknew(lnew+1) real ( kind = 8 ) coef(k,l) real ( kind = 8 ) coefg(2,l) integer ( kind = 4 ) i coefg(2,l) = 0.0D+00 if ( lnew == 0 ) then brknew(1) = 0.5D+00 * ( break(1) + break(l+1) ) else do i = 1, lnew + 1 brknew(i) = ( real ( lnew - i + 1, kind = 8 ) * break(1) & + real ( i - 1, kind = 8 ) * break(l+1) ) & / real ( lnew, kind = 8 ) end do end if return end subroutine evnnot