Skip to main content

Crate gauss_jacobi_quad

Crate gauss_jacobi_quad 

Source
Expand description

Safe Rust bindings to GaussJacobiQuad via the C ABI (gauss_jacobi_rule_c in libgjp_cinterp).

The quadrature math stays in Fortran; this crate only marshals arrays and status codes. Build libgjp_cinterp with meson first, then point GJP_CINTERP at the .so (or install a gjp_cinterp.pc).

§Example

use gauss_jacobi_quad::{gauss_jacobi, Method};

let (x, w) = gauss_jacobi(32, 0.0, 0.0, Method::Auto).unwrap();
assert_eq!(x.len(), 32);
assert!(w.iter().all(|&wi| wi > 0.0));

Enums§

Error
Error from the C library or argument validation.
Method
Method selection for gauss_jacobi.
Status
Status codes matching GaussJacobiQuadCInterp.h.

Functions§

gauss_jacobi
Compute Gauss–Jacobi nodes and weights.
gauss_jacobi_method_str
Force a method by raw C string (e.g. "sturm_caf" is rejected by C surface; use Fortran for CAF). Empty / "auto" select the policy.
status_string
Human-readable status from the C library (static C string).