outram_foam_basic_lib/polynomial/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//! Closed-form polynomial equation solvers and a fixed-degree polynomial type.
23//!
24//! Ports the OpenFOAM `primitives/polynomialEqns` layer: the linear, quadratic,
25//! and cubic root finders (`LinearEqn`, `QuadraticEqn`, `CubicEqn`) that return a
26//! tagged [`Roots`](crate::polynomial::roots::Roots) container distinguishing real, complex, infinite, and NaN
27//! roots, plus the general [`Polynomial<N>`](polynomial::Polynomial) value /
28//! derivative / integral type. All coefficients and results are bare `f64` in SI
29//! (dimensionless) form — these are numerical building blocks, not dimensioned
30//! physical quantities.
31
32pub mod cubic_eqn;
33pub mod linear_eqn;
34pub mod polynomial;
35pub mod quadratic_eqn;
36pub mod roots;
37
38pub use cubic_eqn::CubicEqn;
39pub use linear_eqn::LinearEqn;
40pub use polynomial::Polynomial;
41pub use quadratic_eqn::QuadraticEqn;
42pub use roots::{RootType, Roots};