[−][src]Trait gut::algo::connectivity::Connectivity
A trait defining the primary method for determining connectivity in a mesh.
Required methods
fn num_elements(&self) -> usize
Get a list of indices for the elements which are considered for connectivity (e.g. triangles in triangle meshes or tets in a tetmesh).
fn push_neighbours(
&self,
index: I::SrcIndex,
stack: &mut Vec<I::SrcIndex>,
topo: &(Vec<usize>, Vec<usize>)
)
&self,
index: I::SrcIndex,
stack: &mut Vec<I::SrcIndex>,
topo: &(Vec<usize>, Vec<usize>)
)
Push all neighbours of the element at the given index to the given stack.
Provided methods
fn precompute_reverse_topo(&self) -> (Vec<usize>, Vec<usize>)
An optional function that allows implementers to precompute topology information to help
with the implementation of push_neighbours
when the mesh doesn't already support a
certain type of topology.
fn connectivity(&self) -> (Vec<usize>, usize)
Determine the connectivity of a set of meshes. Return a Vec
with the size of
self.indices().len()
indicating a unique ID of the connected component each element
belongs to. For instance, if two triangles in a triangle mesh blong to the same connected
component, they will have the same ID. Also return the total number of components generated.
Implementors
impl<M: FaceVertex + NumVertices + NumFaces> Connectivity<VertexFaceIndex> for M
[src]
Implement vertex connectivity for face based meshes (e.g. PolyMesh, TriMesh and QuadMesh).
fn precompute_reverse_topo(&self) -> (Vec<usize>, Vec<usize>)
[src]
fn num_elements(&self) -> usize
[src]
fn push_neighbours(
&self,
index: VertexIndex,
stack: &mut Vec<VertexIndex>,
topo: &(Vec<usize>, Vec<usize>)
)
[src]
&self,
index: VertexIndex,
stack: &mut Vec<VertexIndex>,
topo: &(Vec<usize>, Vec<usize>)
)
impl<M: VertexCell + CellVertex + NumVertices> Connectivity<VertexCellIndex> for M
[src]
Implement vertex connectivity for cell based meshes (e.g. TetMesh).
fn num_elements(&self) -> usize
[src]
fn push_neighbours(
&self,
index: VertexIndex,
stack: &mut Vec<VertexIndex>,
_: &(Vec<usize>, Vec<usize>)
)
[src]
&self,
index: VertexIndex,
stack: &mut Vec<VertexIndex>,
_: &(Vec<usize>, Vec<usize>)
)