Skip to main content

outram_foam_basic_lib/fields/
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//! Field types: the discretised quantities carried on the mesh.
23//!
24//! This module holds the data containers the FV operators read and write:
25//!
26//! - [`Field`] — a flat `Vec<T>` with element-wise arithmetic; the raw storage
27//!   with no mesh or dimension bookkeeping (mirrors `Foam::Field<Type>`).
28//! - [`boundary`] — boundary conditions ([`BoundaryCondition`]) and per-patch
29//!   boundary values ([`PatchField`]).
30//! - [`VolField`] (and the `Vol*Field` aliases) — cell-centred volume fields:
31//!   one value per cell plus one `PatchField` per boundary patch.
32//! - [`SurfaceField`] (and the `Surface*Field` aliases) — face fields: one
33//!   value per internal face plus one `PatchField` per boundary patch.
34//! - [`vol_field_algebra`] — pure per-element tensor algebra (`tr`, `symm`,
35//!   `dev`, …) lifted to whole volume fields.
36//!
37//! Physical units are not tracked at this layer; a field simply carries `f64`,
38//! `Vector3`, `Tensor`, or `SymmTensor` values in whatever SI units the caller
39//! assigns them.
40
41pub mod boundary;
42pub mod field;
43pub mod surface_field;
44pub mod vol_field;
45pub mod vol_field_algebra;
46
47pub use boundary::*;
48pub use field::Field;
49pub use surface_field::*;
50pub use vol_field::*;