aboutsummaryrefslogtreecommitdiff
path: root/math/deboor/l2knts.f
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /math/deboor/l2knts.f
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'math/deboor/l2knts.f')
-rw-r--r--math/deboor/l2knts.f33
1 files changed, 33 insertions, 0 deletions
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