get_nquad Function

private pure elemental function get_nquad(me, key, reduced_int, pdeq) result(ngp)

Return the number of quadrature points for a successive integration

Arguments

Type IntentOptional AttributesName
class(basis), intent(in) :: me
character(len=*), intent(in), optional :: key

The key defining whether the quadrature is over the Bezier segments or over whole patch
Valid inputs:
- "elementwise"
- "patchwise"

logical, intent(in), optional :: reduced_int

Reduced integration flag, if true, the routine will return
the number of quadrature points for reduced integration

character(len=*), intent(in), optional :: pdeq

Internal name of the relevant partial differential equation
Valid inputs:
- "Timoshenko"
- "Mindlin"
- "Shell"

Return Value integer


Contents

Source Code


Source Code

        pure elemental function get_nquad(me,key,reduced_int,pdeq) result(ngp)
            class(basis),intent(in)  :: me
            character(*),intent(in),optional :: key         !< The key defining whether the quadrature is over the Bezier segments or over whole patch  
                                                            !< Valid inputs:  
                                                            !< - ` "elementwise" `     
                                                            !< - ` "patchwise" `  
            logical,intent(in),optional :: reduced_int      !< Reduced integration flag, if true, the routine will return  
                                                            !< the number of quadrature points for reduced integration  
            character(*),intent(in),optional :: pdeq        !< Internal name of the relevant partial differential equation  
                                                            !< Valid inputs:  
                                                            !< - ` "Timoshenko" `  
                                                            !< - ` "Mindlin" `  
                                                            !< - ` "Shell" `  
            !locals
            logical :: r
            integer :: ngp, roi, ngpl

            r=.false.
            
            if(present(pdeq))then
                if((pdeq .iseq. "mindlin") .or. (pdeq .iseq. "shell"))then
                    if(me%p==1)then
                        roi=1; ngpl=2
                    elseif(me%p==2)then
                        roi=2; ngpl=3    
                    elseif(me%p==3)then
                        roi=3; ngpl=3    
                    elseif(me%p==4)then
                        roi=4; ngpl=4      
                    elseif(me%p==5)then
                        roi=4; ngpl=4 
                    elseif(me%p==6)then
                        roi=5; ngpl=5  
                    else
                        ngpl=me%p+1; roi=me%p
                    end if
                elseif(pdeq .iseq. "timoshenko")then
                    if(me%p==1)then
                        roi=1; ngpl=2
                    elseif(me%p==2 .or. me%p==3)then
                        roi=2; ngpl=2   
                    elseif(me%p==4)then
                        roi=3; ngpl=5 
                    elseif(me%p==5 .or. me%p==6 .or. me%p==7 .or. me%p==8)then
                        roi=4; ngpl=5      
                    elseif(me%p==9 .or. me%p==10)then
                        roi=5; ngpl=5
                    else
                        ngpl=me%p+1; roi=me%p
                    end if
                else
                    ngpl=me%p+1; roi=me%p
                end if
            end if

            if(present(reduced_int))then
                r=reduced_int
            end if

            if(present(key))then

                if(key .iseq. "elementwise")then !elementwise

                    ngp=me%p+1
                    if(present(pdeq))then
                        if(r)then
                            ngp = roi
                        else
                            ngp = ngpl
                        end if
                    end if

                elseif(key .iseq. "patchwise")then !patchwise
                    
                    ngp = ceiling(((me%p+1)*me%nbez - (me%minreg+1)*(me%nbez-1))/2.0_wp)
                    if(ngp>64) ngp = 64
                
                end if

            else

                ngp=me%p+1
                if(present(pdeq))then
                    if(r)then
                        ngp = roi
                    else
                        ngp = ngpl
                    end if
                end if

            end if


        end function get_nquad