pub struct FluentMesh {
pub nodes: Vec<FluentNode>,
pub faces: Vec<FluentFace>,
pub cells: Vec<FluentCell>,
pub zones: Vec<(usize, FluentZoneType)>,
}Expand description
A complete Fluent mesh.
Fields§
§nodes: Vec<FluentNode>All nodes.
faces: Vec<FluentFace>All faces.
cells: Vec<FluentCell>All cells.
zones: Vec<(usize, FluentZoneType)>Zone list: (zone_id, zone_type).
Implementations§
Source§impl FluentMesh
impl FluentMesh
Sourcepub fn add_zone(&mut self, zone_id: usize, zone_type: FluentZoneType)
pub fn add_zone(&mut self, zone_id: usize, zone_type: FluentZoneType)
Add a zone to the mesh.
Sourcepub fn write(&self, path: &str) -> Result<()>
pub fn write(&self, path: &str) -> Result<()>
Write the mesh to a Fluent ASCII .msh file at path.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Number of nodes in the mesh.
Sourcepub fn face_count(&self) -> usize
pub fn face_count(&self) -> usize
Number of faces in the mesh.
Sourcepub fn cell_count(&self) -> usize
pub fn cell_count(&self) -> usize
Number of cells in the mesh.
Sourcepub fn zone_type(&self, zone_id: usize) -> Option<&FluentZoneType>
pub fn zone_type(&self, zone_id: usize) -> Option<&FluentZoneType>
Look up a zone type by id.
Trait Implementations§
Source§impl Clone for FluentMesh
impl Clone for FluentMesh
Source§fn clone(&self) -> FluentMesh
fn clone(&self) -> FluentMesh
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FluentMesh
impl Debug for FluentMesh
Source§impl Default for FluentMesh
impl Default for FluentMesh
Source§fn default() -> FluentMesh
fn default() -> FluentMesh
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FluentMesh
impl RefUnwindSafe for FluentMesh
impl Send for FluentMesh
impl Sync for FluentMesh
impl Unpin for FluentMesh
impl UnsafeUnpin for FluentMesh
impl UnwindSafe for FluentMesh
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.