SUBROUTINE Hermit (npt, xpt, wht, kase) USE Numeric_Kinds_Module USE FileUnits_Module IMPLICIT NONE REAL(KIND=WP_Kind) :: fac, hpol(201), SQRT REAL(KIND=WP_Kind), INTENT(OUT) :: xpt(*), wht(*) INTEGER(KIND=IW_Kind), INTENT(IN) :: npt, kase INTEGER(KIND=IW_Kind) :: i !--------------------------------------------------------------------- ! ! purpose ! supplies the gauss hermite abscissas and weights ! ! description of parameters ! npt-number of points desired ! xpt-resultant array containing the gauss hermite abscissas. ! wht-resultant array containing the gauss hermite weights ! kase=0 IF integrating exp(-x**2)*f(x)*dx ! kase=1 IF integrating f(x)*dx !--------------------------------------------------------------------- IF(npt.gt.200) THEN WRITE(Out_Unit,*)'npt.gt.200', npt STOP 'hermit' ENDIF CALL hrmzro (npt, xpt) fac = One DO i = 1, npt fac = fac*SQRT(REAL(i,WP_Kind)) ENDDO fac = fac*SQRT(Two**(npt-1))*Pi**Fourth/npt DO i = 1, (npt+1)/2 CALL hermit_fun(xpt(i), npt-1, hpol, npt) wht(i) = (fac/hpol(npt))**2 ENDDO DO i = 1, (npt+1)/2 xpt(npt-i+1) = xpt((npt+1)/2-i+1) wht(npt-i+1) = wht((npt+1)/2-i+1) ENDDO DO i = 1, npt/2 xpt(i) = -xpt(npt+1-i) wht(i) = wht(npt+1-i) ENDDO IF(kase.eq.1)THEN DO i=1,npt wht(i)=wht(i)*EXP(xpt(i)**2) ENDDO ENDIF RETURN END SUBROUTINE Hermit