FindMult Function

private pure elemental function FindMult(me, i, u) result(mult)

Computes the multiplicity of a knot

Arguments

Type IntentOptional AttributesName
class(basis), intent(in) :: me
integer, intent(in) :: i

Starting index for search

real(kind=wp), intent(in) :: u

Given value

Return Value integer

Multiplicity of value


Calls

proc~~findmult~~CallsGraph proc~findmult FindMult ui ui proc~findmult->ui

Contents

Source Code


Source Code

        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