Skip to main content

outram_foam_basic_lib/mesh/
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//! Finite-volume mesh layer: topology and geometry.
23//!
24//! This module holds the flat, cache-friendly mesh representation the FV
25//! operators run on. It contains:
26//!
27//! - [`FvMesh`](crate::mesh::fv_mesh::FvMesh) — the mesh itself (cells, faces, owner/neighbour connectivity,
28//!   cell volumes `[m³]`, face-area vectors `[m²]`, and cell/face centres `[m]`),
29//!   plus [`FvMeshBuilder`](crate::mesh::fv_mesh::FvMeshBuilder) to assemble one incrementally.
30//! - [`BoundaryPatch`](crate::mesh::fv_mesh::BoundaryPatch) /
31//!   [`PatchKind`](crate::mesh::fv_mesh::PatchKind) — boundary-patch descriptors.
32//! - [`ami`](crate::mesh::ami) — arbitrary-mesh-interface (non-conformal periodic / `cyclicAMI`)
33//!   face-overlap weighting and [`AmiCoupling`](crate::mesh::ami::AmiCoupling)
34//!   representation.
35//! - [`RegionInterface`](crate::mesh::region_interface::RegionInterface) — a face-to-face coupling map between two regions'
36//!   patches (used by conjugate-heat-transfer solvers).
37//! - [`MeshError`](crate::mesh::error::MeshError) — the errors raised during mesh construction and validation.
38//!
39//! It stores only the data required by the operators; the OpenFOAM
40//! `polyMesh → primitiveMesh → lduMesh` inheritance chain is not reproduced.
41
42pub mod ami;
43pub mod error;
44pub mod fv_mesh;
45pub mod region_interface;
46
47pub use ami::{AmiCoupling, AmiOverlap, AmiWeight};
48pub use error::MeshError;
49pub use fv_mesh::*;
50pub use region_interface::RegionInterface;