test_simple_rec.f90
Go to the documentation of this file.
3 implicit none
4 integer, parameter :: n = 5
5 real(dp), parameter :: a = 0.0_dp, b = 12.0_dp
6 real(dp), dimension(n) :: x, w
7 integer :: i
8 open (unit=10, file='gauss_jacobi_output.txt', status='unknown')
9 
10 call gauss_jacobi(n, a, b, x, w)
11 
12 do i = 1, n
13  write (10, *) 'Root: ', x(i), ' Weight: ', w(i)
14  print '(1X, A, 1P, E24.17, 2X, A, 1P, E23.17)', 'Root: ', x(i), 'Weight: ', w(i)
15 end do
16 
17 close (10)
18 end program test_simple_rec
Overall driver for Gauss-Jacobi quadrature.
subroutine gauss_jacobi(npts, alpha, beta, x, wts, method)
Compute the Gauss-Jacobi quadrature nodes and weights.
program test_simple_rec
Code