Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mod builder;
pub mod local_grid;

pub use local_grid::{SingleElementGrid, SingleElementGridBorrowed, SingleElementGridBuilder};
pub use local_grid::{SingleElementGrid, SingleElementGridBuilder};

use local_grid::LocalGrid;

Expand Down
2 changes: 1 addition & 1 deletion src/grid/local_grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
};

mod single_element;
pub use single_element::{SingleElementGrid, SingleElementGridBorrowed, SingleElementGridBuilder};
pub use single_element::{SingleElementGrid, SingleElementGridBuilder};

/// Grid entity
#[derive(Debug)]
Expand Down
2 changes: 0 additions & 2 deletions src/grid/local_grid/single_element.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//! Single element grid
mod borrowed;
mod builder;
mod grid;

pub use borrowed::SingleElementGridBorrowed;
pub use builder::SingleElementGridBuilder;
pub use grid::SingleElementGrid;
260 changes: 0 additions & 260 deletions src/grid/local_grid/single_element/borrowed.rs

This file was deleted.

9 changes: 3 additions & 6 deletions src/grid/local_grid/single_element/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,9 @@ impl<T: RealScalar, E: FiniteElement<CellType = ReferenceCellType, T = T>> Grid
}

fn entity_from_id(&self, dim: usize, id: usize) -> Option<Self::Entity<'_>> {
// TODO: store a HashMap rather than doing a find every time?
self.topology.ids[dim].as_ref().map(|ids| {
ids.iter()
.find(|&i| *i == id)
.map(|i| self.entity(dim, *i))?
})?
self.topology.ids_to_indices[dim]
.get(&id)
.map(|i| self.entity(dim, *i))?
}

fn geometry_map(
Expand Down
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ pub mod topology;
pub mod traits;
pub mod types;

pub use grid::{
ParallelGridImpl, SingleElementGrid, SingleElementGridBorrowed, SingleElementGridBuilder,
};
pub use grid::{ParallelGridImpl, SingleElementGrid, SingleElementGridBuilder};
Loading