Skip to main content

Module fields

Module fields 

Source
Expand description

Layer 2 — field containers (VolField/SurfaceField), boundary conditions, and field-level tensor algebra. Field types: the discretised quantities carried on the mesh.

This module holds the data containers the FV operators read and write:

  • [Field] — a flat Vec<T> with element-wise arithmetic; the raw storage with no mesh or dimension bookkeeping (mirrors Foam::Field<Type>).
  • [boundary] — boundary conditions ([BoundaryCondition]) and per-patch boundary values ([PatchField]).
  • [VolField] (and the Vol*Field aliases) — cell-centred volume fields: one value per cell plus one PatchField per boundary patch.
  • [SurfaceField] (and the Surface*Field aliases) — face fields: one value per internal face plus one PatchField per boundary patch.
  • [vol_field_algebra] — pure per-element tensor algebra (tr, symm, dev, …) lifted to whole volume fields.

Physical units are not tracked at this layer; a field simply carries f64, Vector3, Tensor, or SymmTensor values in whatever SI units the caller assigns them.

Re-exports§

pub use field::Field;
pub use boundary::*;
pub use surface_field::*;
pub use vol_field::*;

Modules§

boundary
Boundary conditions and per-patch boundary field values.
field
surface_field
vol_field
vol_field_algebra
Field-level (GeometricField) tensor algebra.