From 4c190a3f1c33b70128c541f6f6f0dcf764677c3d Mon Sep 17 00:00:00 2001 From: Francesco Ballarin Date: Mon, 8 Jan 2024 07:37:58 +0100 Subject: [PATCH] dolfinx.io.gmshio.ufl_mesh now requires a trailing dtype argument: hardcode it to the default real type provided by dolfinx --- ngsPETSc/utils/fenicsx.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ngsPETSc/utils/fenicsx.py b/ngsPETSc/utils/fenicsx.py index 20f136d..91283fc 100644 --- a/ngsPETSc/utils/fenicsx.py +++ b/ngsPETSc/utils/fenicsx.py @@ -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])