From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- math/deboor/l2knts.f | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 math/deboor/l2knts.f (limited to 'math/deboor/l2knts.f') diff --git a/math/deboor/l2knts.f b/math/deboor/l2knts.f new file mode 100644 index 00000000..5f11b1e4 --- /dev/null +++ b/math/deboor/l2knts.f @@ -0,0 +1,33 @@ + subroutine l2knts ( break, l, k, t, n ) +c from * a practical guide to splines * by c. de boor +c to be called in main program l 2 m a i n . +converts the breakpoint sequence b r e a k into a corresponding knot +c sequence t to allow the repr. of a pp function of order k with +c k-2 continuous derivatives as a spline of order k with knot +c sequence t . this means that +c t(1), ..., t(n+k) = break(1) k times, then break(i), i=2,...,l, each +c once, then break(l+1) k times . +c therefore, n = k-1 + l. +c +c****** i n p u t ****** +c k the order +c l the number of polynomial pieces +c break(1), ...,break(l+1) the breakpoint sequence +c +c****** o u t p u t ****** +c t(1),...,t(n+k) the knot sequence +c n the dimension of the corresp. spline space of order k . +c + integer k,l,n, i,km1 + real break(1),t(1) +c dimension break(l+1),t(n+k) + km1 = k - 1 + do 5 i=1,km1 + 5 t(i) = break(1) + do 6 i=1,l + 6 t(km1+i) = break(i) + n = km1 + l + do 7 i=1,k + 7 t(n+i) = break(l+1) + return + end -- cgit