[][src]Trait gut::algo::connectivity::Connectivity

pub trait Connectivity<I: TopoIndex<usize>> {
    fn num_elements(&self) -> usize;
fn push_neighbours(
        &self,
        index: I::SrcIndex,
        stack: &mut Vec<I::SrcIndex>,
        topo: &(Vec<usize>, Vec<usize>)
    ); fn precompute_reverse_topo(&self) -> (Vec<usize>, Vec<usize>) { ... }
fn connectivity(&self) -> (Vec<usize>, usize) { ... } }

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>)
)

Push all neighbours of the element at the given index to the given stack.

Loading content...

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.

Loading content...

Implementors

impl<M: FaceVertex + NumVertices + NumFaces> Connectivity<VertexFaceIndex> for M[src]

Implement vertex connectivity for face based meshes (e.g. PolyMesh, TriMesh and QuadMesh).

impl<M: VertexCell + CellVertex + NumVertices> Connectivity<VertexCellIndex> for M[src]

Implement vertex connectivity for cell based meshes (e.g. TetMesh).

Loading content...