Skip to content

Commit

Permalink
BUG: Use correct referencing of cell corner indices.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwboth committed Nov 4, 2023
1 parent 3080e31 commit 2e235b9
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/darsia/utils/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,40 +244,40 @@ def _setup(self) -> None:
self.cell_corner_indices[self.faces[0], 1, 0] = 0

elif self.dim == 2:
self.cell_corner_indices[self.faces[0], 0, 0] = 3
self.cell_corner_indices[self.faces[0], 0, 0] = 1
self.cell_corner_indices[self.faces[0], 0, 1] = 2
self.cell_corner_indices[self.faces[0], 1, 0] = 0
self.cell_corner_indices[self.faces[0], 1, 1] = 1
self.cell_corner_indices[self.faces[1], 0, 0] = 1
self.cell_corner_indices[self.faces[0], 1, 1] = 3
self.cell_corner_indices[self.faces[1], 0, 0] = 3
self.cell_corner_indices[self.faces[1], 0, 1] = 2
self.cell_corner_indices[self.faces[1], 1, 0] = 0
self.cell_corner_indices[self.faces[1], 1, 1] = 3
self.cell_corner_indices[self.faces[1], 1, 1] = 1

elif self.dim == 3:
self.cell_corner_indices[self.faces[0], 0, 0] = 3
self.cell_corner_indices[self.faces[0], 0, 0] = 1
self.cell_corner_indices[self.faces[0], 0, 1] = 2
self.cell_corner_indices[self.faces[0], 0, 2] = 7
self.cell_corner_indices[self.faces[0], 0, 2] = 5
self.cell_corner_indices[self.faces[0], 0, 3] = 6
self.cell_corner_indices[self.faces[0], 1, 0] = 0
self.cell_corner_indices[self.faces[0], 1, 1] = 1
self.cell_corner_indices[self.faces[0], 1, 1] = 3
self.cell_corner_indices[self.faces[0], 1, 2] = 4
self.cell_corner_indices[self.faces[0], 1, 3] = 5
self.cell_corner_indices[self.faces[1], 0, 0] = 1
self.cell_corner_indices[self.faces[0], 1, 3] = 7
self.cell_corner_indices[self.faces[1], 0, 0] = 3
self.cell_corner_indices[self.faces[1], 0, 1] = 2
self.cell_corner_indices[self.faces[1], 0, 2] = 5
self.cell_corner_indices[self.faces[1], 0, 2] = 7
self.cell_corner_indices[self.faces[1], 0, 3] = 6
self.cell_corner_indices[self.faces[1], 1, 0] = 0
self.cell_corner_indices[self.faces[1], 1, 1] = 3
self.cell_corner_indices[self.faces[1], 1, 1] = 1
self.cell_corner_indices[self.faces[1], 1, 2] = 4
self.cell_corner_indices[self.faces[1], 1, 3] = 7
self.cell_corner_indices[self.faces[1], 1, 3] = 5
self.cell_corner_indices[self.faces[2], 0, 0] = 4
self.cell_corner_indices[self.faces[2], 0, 1] = 7
self.cell_corner_indices[self.faces[2], 0, 1] = 5
self.cell_corner_indices[self.faces[2], 0, 2] = 6
self.cell_corner_indices[self.faces[2], 0, 3] = 5
self.cell_corner_indices[self.faces[2], 0, 3] = 7
self.cell_corner_indices[self.faces[2], 1, 0] = 0
self.cell_corner_indices[self.faces[2], 1, 1] = 3
self.cell_corner_indices[self.faces[2], 1, 1] = 1
self.cell_corner_indices[self.faces[2], 1, 2] = 2
self.cell_corner_indices[self.faces[2], 1, 3] = 1
self.cell_corner_indices[self.faces[2], 1, 3] = 3


def generate_grid(image: darsia.Image) -> Grid:
Expand Down

0 comments on commit 2e235b9

Please sign in to comment.