Compute Chebychev-Gauss-Lobatto nodes and integration weights (algorithm 27, Kopriva book)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | N_in |
polynomial degree, (N_in+1) CLpoints |
||
| real(kind=wp), | intent(out) | :: | xGP(0:N_in) |
Gauss point positions for the reference interval [-1,1] |
||
| real(kind=wp), | intent(out), | optional | :: | wGP(0:N_in) |
Gauss point weights |
SUBROUTINE ChebyGaussLobNodesAndWeights(N_in,xGP,wGP) IMPLICIT NONE !---------------------------------------------------------------------------------------------------------------------------------- ! INPUT/OUTPUT VARIABLES INTEGER,INTENT(IN) :: N_in !! polynomial degree, (N_in+1) CLpoints REAL(wp),INTENT(OUT) :: xGP(0:N_in) !! Gauss point positions for the reference interval [-1,1] REAL(wp),INTENT(OUT),OPTIONAL :: wGP(0:N_in) !! Gauss point weights !---------------------------------------------------------------------------------------------------------------------------------- ! LOCAL VARIABLES INTEGER :: iGP !================================================================================================================================== DO iGP=0,N_in xGP(iGP)=-COS(REAL(iGP,wp)/REAL(N_in,wp)*PP_Pi) END DO IF(PRESENT(wGP))THEN DO iGP=0,N_in wGP(iGP)=PP_Pi/REAL(N_in,wp) END DO wGP(0)=wGP(0)*0.5_wp wGP(N_in)=wGP(N_in)*0.5_wp END IF END SUBROUTINE ChebyGaussLobNodesAndWeights