pub struct EnsightPart {
pub part_id: u32,
pub description: String,
pub element_type: String,
pub connectivity: Vec<u32>,
}Expand description
A named part within an EnSight geometry: holds element type + connectivity.
Connectivity is stored as a flat Vecu32where each group ofnodes_per_element()` values represents one element.
Fields§
§part_id: u32Part number (1-based in EnSight convention).
description: StringHuman-readable part description.
element_type: StringElement type keyword (e.g. "point", "tria3", "tetra4", "hexa8").
connectivity: Vec<u32>Flat connectivity list: nodes_per_element * n_elements entries (0-based node indices).
Implementations§
Source§impl EnsightPart
impl EnsightPart
Sourcepub fn new(
part_id: u32,
description: impl Into<String>,
element_type: impl Into<String>,
) -> Self
pub fn new( part_id: u32, description: impl Into<String>, element_type: impl Into<String>, ) -> Self
Create a new part.
Sourcepub fn nodes_per_element(&self) -> usize
pub fn nodes_per_element(&self) -> usize
Number of nodes per element for this element type.
Sourcepub fn n_elements(&self) -> usize
pub fn n_elements(&self) -> usize
Number of elements stored in this part.
Trait Implementations§
Source§impl Clone for EnsightPart
impl Clone for EnsightPart
Source§fn clone(&self) -> EnsightPart
fn clone(&self) -> EnsightPart
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 moreAuto Trait Implementations§
impl Freeze for EnsightPart
impl RefUnwindSafe for EnsightPart
impl Send for EnsightPart
impl Sync for EnsightPart
impl Unpin for EnsightPart
impl UnsafeUnpin for EnsightPart
impl UnwindSafe for EnsightPart
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.