Skip to content

Commit

Permalink
Merge pull request #384 from firedrakeproject/JHopeCollins/mesh_init_…
Browse files Browse the repository at this point in the history
…orientations

PR #384: only call mesh.init_cell_orientations if it hasn't been called before
  • Loading branch information
tommbendall authored Jul 24, 2023
2 parents 96a5d68 + c946431 commit d4e9451
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gusto/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def __init__(self, mesh, dt, family, degree=None,
if hasattr(mesh, "_bash_mesh"):
sphere_degree = mesh._base_mesh.coordinates.function_space().ufl_element().degree()
else:
mesh.init_cell_orientations(x)
if not hasattr(mesh, "_cell_orientations"):
mesh.init_cell_orientations(x)
sphere_degree = mesh.coordinates.function_space().ufl_element().degree()
V = VectorFunctionSpace(mesh, "DG", sphere_degree)
self.outward_normals = Function(V).interpolate(CellNormal(mesh))
Expand Down

0 comments on commit d4e9451

Please sign in to comment.