outram_foam_basic_lib/math/mod.rs
1// SPDX-License-Identifier: GPL-3.0-only
2// Copyright (C) 2026 OUTRAM PARK contributors
3// Derived from OpenFOAM (www.openfoam.com)
4// Copyright (C) 2004-2023 OpenFOAM Foundation
5// Copyright (C) 2016-2023 OpenCFD Ltd.
6//
7// This file is part of OUTRAM PARK.
8//
9// OUTRAM PARK is free software: you can redistribute it and/or modify it
10// under the terms of the GNU General Public License as published by the
11// Free Software Foundation, either version 3 of the License, or (at your
12// option) any later version.
13//
14// OUTRAM PARK is distributed in the hope that it will be useful, but
15// WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17// General Public License for more details.
18//
19// You should have received a copy of the GNU General Public License along
20// with OUTRAM PARK. If not, see <https://www.gnu.org/licenses/>.
21
22//! Special mathematical functions used by the thermophysics and statistics
23//! kernels.
24//!
25//! Ports the OpenFOAM `primitives/functions/Math` helpers: the inverse error
26//! function ([`erf_inv`]), the regularised lower/upper incomplete gamma
27//! functions and their unnormalised forms ([`inc_gamma_ratio_p`],
28//! [`inc_gamma_ratio_q`], [`inc_gamma_p`], [`inc_gamma_q`]), and the inverse of
29//! the regularised lower incomplete gamma ([`inv_inc_gamma`]). All arguments and
30//! results are dimensionless `f64`.
31
32pub mod erf_inv;
33pub mod inc_gamma;
34pub mod inv_inc_gamma;
35
36pub use erf_inv::erf_inv;
37pub use inc_gamma::{inc_gamma_p, inc_gamma_q, inc_gamma_ratio_p, inc_gamma_ratio_q};
38pub use inv_inc_gamma::inv_inc_gamma;