[petsc-dev] DMPlexCreateMedFromFile broken
Matthew Knepley
knepley at gmail.com
Fri Nov 3 13:58:27 CDT 2017
On Thu, Nov 2, 2017 at 12:08 PM, Vaclav Hapla <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),
> 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.
>
Hi Vaclav,
You are right that something is wrong. Its easy to verify that the number
of cells and vertices is the same in all meshes. Look at the difference
in Plex outputs, it appears that some cells are not correctly oriented:
knepley/feature-adaptor-plex
*$:/PETSc3/petsc/petsc-dev/src/dm/impls/plex/examples/tutorials/vaclav$
../ex5 -filename ./inputs/blockcylinder-50.exo -dm_view ::ascii_info_detail
> err1
knepley/feature-adaptor-plex
*$:/PETSc3/petsc/petsc-dev/src/dm/impls/plex/examples/tutorials/vaclav$
../ex5 -filename ./inputs/blockcylinder-50.msh -dm_view ::ascii_info_detail
> err2
knepley/feature-adaptor-plex
*$:/PETSc3/petsc/petsc-dev/src/dm/impls/plex/examples/tutorials/vaclav$
diff err1 err2
1c1
< DM Object: cubit(blockcylinder-50.exo): 02/04/2013: 17:50:28 1 MPI
processes
---
> DM Object: 1 MPI processes
3c3
< Mesh 'cubit(blockcylinder-50.exo): 02/04/2013: 17:50:28':
---
> Mesh 'DM_0x84000000_0':
1knepley/feature-adaptor-plex
*$:/PETSc3/petsc/petsc-dev/src/dm/impls/plex/examples/tutorials/vaclav$
../ex5 -filename ./inputs/blockcylinder-50.med -dm_view ::ascii_info_detail
> err3
knepley/feature-adaptor-plex
*$:/PETSc3/petsc/petsc-dev/src/dm/impls/plex/examples/tutorials/vaclav$
diff err1 err3
1c1
< DM Object: cubit(blockcylinder-50.exo): 02/04/2013: 17:50:28 1 MPI
processes
---
> DM Object: 1 MPI processes
3c3
< Mesh 'cubit(blockcylinder-50.exo): 02/04/2013: 17:50:28':
---
> Mesh 'DM_0x84000000_0':
461,462d460
< [0]: 0 <---- 61 (0)
< [0]: 0 <---- 62 (0)
463a462,463
> [0]: 0 <---- 62 (0)
> [0]: 0 <---- 61 (0)
469,470d468
< [0]: 1 <---- 61 (0)
< [0]: 1 <---- 66 (0)
471a470,471
> [0]: 1 <---- 66 (0)
> [0]: 1 <---- 61 (0)
477,478d476
< [0]: 2 <---- 70 (0)
< [0]: 2 <---- 71 (0)
479a478,479
> [0]: 2 <---- 71 (0)
> [0]: 2 <---- 70 (0)
485,486d484
< [0]: 3 <---- 74 (0)
< [0]: 3 <---- 75 (0)
487a486,487
> [0]: 3 <---- 75 (0)
> [0]: 3 <---- 74 (0)
493,494d492
< [0]: 4 <---- 78 (0)
< [0]: 4 <---- 79 (0)
495a494,495
> [0]: 4 <---- 79 (0)
> [0]: 4 <---- 78 (0)
501,502d500
< [0]: 5 <---- 79 (0)
< [0]: 5 <---- 82 (0)
503a502,503
> [0]: 5 <---- 82 (0)
> [0]: 5 <---- 79 (0)
509,510d508
< [0]: 6 <---- 78 (0)
< [0]: 6 <---- 85 (0)
511a510,511
> [0]: 6 <---- 85 (0)
> [0]: 6 <---- 78 (0)
517,518d516
< [0]: 7 <---- 88 (0)
< [0]: 7 <---- 89 (0)
519a518,519
> [0]: 7 <---- 89 (0)
> [0]: 7 <---- 88 (0)
525,526d524
< [0]: 8 <---- 92 (0)
< [0]: 8 <---- 93 (0)
527a526,527
> [0]: 8 <---- 93 (0)
> [0]: 8 <---- 92 (0)
533,534d532
< [0]: 9 <---- 99 (0)
< [0]: 9 <---- 100 (0)
535a534,535
> [0]: 9 <---- 100 (0)
> [0]: 9 <---- 99 (0)
541,542d540
< [0]: 10 <---- 93 (0)
< [0]: 10 <---- 92 (0)
543a542,543
> [0]: 10 <---- 92 (0)
> [0]: 10 <---- 93 (0)
549,550d548
< [0]: 11 <---- 71 (0)
< [0]: 11 <---- 75 (0)
551a550,551
> [0]: 11 <---- 75 (0)
> [0]: 11 <---- 71 (0)
557,558d556
< [0]: 12 <---- 105 (0)
< [0]: 12 <---- 67 (0)
559a558,559
> [0]: 12 <---- 67 (0)
> [0]: 12 <---- 105 (0)
565,566d564
< [0]: 13 <---- 100 (0)
< [0]: 13 <---- 85 (0)
567a566,567
> [0]: 13 <---- 85 (0)
> [0]: 13 <---- 100 (0)
573,574d572
< [0]: 14 <---- 57 (0)
< [0]: 14 <---- 58 (0)
575a574,575
> [0]: 14 <---- 58 (0)
> [0]: 14 <---- 57 (0)
581,582d580
< [0]: 15 <---- 57 (0)
< [0]: 15 <---- 64 (0)
583a582,583
> [0]: 15 <---- 64 (0)
> [0]: 15 <---- 57 (0)
589,590d588
< [0]: 16 <---- 68 (0)
< [0]: 16 <---- 69 (0)
591a590,591
> [0]: 16 <---- 69 (0)
> [0]: 16 <---- 68 (0)
597,598d596
< [0]: 17 <---- 72 (0)
< [0]: 17 <---- 73 (0)
599a598,599
> [0]: 17 <---- 73 (0)
> [0]: 17 <---- 72 (0)
605,606d604
< [0]: 18 <---- 76 (0)
< [0]: 18 <---- 77 (0)
607a606,607
> [0]: 18 <---- 77 (0)
> [0]: 18 <---- 76 (0)
613,614d612
< [0]: 19 <---- 77 (0)
< [0]: 19 <---- 80 (0)
615a614,615
> [0]: 19 <---- 80 (0)
> [0]: 19 <---- 77 (0)
621,622d620
< [0]: 20 <---- 76 (0)
< [0]: 20 <---- 84 (0)
623a622,623
> [0]: 20 <---- 84 (0)
> [0]: 20 <---- 76 (0)
629,630d628
< [0]: 21 <---- 86 (0)
< [0]: 21 <---- 87 (0)
631a630,631
> [0]: 21 <---- 87 (0)
> [0]: 21 <---- 86 (0)
637,638d636
< [0]: 22 <---- 90 (0)
< [0]: 22 <---- 91 (0)
639a638,639
> [0]: 22 <---- 91 (0)
> [0]: 22 <---- 90 (0)
645,646d644
< [0]: 23 <---- 95 (0)
< [0]: 23 <---- 96 (0)
647a646,647
> [0]: 23 <---- 96 (0)
> [0]: 23 <---- 95 (0)
653,654d652
< [0]: 24 <---- 91 (0)
< [0]: 24 <---- 90 (0)
655a654,655
> [0]: 24 <---- 90 (0)
> [0]: 24 <---- 91 (0)
661,662d660
< [0]: 25 <---- 69 (0)
< [0]: 25 <---- 73 (0)
663a662,663
> [0]: 25 <---- 73 (0)
> [0]: 25 <---- 69 (0)
669,670d668
< [0]: 26 <---- 104 (0)
< [0]: 26 <---- 65 (0)
671a670,671
> [0]: 26 <---- 65 (0)
> [0]: 26 <---- 104 (0)
677,678d676
< [0]: 27 <---- 96 (0)
< [0]: 27 <---- 84 (0)
679a678,679
> [0]: 27 <---- 84 (0)
> [0]: 27 <---- 96 (0)
685,686d684
< [0]: 28 <---- 107 (0)
< [0]: 28 <---- 108 (0)
687a686,687
> [0]: 28 <---- 108 (0)
> [0]: 28 <---- 107 (0)
693,694d692
< [0]: 29 <---- 107 (0)
< [0]: 29 <---- 110 (0)
695a694,695
> [0]: 29 <---- 110 (0)
> [0]: 29 <---- 107 (0)
701,702d700
< [0]: 30 <---- 112 (0)
< [0]: 30 <---- 113 (0)
703a702,703
> [0]: 30 <---- 113 (0)
> [0]: 30 <---- 112 (0)
709,710d708
< [0]: 31 <---- 114 (0)
< [0]: 31 <---- 115 (0)
711a710,711
> [0]: 31 <---- 115 (0)
> [0]: 31 <---- 114 (0)
717,718d716
< [0]: 32 <---- 116 (0)
< [0]: 32 <---- 117 (0)
719a718,719
> [0]: 32 <---- 117 (0)
> [0]: 32 <---- 116 (0)
725,726d724
< [0]: 33 <---- 117 (0)
< [0]: 33 <---- 118 (0)
727a726,727
> [0]: 33 <---- 118 (0)
> [0]: 33 <---- 117 (0)
733,734d732
< [0]: 34 <---- 116 (0)
< [0]: 34 <---- 120 (0)
735a734,735
> [0]: 34 <---- 120 (0)
> [0]: 34 <---- 116 (0)
741,742d740
< [0]: 35 <---- 121 (0)
< [0]: 35 <---- 122 (0)
743a742,743
> [0]: 35 <---- 122 (0)
> [0]: 35 <---- 121 (0)
749,750d748
< [0]: 36 <---- 123 (0)
< [0]: 36 <---- 124 (0)
751a750,751
> [0]: 36 <---- 124 (0)
> [0]: 36 <---- 123 (0)
757,758d756
< [0]: 37 <---- 126 (0)
< [0]: 37 <---- 127 (0)
759a758,759
> [0]: 37 <---- 127 (0)
> [0]: 37 <---- 126 (0)
765,766d764
< [0]: 38 <---- 124 (0)
< [0]: 38 <---- 123 (0)
767a766,767
> [0]: 38 <---- 123 (0)
> [0]: 38 <---- 124 (0)
773,774d772
< [0]: 39 <---- 113 (0)
< [0]: 39 <---- 115 (0)
775a774,775
> [0]: 39 <---- 115 (0)
> [0]: 39 <---- 113 (0)
781,782d780
< [0]: 40 <---- 130 (0)
< [0]: 40 <---- 111 (0)
783a782,783
> [0]: 40 <---- 111 (0)
> [0]: 40 <---- 130 (0)
789,790d788
< [0]: 41 <---- 127 (0)
< [0]: 41 <---- 120 (0)
791a790,791
> [0]: 41 <---- 120 (0)
> [0]: 41 <---- 127 (0)
797,798d796
< [0]: 42 <---- 132 (0)
< [0]: 42 <---- 133 (0)
799a798,799
> [0]: 42 <---- 133 (0)
> [0]: 42 <---- 132 (0)
805,806d804
< [0]: 43 <---- 132 (0)
< [0]: 43 <---- 135 (0)
807a806,807
> [0]: 43 <---- 135 (0)
> [0]: 43 <---- 132 (0)
813,814d812
< [0]: 44 <---- 137 (0)
< [0]: 44 <---- 138 (0)
815a814,815
> [0]: 44 <---- 138 (0)
> [0]: 44 <---- 137 (0)
821,822d820
< [0]: 45 <---- 139 (0)
< [0]: 45 <---- 140 (0)
823a822,823
> [0]: 45 <---- 140 (0)
> [0]: 45 <---- 139 (0)
829,830d828
< [0]: 46 <---- 141 (0)
< [0]: 46 <---- 142 (0)
831a830,831
> [0]: 46 <---- 142 (0)
> [0]: 46 <---- 141 (0)
837,838d836
< [0]: 47 <---- 142 (0)
< [0]: 47 <---- 143 (0)
839a838,839
> [0]: 47 <---- 143 (0)
> [0]: 47 <---- 142 (0)
845,846d844
< [0]: 48 <---- 141 (0)
< [0]: 48 <---- 145 (0)
847a846,847
> [0]: 48 <---- 145 (0)
> [0]: 48 <---- 141 (0)
853,854d852
< [0]: 49 <---- 146 (0)
< [0]: 49 <---- 147 (0)
855a854,855
> [0]: 49 <---- 147 (0)
> [0]: 49 <---- 146 (0)
861,862d860
< [0]: 50 <---- 148 (0)
< [0]: 50 <---- 149 (0)
863a862,863
> [0]: 50 <---- 149 (0)
> [0]: 50 <---- 148 (0)
869,870d868
< [0]: 51 <---- 151 (0)
< [0]: 51 <---- 152 (0)
871a870,871
> [0]: 51 <---- 152 (0)
> [0]: 51 <---- 151 (0)
877,878d876
< [0]: 52 <---- 149 (0)
< [0]: 52 <---- 148 (0)
879a878,879
> [0]: 52 <---- 148 (0)
> [0]: 52 <---- 149 (0)
885,886d884
< [0]: 53 <---- 138 (0)
< [0]: 53 <---- 140 (0)
887a886,887
> [0]: 53 <---- 140 (0)
> [0]: 53 <---- 138 (0)
893,894d892
< [0]: 54 <---- 155 (0)
< [0]: 54 <---- 136 (0)
895a894,895
> [0]: 54 <---- 136 (0)
> [0]: 54 <---- 155 (0)
901,902d900
< [0]: 55 <---- 152 (0)
< [0]: 55 <---- 145 (0)
903a902,903
> [0]: 55 <---- 145 (0)
> [0]: 55 <---- 152 (0)
1knepley/feature-adaptor-plex
*$:/PETSc3/petsc/petsc-dev/src/dm/impls/plex/examples/tutorials/vaclav$
I think this is a bug in GMsh as it appears to give us MED cells with wrong
orientations. Let me see about checking
and correcting the orientations.
Thanks,
Matt
> I also attach my HDF5/XDMF outputs and screenshots from ParaView.
>
> 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/20171103/77fbacbb/attachment.html>
More information about the petsc-dev
mailing list