Skip to content

Commit

Permalink
Added convenience routine for cell type
Browse files Browse the repository at this point in the history
  • Loading branch information
tbetcke committed Jan 30, 2025
1 parent 2c7bae8 commit 8fafa4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/traits/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ pub trait Grid {
.sum()
}

/// Return the cell types in the grid
fn cell_types(&self) -> &[Self::EntityDescriptor] {
let tdim = self.topology_dim();
self.entity_types(tdim)
}

/// Owned cell count
///
/// Note. The default implementation iterates through all grid to count the number of owned elements.
Expand Down

0 comments on commit 8fafa4a

Please sign in to comment.