Skip to content

Commit

Permalink
Clean up SimpleGridData e2c2v field #408 (#432)
Browse files Browse the repository at this point in the history
* Replace `e2c2v` table with `diamond` table
  • Loading branch information
iomaganaris authored Apr 8, 2024
1 parent 96755a5 commit 9ef0b2e
Showing 1 changed file with 12 additions and 44 deletions.
56 changes: 12 additions & 44 deletions model/common/src/icon4py/model/common/grid/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,26 +97,26 @@ class SimpleGridData:
[1, 5, 2, 4], # 4
[1, 4, 5, 0], # 5
[2, 0, 3, 8], # 6
[2, 3, 5, 0], # 7
[2, 3, 0, 5], # 7
[2, 5, 1, 3], # 8
[3, 4, 0, 7], # 9
[3, 7, 4, 6], # 10
[3, 6, 7, 5], # 11
[4, 5, 8, 1], # 12
[4, 8, 7, 5], # 13
[3, 6, 5, 7], # 11
[4, 5, 1, 8], # 12
[4, 8, 5, 7], # 13
[4, 7, 3, 8], # 14
[5, 3, 6, 2], # 15
[6, 5, 3, 8], # 16
[8, 5, 6, 4], # 17
[5, 3, 2, 6], # 15
[5, 6, 3, 8], # 16
[5, 8, 4, 6], # 17
[6, 7, 3, 1], # 18
[6, 1, 7, 0], # 19
[6, 0, 1, 8], # 20
[7, 8, 2, 4], # 21
[7, 8, 4, 2], # 21
[7, 2, 8, 1], # 22
[7, 1, 2, 6], # 23
[8, 6, 0, 5], # 24
[7, 1, 6, 2], # 23
[8, 6, 5, 0], # 24
[8, 0, 6, 2], # 25
[8, 2, 0, 6], # 26
[8, 2, 7, 0], # 26
]
)

Expand Down Expand Up @@ -299,38 +299,6 @@ class SimpleGridData:
]
)

diamond_table = np.asarray(
[
[0, 1, 4, 6], # 0
[0, 4, 1, 3],
[0, 3, 4, 2],
[1, 2, 5, 7], # 3
[1, 5, 2, 4],
[1, 4, 5, 0],
[2, 0, 3, 8], # 6
[2, 3, 0, 5],
[2, 5, 1, 3],
[3, 4, 0, 7], # 9
[3, 7, 4, 6],
[3, 6, 5, 7],
[4, 5, 1, 8], # 12
[4, 8, 5, 7],
[4, 7, 3, 8],
[5, 3, 2, 6], # 15
[5, 6, 3, 8],
[5, 8, 4, 6],
[6, 7, 3, 1], # 18
[6, 1, 7, 0],
[6, 0, 1, 8],
[7, 8, 4, 2], # 21
[7, 2, 8, 1],
[7, 1, 6, 2],
[8, 6, 5, 0], # 24
[8, 0, 6, 2],
[8, 2, 7, 0],
]
)

c2e2cO_table = np.asarray(
[
[15, 4, 3, 0],
Expand Down Expand Up @@ -449,7 +417,7 @@ def num_edges(self) -> int:

@property
def diamond_table(self) -> int:
return SimpleGridData.diamond_table
return SimpleGridData.e2c2v_table

@property
def num_levels(self) -> int:
Expand Down

0 comments on commit 9ef0b2e

Please sign in to comment.