Hi,
I’m currently trying to load in a mesh generated through gmsh and converted to .xdmf through meshio-convert. This mesh is simply a line with a 15 degree bend at a certain point. Here’s the .geo file:
// Gmsh project created on Mon Dec 09 14:38:39 2019
SetFactory("OpenCASCADE");
//+
Point(1) = {0, 0, 0, 1.0};
//+
Point(2) = {1000, 0, 0, 1.0};
//+
Point(3) = {965, 259, 0, 1.0};
//+
Line(1) = {1, 2};
//+
Line(2) = {2, 3};
//+
Transfinite Curve {1} = 50 Using Progression 1;
//+
Transfinite Curve {2} = 40 Using Progression 1;
I noticed that the msh file does not convert to a xml file but converts to a xdmf file no problem. This is the .xdmf file:
<Domain>
<Grid Name="Grid">
<Information Name="Information" Value="0"><![CDATA[<main/>]]></Information>
<Geometry GeometryType="XYZ">
<DataItem DataType="Float" Dimensions="89 3" Format="HDF" Precision="8">Geomnew.h5:/data0</DataItem>
</Geometry>
<Topology NumberOfElements="91" TopologyType="Mixed">
<DataItem DataType="Int" Dimensions="358" Format="HDF" Precision="4">Geomnew.h5:/data1</DataItem>
</Topology>
</Grid>
</Domain>
</Xdmf>
I then tried to load the file using:
from dolfin import *
mesh = Mesh()
filename = "Geomnew.xdmf"
f = XDMFFile(filename)
f.read(mesh)
But get the following error:
*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
*** fenics-support@googlegroups.com
***
*** 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.1.0
*** -------------------------------------------------------------------------
I’m wondering if there is a work around for this error as FEniCS doesn’t seem to like the mixed elements. Or is there a way of using IntervalMesh and rotating a region about a point? Any guidance would be much appreciated.
Cheers.