[petsc-dev] DMPlexCreateMedFromFile broken

Vaclav Hapla vaclav.hapla at erdw.ethz.ch
Tue Nov 7 10:44:11 CST 2017


Nico Schlömer just introduced MED support into his meshio tool, based on my issue request. When I convert blockcylinder-50.exo directly to the MED format with meshio, the result can be loaded into GMSH and looks reasonable. But DMPlexCreateMedFromFile denies to open it with the following error:

_MEDmeshAdvancedRd236.c [285] : Erreur de valeur invalide du filtre 
_MEDmeshAdvancedRd236.c [285] : 
_MEDmeshAdvancedRd236.c [286] : geotype = 0
_MEDmeshAdvancedRd236.c [286] : meshname = "mesh0"
_MEDmeshAdvancedRd236.c [286] : _datagroupname2 = "NOE"
_MEDmeshAdvancedRd236.c [287] : (*_filter).storagemode = 2
[0]PETSC ERROR: #1 DMPlexCreateMedFromFile() line 86 in /scratch/petsc-dev/src/dm/impls/plex/plexmed.c
[0]PETSC ERROR: #2 DMPlexCreateFromFile() line 2815 in /scratch/petsc-dev/src/dm/impls/plex/plexcreate.c
[0]PETSC ERROR: #3 main() line 38 in /scratch/petsc-dev/src/dm/impls/plex/examples/tutorials/ex5.c

Can you see whether it's a bug in DMPlexCreateMedFromFile or the MED file is broken?

Thanks

Vaclav


> 5. 11. 2017 v 18:48, Matthew Knepley <knepley at gmail.com>:
> 
> On Thu, Nov 2, 2017 at 12:08 PM, Vaclav Hapla <vaclav.hapla at erdw.ethz.ch <mailto:vaclav.hapla at erdw.ethz.ch>> wrote:
> It seems that DMPlexCreateMedFromFile leaves out some mesh elements. I found it out when investigating why ParMetis redistribution crashes.
> 
> I attach the datafile $PETSC_DIR/share/petsc/datafiles/meshes/blockcylinder-50.exo converted to GMSH and MED format.
> The conversion EXO to GMSH was done by meshio (github.com/nschloe/meshio <http://github.com/nschloe/meshio>), and GMSH to MED by GMSH itself.
> 
> I did:
> 
> cd $PETSC_DIR/src/dm/impls/plex/examples/tutorials
> make ex5
> FILE=blockcylinder-50.exo && ./ex5 -filename $FILE -dm_view hdf5:$FILE.h5 && $PETSC_DIR/bin/petsc_gen_xdmf.py $FILE.h5
> FILE=blockcylinder-50.msh && ./ex5 -filename $FILE -dm_view hdf5:$FILE.h5 && $PETSC_DIR/bin/petsc_gen_xdmf.py $FILE.h5
> FILE=blockcylinder-50.med && ./ex5 -filename $FILE -dm_view hdf5:$FILE.h5 && $PETSC_DIR/bin/petsc_gen_xdmf.py $FILE.h5
> 
> While the output from blockcylinder-50.exo and blockcylinder-50.msh looks OK, that from blockcylinder-50.med is corrupted.
> 
> I also attach my HDF5/XDMF outputs and screenshots from ParaView.
> 
> It appears that MED, at least coming from GMsh, inverts hexes just like GMsh does. I have fixed this in branch
> 
>   knepley/fix-plex-med-orientation
> 
> If you run your test in this, everything should be fine.
> 
> Michael, can you check whether this is a general fix, or it only applied to MED from GMsh?
> 
>   Thanks,
> 
>      Matt
>  
> 
> Vaclav
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener
> 
> https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20171107/9e3eeff6/attachment-0001.html>


More information about the petsc-dev mailing list