pub trait Topology {
type EntityDescriptor: Debug + PartialEq + Eq + Clone + Copy + Hash;
type EntityIndexIter<'a>: Iterator<Item = usize>
where Self: 'a;
type ConnectedEntityIndexIter<'a>: Iterator<Item = usize>
where Self: 'a;
// Required methods
fn connected_entity_iter(
&self,
entity_type: Self::EntityDescriptor,
) -> Self::ConnectedEntityIndexIter<'_>;
fn sub_entity_iter(
&self,
entity_type: Self::EntityDescriptor,
) -> Self::EntityIndexIter<'_>;
fn sub_entity(
&self,
entity_type: Self::EntityDescriptor,
index: usize,
) -> usize;
fn orientation(&self) -> i32;
}Expand description
The topology of an entity
Required Associated Types§
Sourcetype EntityIndexIter<'a>: Iterator<Item = usize>
where
Self: 'a
type EntityIndexIter<'a>: Iterator<Item = usize> where Self: 'a
Entity iterator
Sourcetype ConnectedEntityIndexIter<'a>: Iterator<Item = usize>
where
Self: 'a
type ConnectedEntityIndexIter<'a>: Iterator<Item = usize> where Self: 'a
Entity iterator
Required Methods§
Sourcefn connected_entity_iter(
&self,
entity_type: Self::EntityDescriptor,
) -> Self::ConnectedEntityIndexIter<'_>
fn connected_entity_iter( &self, entity_type: Self::EntityDescriptor, ) -> Self::ConnectedEntityIndexIter<'_>
Iterator over indices of connected entities.
This iterator returns all entities of a given type connected to this entity.
Sourcefn sub_entity_iter(
&self,
entity_type: Self::EntityDescriptor,
) -> Self::EntityIndexIter<'_>
fn sub_entity_iter( &self, entity_type: Self::EntityDescriptor, ) -> Self::EntityIndexIter<'_>
Iterator over sub-entities
This iterator iterates over all subentities of a given type. It returns the index of the corresponding entity. This index can then be used with the Grid::entity to return the corresponding actual entity.
Sourcefn sub_entity(&self, entity_type: Self::EntityDescriptor, index: usize) -> usize
fn sub_entity(&self, entity_type: Self::EntityDescriptor, index: usize) -> usize
An index of a sub-entity of this entity
Assume that e is a triangle. Then calling e.sub_entity(ReferenceCellType::Point, 0) returns the entity index
of the first vertex of that entity.
Sourcefn orientation(&self) -> i32
fn orientation(&self) -> i32
A 32-bit integer that encodes the orientation differences between this entity and the corresponding reference entity
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.