Skip to content

Commit

Permalink
dolfinx.io.gmshio.ufl_mesh now requires a trailing dtype argument: ha…
Browse files Browse the repository at this point in the history
…rdcode it to the default real type provided by dolfinx
  • Loading branch information
francesco-ballarin committed Jan 8, 2024
1 parent 3326df8 commit 4c190a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ngsPETSc/utils/fenicsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def model_to_mesh(self, hmax: float, gdim: int = 2,
V = ngmesh.Coordinates()
T = ngmesh.Elements3D().NumPy()["nodes"]
T = np.array([list(np.trim_zeros(a, 'b')) for a in list(T)])-1
ufl_domain = dolfinx.io.gmshio.ufl_mesh(_ngs_to_cells[(gdim,T.shape[1])],gdim)
ufl_domain = dolfinx.io.gmshio.ufl_mesh(
_ngs_to_cells[(gdim,T.shape[1])], gdim, dolfinx.default_real_type)
cell_perm = dolfinx.cpp.io.perm_gmsh(dolfinx.cpp.mesh.to_type(str(ufl_domain.ufl_cell())),
T.shape[1])
T = np.ascontiguousarray(T[:, cell_perm])
Expand Down

0 comments on commit 4c190a3

Please sign in to comment.