pub struct Mesh {
pub nodes: Vec<Point>,
pub elements: Vec<[usize; 3]>,
pub element_materials: Vec<usize>,
pub boundary_nodes: Vec<usize>,
pub hole_boundary_nodes: Vec<Vec<usize>>,
}Expand description
2D triangular mesh for a section.
Fields§
§nodes: Vec<Point>Nodal coordinates
elements: Vec<[usize; 3]>Element connectivity (3 node indices per triangle, CCW)
element_materials: Vec<usize>Material index per element
boundary_nodes: Vec<usize>Boundary nodes (for applying BCs)
hole_boundary_nodes: Vec<Vec<usize>>Hole boundary nodes (for internal boundaries)
Implementations§
Source§impl Mesh
impl Mesh
Sourcepub fn n_elements(&self) -> usize
pub fn n_elements(&self) -> usize
Number of elements.
Sourcepub fn element_centroid(&self, index: usize) -> Point
pub fn element_centroid(&self, index: usize) -> Point
Get element centroid.
Sourcepub fn element_area(&self, index: usize) -> f64
pub fn element_area(&self, index: usize) -> f64
Get element area.
Sourcepub fn quality_metrics(&self) -> MeshQuality
pub fn quality_metrics(&self) -> MeshQuality
Compute mesh quality metrics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mesh
impl RefUnwindSafe for Mesh
impl Send for Mesh
impl Sync for Mesh
impl Unpin for Mesh
impl UnsafeUnpin for Mesh
impl UnwindSafe for Mesh
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