On Mon, May 13, 2024 at 9:33 PM Adrian Croucher <a.crouc...@auckland.ac.nz> wrote:
> hi, We often create meshes in GMSH format using the meshio library. This > works OK if we stick to GMSH file format 2. 2. If we use GMSH file format > 4. 1, DMPlex can't read them because it expects the "Entities" section to > be present: [0]PETSC > ZjQcmQRYFpfptBannerStart > This Message Is From an External Sender > This message came from outside your organization. > > ZjQcmQRYFpfptBannerEnd > > hi, > > We often create meshes in GMSH format using the meshio library. This > works OK if we stick to GMSH file format 2.2. > > If we use GMSH file format 4.1, DMPlex can't read them because it > expects the "Entities" section to be present: > > [0]PETSC ERROR: Unexpected data in file > [0]PETSC ERROR: File is not a valid Gmsh file, expecting $Entities, not > $Nodes > [0]PETSC ERROR: See > https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!ZfBS1KM5EBZ7ZJIu6lBKFcclVMmXteXsW8m9HBEZ5tIf0u_3duEFt9eXKF7FcorQSAQqD5SbJrYh4C8rX676S_IMI_sp6naX$ > for trouble shooting. > [0]PETSC ERROR: Petsc Development GIT revision: > v3.21.1-124-g2d06e2faec8 GIT Date: 2024-05-08 19:31:33 +0000 > [0]PETSC ERROR: waiwera on a main-debug named EN438880 by acro018 Tue > May 14 11:25:54 2024 > [0]PETSC ERROR: Configure options --with-x --download-hdf5 > --download-zlib --download-netcdf --download-pnetcdf --download-exodusii > --download-triangle --download-ptscotch --download-chaco --download-hypre > [0]PETSC ERROR: #1 GmshExpect() at > /home/acro018/software/PETSc/code/src/dm/impls/plex/plexgmsh.c:270 > [0]PETSC ERROR: #2 DMPlexCreateGmsh() at > /home/acro018/software/PETSc/code/src/dm/impls/plex/plexgmsh.c:1608 > [0]PETSC ERROR: #3 DMPlexCreateGmshFromFile() at > /home/acro018/software/PETSc/code/src/dm/impls/plex/plexgmsh.c:1469 > [0]PETSC ERROR: #4 DMPlexCreateFromFile() at > /home/acro018/software/PETSc/code/src/dm/impls/plex/plexcreate.c:5804 > > By default meshio doesn't seem to write the Entities section. From what > I can gather, it is optional. > > Am I right that this section is not optional in DMPlex? > > I wish GMsh was clearer about what is optional: https://urldefense.us/v3/__https://gmsh.info/doc/texinfo/gmsh.html*MSH-file-format__;Iw!!G_uCfscf7eWS!fS2tI8aC3rUnGOv-LbLPj1PRyijAPB-EO54CwUBP6pNFD-VKeGE98pOHepNMSTP_krHBKTZNk92Bx01NrC-T$ They do talk about it, but not exhaustively. GMsh always writes and $Entities block from what I can tell. I can make it optional, it just might take until after the PETSc Meeting. Thanks, Matt - Adrian > > -- > Dr Adrian Croucher > Senior Research Fellow > Department of Engineering Science > Waipapa Taumata Rau / University of Auckland, New Zealand > email: a.crouc...@auckland.ac.nz > tel: +64 (0)9 923 4611 > > > -- 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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!fS2tI8aC3rUnGOv-LbLPj1PRyijAPB-EO54CwUBP6pNFD-VKeGE98pOHepNMSTP_krHBKTZNk92Bx1gj7y2J$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!fS2tI8aC3rUnGOv-LbLPj1PRyijAPB-EO54CwUBP6pNFD-VKeGE98pOHepNMSTP_krHBKTZNk92Bx_9VtYPq$ >