Skip to content
ForCADDocumentation

compute_knot_vector Function

public pure function compute_knot_vector(Xth_dir, degree, continuity) result(knot)

Construct a knot vector from breakpoints and requested continuity.

Breakpoint Xth_dir(i) is repeated degree-continuity(i) times. Thus an interior continuity has multiplicity ; clamped endpoints use continuity=-1 and therefore multiplicity . continuity=degree omits that breakpoint. Values are not checked for finiteness or ordering and are not sorted or normalized by this routine. To construct a standard valid knot vector, supply nondecreasing finite breakpoints and use for retained knots, then validate the resulting spline space. Values below -1 produce multiplicity greater than and are not rejected here.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), contiguous :: Xth_dir(:)

Ordered breakpoint values.

integer, intent(in) :: degree

Nonnegative polynomial degree .

integer, intent(in), contiguous :: continuity(:)

Repetition specification for every breakpoint. Shape mismatch, negative degree, or any value greater than degree returns an allocated empty vector.

Return Value real(kind=rk), allocatable, (:)