quickstart

Goal

Build GaussJacobiQuad and compute one Gauss–Jacobi rule with the shipped public entry.

Install toolchain

git clone https://github.com/HaoZeke/GaussJacobiQuad.git
cd GaussJacobiQuad
micromamba create -f environment.yml
micromamba activate gaussjacquad

fpm + gfortran

You need gfortran with Coarray support. Portable one-image mode uses -fcoarray=single.

Build and test (Fortran)

fpm build --flag "-fcoarray=single"
fpm test  --flag "-fcoarray=single"

First rule: CLI

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 bogaert

Notes:

First rule: library

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)

Next steps