Skip to content

Commit

Permalink
[geom] No Mesh variable attrs (temporary fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Feb 29, 2024
1 parent b6d125f commit e426a4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions phi/geom/_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def __init__(self, vertices: Graph,
# e_face =

def __variable_attrs__(self):
return ()
return '_vertices', '_center', '_volume', '_faces', '_valid_mask', '_face_vertices', '_relative_face_distance', '_neighbor_offsets'

@property
Expand Down Expand Up @@ -255,6 +256,9 @@ def __getitem__(self, item):
item: dict = slicing_dict(self, item)
assert not spatial(self._polygons).only(tuple(item)), f"Cannot slice vertex lists ('{spatial(self._polygons)}') but got slicing dict {item}"
assert not instance(self._vertices).only(tuple(item)), f"Slicing by vertex indices ('{instance(self._vertices)}') not supported but got slicing dict {item}"
cells = instance(self.shape).name
if cells in item and isinstance(item['cells'], int):
item[cells] = slice(item[cells], item[cells] + 1)
vertices = self._vertices[item]
polygons = self._polygons[item]
vertex_count = self._vertex_count[item]
Expand Down

0 comments on commit e426a4b

Please sign in to comment.