ChebyshevQuadrature Subroutine

public subroutine ChebyshevQuadrature(N, nodes, weights, QuadType)

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: N
real(kind=prec), intent(out) :: nodes(0:N)
real(kind=prec), intent(out) :: weights(0:N)
integer, intent(in) :: QuadType

Calls

proc~~chebyshevquadrature~~CallsGraph proc~chebyshevquadrature ChebyshevQuadrature proc~chebyshevgausslobatto ChebyshevGaussLobatto proc~chebyshevquadrature->proc~chebyshevgausslobatto proc~chebyshevgauss ChebyshevGauss proc~chebyshevquadrature->proc~chebyshevgauss

Called by

proc~~chebyshevquadrature~~CalledByGraph proc~chebyshevquadrature ChebyshevQuadrature proc~init_lagrange_t Init_Lagrange_t proc~init_lagrange_t->proc~chebyshevquadrature proc~init_lagrange~2 Init_Lagrange proc~init_lagrange~2->proc~chebyshevquadrature proc~init_lagrange Init_Lagrange proc~init_lagrange->proc~chebyshevquadrature

Contents

Source Code


Source Code

  subroutine ChebyshevQuadrature(N,nodes,weights,quadType)
    implicit none
    integer,intent(in)     :: N
    real(prec),intent(out) :: nodes(0:N)
    real(prec),intent(out) :: weights(0:N)
    integer,intent(in)     :: QuadType
    ! Local
    real(real64) :: nodesLocal(0:N)
    real(real64) :: weightsLocal(0:N)
    integer :: i

    if(QuadType == CHEBYSHEV_GAUSS_LOBATTO) then

      call ChebyshevGaussLobatto(N,nodesLocal,weightsLocal)

    elseif(QuadType == CHEBYSHEV_GAUSS) then

      call ChebyshevGauss(N,nodesLocal,weightsLocal)

    endif

    do i = 0,N
      nodes(i) = real(nodesLocal(i),prec)
      weights(i) = real(weightsLocal(i),prec)
    enddo

  endsubroutine ChebyshevQuadrature