8 real(
dp) :: alpha, beta
9 real(
dp),
dimension(:),
allocatable :: x, w
10 character(len=128) :: arg
11 character(len=:),
allocatable :: method
14 if (command_argument_count() /= 3)
then
15 print*,
"Usage: ./gjp_quad_gw <n_points> <alpha> <beta>"
16 print*,
" n_points: Number of quadrature points (integer)"
17 print*,
" alpha: Parameter alpha for Gauss-Jacobi quadrature (must be > -1)"
18 print*,
" beta: Parameter beta for Gauss-Jacobi quadrature (must be > -1)"
19 error stop
"Must supply 3 arguments"
22 call get_command_argument(1, arg)
23 read (arg,
'(i4)') n_points
24 allocate (x(n_points), w(n_points))
26 call get_command_argument(2, arg)
27 if (index(arg,
'.') == 0)
then
28 print*,
"alpha must include a decimal point"
33 call get_command_argument(3, arg)
34 if (index(arg,
'.') == 0)
then
35 print*,
"beta must include a decimal point"
44 print
'(1X, A, 1P, E24.17, 2X, A, 1P, E23.17)',
'Root: ', x(idx),
'Weight: ', w(idx)
Overall driver for Gauss-Jacobi quadrature.
subroutine gauss_jacobi(npts, alpha, beta, x, wts, method)
Compute the Gauss-Jacobi quadrature nodes and weights.
Module for defining types and precision levels for Gauss-Jacobi Polynomial (GJP) calculations.
integer, parameter, public dp
Define various kinds for real numbers.