GrevilleAbscissae Function

private pure function GrevilleAbscissae(me, dsc) result(pt)

Return the Greville abscissae, , of the knot vector,

Arguments

Type IntentOptional AttributesName
class(basis), intent(in) :: me
logical, intent(in), optional :: dsc

If true, then the Greville abscissae are modified by shifting the boundary points into the domain

Return Value real(kind=wp) (0:me%n)

The array containing Greville abscissae


Calls

proc~~grevilleabscissae~~CallsGraph proc~grevilleabscissae GrevilleAbscissae proc~sort sort proc~grevilleabscissae->proc~sort proc~sort->proc~sort split split proc~sort->split head head proc~sort->head tail tail proc~sort->tail

Contents

Source Code


Source Code

        pure function GrevilleAbscissae(me,dsc) result(pt)
            class(basis), intent(in)        :: me
            logical, optional, intent(in)   :: dsc          !< If true, then the Greville abscissae are modified 
                                                            !< by shifting the boundary points into the domain
            real(wp)                        :: pt(0:me%n)   !< The array containing Greville abscissae
            ! locals
            integer :: i, iak(2), L, li
            real(wp) :: kseq(0:me%n+me%nk), sm(2), ak(2)  

            forall(i=0:me%n) pt(i) = sum(me%kv(i+1:i+me%p))/me%p

            if(present(dsc))then
                if(dsc)then

                kseq(0:me%n)=pt
                kseq(me%n+1:)=me%kv
                kseq = sort(kseq)
                iak(1) = me%p+1; iak(2) = 2*me%nb-1
                L = 1; if(me%p>3) L=2
                sm = 0.0_wp
                do li = 1,L
                    do i=1,2
                        sm(i) = sm(i) + kseq(iak(i)-li) + kseq(iak(i)+li) - 2 * kseq(iak(i))
                    end do
                end do
                ak = sm / (2*L + 1)
                pt(0) = pt(0) + ak(1) 
                pt(me%n) = pt(me%n) + ak(2) 
                end if
            end if

        end function GrevilleAbscissae