Skip to content

Commit e46e3bc

Browse files
authored
Added convenience routine for cell type (#85)
1 parent 2c7bae8 commit e46e3bc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/traits/grid.rs

+6
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ pub trait Grid {
5454
.sum()
5555
}
5656

57+
/// Return the cell types in the grid
58+
fn cell_types(&self) -> &[Self::EntityDescriptor] {
59+
let tdim = self.topology_dim();
60+
self.entity_types(tdim)
61+
}
62+
5763
/// Owned cell count
5864
///
5965
/// Note. The default implementation iterates through all grid to count the number of owned elements.

0 commit comments

Comments
 (0)