insert_knot_periodic_A_5_1 Subroutine
- Seyed Ali Ghasemi
- BSD 3-Clause
- 83 statements
public pure subroutine insert_knot_periodic_A_5_1(p, UP, Pw, u, k, s, r, nq, UQ, Qw, T)
Insert a knot while retaining a verified cyclic B-spline representation.
This is repeated Boehm insertion with Dierckx's periodic boundary update.
After each insertion, the exterior knots and repeated coefficient
rows on the affected side are regenerated from the opposite side of the
period. The result therefore satisfies periodic_topology rather than
merely preserving the mapping on the active interval. T, when requested,
includes these cyclic row identifications and satisfies
Qw=matmul(T,Pw).
The seam multiplicity must remain at most ; a full break
is not a periodic topology. Inputs and outputs follow the zero-based
bounds of insert_knot_A_5_1.
References:
- W. Boehm, "Inserting New Knots into B-Spline Curves," Computer-Aided Design 12 (1980), 199--201. doi:10.1016/0010-4485(80)90154-2.
- P. Dierckx, Curve and Surface Fitting with Splines, Oxford University Press, 1993, periodic knot insertion.
Arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | p |
Polynomial degree. |
||
| real(kind=rk), | intent(in), | contiguous | :: | UP(0:) |
Verified periodic knot vector. |
|
| real(kind=rk), | intent(in), | contiguous | :: | Pw(0:,:) |
Periodic homogeneous or polynomial control variables. |
|
| real(kind=rk), | intent(in) | :: | u |
Knot value in the active interval. |
||
| integer, | intent(in) | :: | k |
Initial zero-based span containing |
||
| integer, | intent(in) | :: | s |
Initial multiplicity of |
||
| integer, | intent(in) | :: | r |
Nonnegative insertion count. |
||
| integer, | intent(out) | :: | nq |
New highest zero-based control index. |
||
| real(kind=rk), | intent(out), | allocatable | :: | UQ(:) |
Refined periodic knot vector. |
|
| real(kind=rk), | intent(out), | allocatable | :: | Qw(:,:) |
Refined periodic control variables. |
|
| real(kind=rk), | intent(out), | optional, | allocatable | :: | T(:,:) |
Optional periodic refinement transformation. |