ChebyshevGaussLobatto Subroutine

private subroutine ChebyshevGaussLobatto(N, nodes, weights)

Arguments

TypeIntentOptionalAttributesName
integer :: N
real(kind=real64) :: nodes(0:N)
real(kind=real64) :: weights(0:N)

Called by

proc~~chebyshevgausslobatto~~CalledByGraph proc~chebyshevgausslobatto ChebyshevGaussLobatto proc~chebyshevquadrature ChebyshevQuadrature proc~chebyshevquadrature->proc~chebyshevgausslobatto 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 ChebyshevGaussLobatto(N,nodes,weights)
    implicit none
    integer       :: N
    real(real64)    :: nodes(0:N)
    real(real64)    :: weights(0:N)
    ! LOCAL
    integer    :: j

    do j = 0,N

      weights(j) = pi/real(N,real64)
      nodes(j) = -cos(pi*real(j,real64)/real(N,real64))

    enddo

    weights(0) = weights(0)*0.5_real64
    weights(N) = weights(N)*0.5_real64

  endsubroutine ChebyshevGaussLobatto