Build GaussJacobiQuad and compute one Gauss–Jacobi rule with the shipped public entry.
git clone https://github.com/HaoZeke/GaussJacobiQuad.git
cd GaussJacobiQuad
micromamba create -f environment.yml
micromamba activate gaussjacquadYou need gfortran with Coarray support.
Portable one-image mode uses -fcoarray=single.
fpm build --flag "-fcoarray=single"
fpm test --flag "-fcoarray=single"Preferred Fortran driver dispatches via gauss_jacobi_rule:
# npoints alpha beta method
fpm run --flag "-fcoarray=single" gjp_quad -- 32 0.0 0.0 auto
fpm run --flag "-fcoarray=single" gjp_quad -- 40 0.5 0.5 glr
fpm run --flag "-fcoarray=single" gjp_quad -- 32 0.0 0.0 bogaertNotes:
alpha / beta on the Fortran CLI require a decimal point
(e.g. 0.5).auto, rec, gw, algo665, algo665_dc, sturm,
glr, bogaert, or a *_caf name (rec_caf, sturm_caf, glr_caf, bogaert_caf, algo665_dc_caf, …). auto selects *_caf
when multi-image.bogaert) require
α=β=0 and n≥21.use GaussJacobiQuad, only: gauss_jacobi_rule, select_method_auto
use gjp_types, only: dp
integer, parameter :: npts = 32
real(dp) :: alpha, beta, x(npts), wts(npts)
character(len=:), allocatable :: m
alpha = 0.0_dp
beta = 0.0_dp
! omit method → select_method_auto (Legendre large n → bogaert)
call gauss_jacobi_rule(npts, alpha, beta, x, wts)
m = select_method_auto(40, 0.5_dp, 0.5_dp)
call gauss_jacobi_rule(40, 0.5_dp, 0.5_dp, x, wts, m)