Trait splashsurf_lib::mesh::CellConnectivity
source · pub trait CellConnectivity {
// Required methods
fn expected_num_vertices() -> usize;
fn vertices(&self) -> &[usize];
fn vertices_mut(&mut self) -> &mut [usize];
// Provided method
fn num_vertices(&self) -> usize { ... }
}
Expand description
Basic interface for mesh cells consisting of a collection of vertex indices
Required Methods§
sourcefn expected_num_vertices() -> usize
fn expected_num_vertices() -> usize
Returns the expected number of vertices per cell (helpful for connectivities with a constant or upper bound on the number of vertices to reserve storage)
sourcefn vertices(&self) -> &[usize]
fn vertices(&self) -> &[usize]
Returns a reference to the vertex indices connected by this cell
sourcefn vertices_mut(&mut self) -> &mut [usize]
fn vertices_mut(&mut self) -> &mut [usize]
Returns a reference to the vertex indices connected by this cell
Provided Methods§
sourcefn num_vertices(&self) -> usize
fn num_vertices(&self) -> usize
Returns the number of vertices per cell (may vary between cells)