Skip to content

Commit 1862c21

Browse files
committed
fixes
1 parent 6093669 commit 1862c21

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

firedrake/assemble.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,9 +1864,9 @@ def _(_, self):
18641864
@_as_global_kernel_arg.register(CellFacetKernelArg)
18651865
def _as_global_kernel_arg_cell_facet(_, self):
18661866
if self._mesh.extruded:
1867-
num_facets = self._mesh._base_mesh.ufl_cell().num_facets()
1867+
num_facets = self._mesh._base_mesh.ufl_cell().num_facets
18681868
else:
1869-
num_facets = self._mesh.ufl_cell().num_facets()
1869+
num_facets = self._mesh.ufl_cell().num_facets
18701870
return op2.DatKernelArg((num_facets, 2))
18711871

18721872

firedrake/interpolation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def get_interpolator(expr: Interpolate) -> Interpolator:
289289
submesh_interp_implemented = (
290290
all(isinstance(m.topology, firedrake.mesh.MeshTopology) for m in [target_mesh, source_mesh])
291291
and target_mesh.submesh_ancesters[-1] is source_mesh.submesh_ancesters[-1]
292-
and target_mesh.topological_dimension() == source_mesh.topological_dimension()
292+
and target_mesh.topological_dimension == source_mesh.topological_dimension
293293
)
294294
if target_mesh is source_mesh or submesh_interp_implemented:
295295
return SameMeshInterpolator(expr)
@@ -300,7 +300,7 @@ def get_interpolator(expr: Interpolate) -> Interpolator:
300300
if isinstance(target_topology, VertexOnlyMeshTopology):
301301
if isinstance(source_topology, VertexOnlyMeshTopology):
302302
return VomOntoVomInterpolator(expr)
303-
if target_mesh.geometric_dimension() != source_mesh.geometric_dimension():
303+
if target_mesh.geometric_dimension != source_mesh.geometric_dimension:
304304
raise ValueError("Cannot interpolate onto a mesh of a different geometric dimension")
305305
if not hasattr(target_mesh, "_parent_mesh") or target_mesh._parent_mesh is not source_mesh:
306306
raise ValueError("Can only interpolate across meshes where the source mesh is the parent of the target")
@@ -372,7 +372,7 @@ def __init__(self, expr: Interpolate):
372372
else:
373373
self.missing_points_behaviour = MissingPointsBehaviour.ERROR
374374

375-
if self.source_mesh.geometric_dimension() != self.target_mesh.geometric_dimension():
375+
if self.source_mesh.geometric_dimension != self.target_mesh.geometric_dimension:
376376
raise ValueError("Geometric dimensions of source and destination meshes must match.")
377377

378378
dest_element = self.target_space.ufl_element()
@@ -407,7 +407,7 @@ def _build_symbolic_expressions(self) -> None:
407407
# Immerse coordinates of target space point evaluation dofs in src_mesh
408408
target_space_vec = firedrake.VectorFunctionSpace(self.target_mesh, self.dest_element)
409409
f_dest_node_coords = assemble(interpolate(self.target_mesh.coordinates, target_space_vec))
410-
dest_node_coords = f_dest_node_coords.dat.data_ro.reshape(-1, self.target_mesh.geometric_dimension())
410+
dest_node_coords = f_dest_node_coords.dat.data_ro.reshape(-1, self.target_mesh.geometric_dimension)
411411
try:
412412
self.vom = firedrake.VertexOnlyMesh(
413413
self.source_mesh,
@@ -981,7 +981,7 @@ def rebuild_dg(element, expr_cell, rt_var_name):
981981
# dual basis. This exists on the same reference cell as the input element
982982
# and we can interpolate onto it before mapping the result back onto the
983983
# target space.
984-
expr_tdim = expr_cell.topological_dimension()
984+
expr_tdim = expr_cell.topological_dimension
985985
# Need point evaluations and matching weights from dual basis.
986986
# This could use FIAT's dual basis as below:
987987
# num_points = sum(len(dual.get_point_dict()) for dual in element.fiat_equivalent.dual_basis())

0 commit comments

Comments
 (0)