Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
finsberg committed Oct 29, 2023
1 parent 6fa8757 commit b0f7304
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pulse2/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _get_longaxis(long_axis: str | int | LongAxis) -> int:
@dataclass(slots=True)
class Geometry:
mesh: dolfin.Mesh
markers: dict[str, tuple[int, int] | list[int]] = field(default_factory=dict)
markers: dict[str, tuple[int, int]] = field(default_factory=dict)
f0: dolfin.Function | None = None
s0: dolfin.Function | None = None
n0: dolfin.Function | None = None
Expand Down Expand Up @@ -109,7 +109,11 @@ def from_file(
raise RuntimeError(f"No mesh found in file {h5name}")

attrs = h5file.attributes(h5group).to_dict()
markers = json.loads(attrs.get("markers", "{}"))
markers = {
k: (int(v[0]), int(v[1]))
for k, v in json.loads(attrs.get("markers", "{}")).items()
if len(v) == 2
}
long_axis = attrs.get("long_axis", 0)
d = mesh.geometry().dim()

Expand Down

0 comments on commit b0f7304

Please sign in to comment.