Computes the multiplicity of a knot
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(basis), | intent(in) | :: | me | |||
integer, | intent(in) | :: | i | Starting index for search |
||
real(kind=wp), | intent(in) | :: | u | Given value |
Multiplicity of value
pure elemental function FindMult(me,i,u) result (mult)
class(basis), intent(in) :: me
real(wp), intent(in) :: u !< Given \( u \) value
integer, intent(in) :: i !< Starting index for search
integer :: mult !< Multiplicity of \( u \) value
!locals
integer :: j
associate( p => me%p, Ui => me%kv )
mult = 0
do j = -p, p+1
if (u == Ui(i+j)) mult = mult + 1
end do
end associate
end function FindMult