Skip to content

Commit 43b8ebb

Browse files
authored
Merge pull request #228 from scientificcomputing/dokken/v0.9.0-compat-entitymap-typehint
Make EntityMap typehint backwards compatible (v0.9.x)
2 parents fb552a3 + b3c9cfc commit 43b8ebb

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/scifem/interpolation.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import numpy as np
55
import numpy.typing as npt
66
from .utils import unroll_dofmap
7+
from .mesh import _EntityMap
78

89
__all__ = ["interpolation_matrix", "prepare_interpolation_data", "interpolate_to_surface_submesh"]
910

@@ -333,7 +334,7 @@ def interpolate_to_surface_submesh(
333334
u_surface: dolfinx.fem.Function,
334335
submesh_facets: npt.NDArray[np.int32],
335336
integration_entities: npt.NDArray[np.int32],
336-
entity_maps: list[dolfinx.mesh.EntityMap] | None = None,
337+
entity_maps: list[_EntityMap] | None = None,
337338
):
338339
"""
339340
Interpolate a function `u_volume` into the function `u_surface`.

‎src/scifem/mesh.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class _EntityMap(Protocol):
3939

4040
sub_topology: dolfinx.mesh.Topology
4141
dim: int
42+
_cpp_object: object
4243

4344
def sub_topology_to_topology(
4445
self, entities: npt.NDArray[np.int32], inverse: bool

0 commit comments

Comments
 (0)