pub struct PolyMesh {
pub points: Vec<Vector3>,
pub faces: Vec<MeshFace>,
pub n_internal_faces: usize,
pub n_cells: usize,
pub patches: Vec<BoundaryPatch>,
}Expand description
A connectivity-carrying poly-mesh — the on-disk polyMesh representation.
Faces are ordered internal-first ([0, n_internal_faces)), then boundary
faces grouped by patch, matching OpenFOAM. Call PolyMesh::to_fv_mesh
to obtain the geometry-carrying FvMesh.
Fields§
§points: Vec<Vector3>Mesh points [m].
faces: Vec<MeshFace>All faces, internal first then boundary.
n_internal_faces: usizeNumber of internal faces (leading internal entries in faces).
n_cells: usizeNumber of cells.
patches: Vec<BoundaryPatch>Boundary patches, covering [n_internal_faces, faces.len()).
Implementations§
Source§impl PolyMesh
impl PolyMesh
Sourcepub fn n_boundary_faces(&self) -> usize
pub fn n_boundary_faces(&self) -> usize
Number of boundary faces.
Sourcepub fn total_volume(&self) -> f64
pub fn total_volume(&self) -> f64
Total mesh volume [m^3] — the sum of all cell volumes.
Sourcepub fn to_fv_mesh(&self) -> Result<FvMesh, IoError>
pub fn to_fv_mesh(&self) -> Result<FvMesh, IoError>
Convert to the geometry-carrying FvMesh, computing cell
volumes/centres, face-area vectors, face areas, and face centres from
the point/face topology.
§Errors
IoError::Mesh if the assembled mesh fails FvMesh::validate.
Trait Implementations§
impl StructuralPartialEq for PolyMesh
Auto Trait Implementations§
impl Freeze for PolyMesh
impl RefUnwindSafe for PolyMesh
impl Send for PolyMesh
impl Sync for PolyMesh
impl Unpin for PolyMesh
impl UnsafeUnpin for PolyMesh
impl UnwindSafe for PolyMesh
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more