<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Nov 2, 2017 at 12:08 PM, Vaclav Hapla <span dir="ltr"><<a href="mailto:vaclav.hapla@erdw.ethz.ch" target="_blank">vaclav.hapla@erdw.ethz.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It seems that DMPlexCreateMedFromFile leaves out some mesh elements. I found it out when investigating why ParMetis redistribution crashes.<br>
<br>
I attach the datafile $PETSC_DIR/share/petsc/<wbr>datafiles/meshes/<wbr>blockcylinder-50.exo converted to GMSH and MED format.<br>
The conversion EXO to GMSH was done by meshio (<a href="http://github.com/nschloe/meshio" rel="noreferrer" target="_blank">github.com/nschloe/meshio</a>), and GMSH to MED by GMSH itself.<br>
<br>
I did:<br>
<br>
cd $PETSC_DIR/src/dm/impls/plex/<wbr>examples/tutorials<br>
make ex5<br>
FILE=blockcylinder-50.exo && ./ex5 -filename $FILE -dm_view hdf5:$FILE.h5 && $PETSC_DIR/bin/petsc_gen_xdmf.<wbr>py $FILE.h5<br>
FILE=blockcylinder-50.msh && ./ex5 -filename $FILE -dm_view hdf5:$FILE.h5 && $PETSC_DIR/bin/petsc_gen_xdmf.<wbr>py $FILE.h5<br>
FILE=blockcylinder-50.med && ./ex5 -filename $FILE -dm_view hdf5:$FILE.h5 && $PETSC_DIR/bin/petsc_gen_xdmf.<wbr>py $FILE.h5<br>
<br>
While the output from blockcylinder-50.exo and blockcylinder-50.msh looks OK, that from blockcylinder-50.med is corrupted.<br>
<br>
I also attach my HDF5/XDMF outputs and screenshots from ParaView.</blockquote><div><br></div><div>It appears that MED, at least coming from GMsh, inverts hexes just like GMsh does. I have fixed this in branch</div><div><br></div><div> knepley/fix-plex-med-orientation</div><div><br></div><div>If you run your test in this, everything should be fine.</div><div><br></div><div>Michael, can you check whether this is a general fix, or it only applied to MED from GMsh?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
Vaclav<br>
<br>
</font></span><br><br>
<br>
<br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>