Hello,
I’m having trouble to load a 2D mesh as .xdmf file. My original mesh is a backfward facing step domain, I’m know trying to read a simple 1x1 square generated with gmsh and then converted to .xdmf using meshio convert comand.
This is the simple .geo file i used for the square:
p = newp;
Point(p+1) = {0, 0, 0, 0.1};
Point(p+2) = {1, 0, 0, 0.1};
Point(p+3) = {1, 1, 0, 0.1};
Point(p+4) = {0, 1, 0, 0.1};
l = newl;
Line(l+1) = {p+1, p+2};
Line(l+2) = {p+2, p+3};
Line(l+3) = {p+3, p+4};
Line(l+4) = {p+4, p+1};
// No slip wall
noslip1=3;
Physical Line(noslip1) = {l+1, l+2, l+3, l+4};
bd = newll;
Curve Loop(bd) = {(l+1),(l+2), (l+3), (l+4)};
s = news;
Plane Surface(s) = {bd};
tot=1;
Physical Surface(tot) = {s};
I try to read the mesh using:
from dolfin import *
mesh = Mesh()
with XDMFFile("square.xdmf") as infile:
infile.read(mesh)
and it gives me a general error:
Traceback (most recent call last):
File "/home/filip/Tesi/DRL-control/mesh/try_load.py", line 11, in <module>
infile.read(mesh)
RuntimeError:
*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
*** https://fenicsproject.discourse.group/
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error: Unable to recognise cell type.
*** Reason: Unknown value "mixed".
*** Where: This error was encountered inside XDMFFile.cpp.
*** Process: 0
***
*** DOLFIN version: 2019.2.0.13.dev0
*** Git changeset: ubuntu
*** -------------------------------------------------------------------------
I tried to inspect the .msh file using meshio info, and this is the output:
<meshio mesh object>
Number of points: 142
Number of cells:
line: 10
line: 10
line: 10
line: 10
triangle: 242
Cell sets: gmsh:bounding_entities
Point data: gmsh:dim_tags
Cell data: gmsh:physical, gmsh:geometrical
meshio.version = 5.3.5
dolfin.version = 2019.2.0.13.dev0
I’m not able to solve the issue and I would be very thankful if someone could help me.
The backward facing step mesh is a new one, in the past months i was able to successfully load a slightly different mesh in a .h5 format.