Skip to content

Commit

Permalink
[geom] Fix Point
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Jan 14, 2024
1 parent 2a2057f commit 345c5b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion phi/geom/_geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class Geometry:
All geometry objects support batching.
Thereby any parameter defining the geometry can be varied along arbitrary batch dims.
All batch dimensions are listed in Geometry.shape.
Property getters (`@property`, such as `shape`), save for getters, must not depend on any variables marked as *variable* via `__variable_attrs__()` as these may be `None` during tracing.
Equality checks must also take this into account.
"""

@property
Expand Down Expand Up @@ -636,14 +639,15 @@ def __init__(self, location: math.Tensor):
assert 'vector' in location.shape, "location must have a vector dimension"
assert location.shape.get_item_names('vector') is not None, "Vector dimension needs to list spatial dimension as item names."
self._location = location
self._shape = self._location.shape

@property
def center(self) -> Tensor:
return self._location

@property
def shape(self) -> Shape:
return self._location.shape
return self._shape

@property
def faces(self) -> 'Geometry':
Expand Down

0 comments on commit 345c5b1

Please sign in to comment.