read in hexahedral mesh


119
views
2
7 weeks ago by
Hello,

I'd like to read in a mesh with hexahedral elements (will be generated with gmsh and converted with meshio to XDMF).
However, the MWE

from dolfin import *

mesh = UnitCubeMesh.create(16, 16, 16, CellType.Type_hexahedron)
XDMFFile('mesh_hex.xdmf').write(mesh)​

mesh2 = Mesh()
XDMFFile('mesh_hex.xdmf').read(mesh2)​


gives the following error:

*** Error: Unable to recognise cell type.
*** Reason: Unknown value "hexahedron".
*** Where: This error was encountered inside XDMFFile.cpp.

So hex meshes can be written but not read by XDMFFile.
Is there another way?

Thanks,
David
Community: FEniCS Project

1 Answer


3
7 weeks ago by
This is probably a bug. Feel free to report it.

Nevertheless note that quad/hex support in DOLFIN is flawed and only meshes which increasing vertex numbers on every cell are supported, see https://bitbucket.org/fenics-project/dolfin/issues/997. A remediation will be provided in DOLFINx.
Ok, thanks for the reply. I didn't now about the ordering.
written 7 weeks ago by David Nolte  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »