insert_knot_A_5_1 Subroutine
- Seyed Ali Ghasemi
- BSD 3-Clause
- 126 statements
public pure recursive subroutine insert_knot_A_5_1(p, UP, Pw, u, k, s, r, nq, UQ, Qw, T)
Insert a knot without changing the represented homogeneous geometry.
For s+r<=p, this is Algorithm A5.1 of Piegl and Tiller, equivalent to
repeated Boehm knot insertion. The s+r=p+1 extension first applies the
standard insertion through multiplicity , then duplicates the
interface control row to represent the same two one-sided pieces in a
discontinuous space. Arrays use the algorithm's zero-based
bounds. When requested, T satisfies Qw=matmul(T,Pw) and can transform
any field in the same spline space. r=0 returns the exact identity
operation.
Arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | p |
Polynomial degree. |
||
| real(kind=rk), | intent(in), | contiguous | :: | UP(0:) |
Original valid knot vector, lower bound zero. |
|
| real(kind=rk), | intent(in), | contiguous | :: | Pw(0:,:) |
Original homogeneous or polynomial control variables by row. |
|
| real(kind=rk), | intent(in) | :: | u |
Knot value to insert. |
||
| integer, | intent(in) | :: | k |
Zero-based span containing |
||
| integer, | intent(in) | :: | s |
Existing multiplicity of |
||
| integer, | intent(in) | :: | r |
Number of insertions, satisfying |
||
| integer, | intent(out) | :: | nq |
New highest zero-based control index; |
||
| real(kind=rk), | intent(out), | allocatable | :: | UQ(:) |
Refined knot vector. |
|
| real(kind=rk), | intent(out), | allocatable | :: | Qw(:,:) |
Refined control variables. |
|
| real(kind=rk), | intent(out), | optional, | allocatable | :: | T(:,:) |
Optional refinement transformation. |