Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
create_grid should consume the builder
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Mar 7, 2024
1 parent 57dbeb7 commit 797645a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/grid/flat_triangle_grid/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ where
self.cells.extend_from_slice(&cell_data);
}

fn create_grid(&self) -> Self::GridType {
fn create_grid(self) -> Self::GridType {
// TODO: remove this transposing
let npts = self.point_indices_to_ids.len();
let mut points = rlst_dynamic_array2!(T, [npts, 3]);
Expand Down
2 changes: 1 addition & 1 deletion src/grid/mixed_grid/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ where
self.cell_degrees.push(cell_data.2);
}

fn create_grid(&self) -> Self::GridType {
fn create_grid(self) -> Self::GridType {
// TODO: remove this transposing
let npts = self.point_indices_to_ids.len();
let mut points = rlst_dynamic_array2!(T, [npts, 3]);
Expand Down
2 changes: 1 addition & 1 deletion src/grid/single_element_grid/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ where
self.cells.extend_from_slice(&cell_data);
}

fn create_grid(&self) -> Self::GridType {
fn create_grid(self) -> Self::GridType {
// TODO: remove this transposing
let npts = self.point_indices_to_ids.len();
let mut points = rlst_dynamic_array2!(T, [npts, 3]);
Expand Down
2 changes: 1 addition & 1 deletion src/traits/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ pub trait Builder<const GDIM: usize> {
fn add_cell(&mut self, id: usize, cell_data: Self::CellData);

/// Create the grid
fn create_grid(&self) -> Self::GridType;
fn create_grid(self) -> Self::GridType;
}

0 comments on commit 797645a

Please sign in to comment.