I created a brain mesh with Tetgen and I have obtained a file .mesh.
In order to use it with Fenics I used dolfin-converter but it creates me problems since the previous mesh was high quality but using dolfin_converter it gets worse.
The error that Fenics gave me is the following:
*** Error: Unable to compute tetrahedron point collision.
*** Reason: Not implemented for degenerate tetrahedron.
*** Where: This error was encountered inside CollisionPredicates.cpp.
*** Process: 0
I managed to convert it using meshio from a file .mesh to a file .xml.
I have only one question: is it possible to keep the labels (an integer) that every tetheadron has in the file .mesh also in the output file?
In order to convert it I use the command: meshio-convert input.mesh output.xml
Could I set an option in order to include those label?
I do not know how to do it using the meshio-convert script, as I use the meshio Python API. In the script Iāve linked to, it saves the cell data (loaded as a dictionary with key "gmsh:physical")
Perfect, I used your script and I saw the dictionary. But if I load the output.xml in another script fenics as mesh, how can I access to that dictionary?
I mean, if I load it as:
mesh= Mesh(āoutput.xmlā)
and then I want to create a MeshFunction using the information in that dictionary, how can I do?
I cannot understand. In my script I want to create a MeshFunction with the integer values that I have for each tetraedra and they are saved in this way:
{āname_to_readā: {ātetraā: array([2, 2, 2, ā¦, 2, 2, 2])}}
(using the command print(tetra_mesh.cell_data_dict) in the conversion file)
As you have still not supplied me with a mesh, I cannot do much to help you.
What I am linking you to in the previous post is that the xml file most likely contains the domain markers, and you can extract them from it.
If you want to make something that works in parallel, you need to do the following: