Open cwsmith opened 8 months ago
@cwsmith: thanks for creating this issue. From looking at the gmsh.cc
code:
https://github.com/SCOREC/core/blob/d7cc6c8341e8154a3e33f4746a044d4ebfd84178/test/gmsh.cc#L40-L52
it seems that with gmsh version 4
, the .dmg
file is not needed, where function loadMdsDmgFromGmsh
does not accept .dmg
input file:
https://github.com/SCOREC/core/blob/d7cc6c8341e8154a3e33f4746a044d4ebfd84178/mds/mdsGmsh.cc#L469-L475
for gmsh version 2
, .dmg
input file is an optional file.
It seems that the if statement
corresponding to gmshVersion == 4
needs to be restructured to be consistent with all types of input arguments.
it seems that with gmsh version 4, the .dmg file is not needed
That is correct, v4 can embed sufficient info into the .msh
file for creating the output .dmg
. I'm not sure if all v4 gmsh meshes will have this info though.
loadMdsDmgFromGmsh does not accept .dmg input file
Yeah, thanks for digging.
Regarding the if statement in gmsh.cc
for v4, I agree, there should at least be an else
that prints a helpful error message.
We need to that a case where the first argument, the input model, is not
none
:https://github.com/SCOREC/core/blob/d7cc6c8341e8154a3e33f4746a044d4ebfd84178/test/testing.cmake#L231-L244
This caused problems with a downstream tool: https://github.com/SCOREC/gmshToPumi/issues/2
Note, the
test/gmsh.cc
(from_gmsh
) command line interface has changed a couple times since this repo/example was created. The first change added support for deriving a model if a.null
model was passed in (https://github.com/SCOREC/core/commit/30d5d9fbf064d3a807bdf1fb5a362b73c863bafc) and the second major change added support for gmsh v4 (https://github.com/SCOREC/core/commit/b27c9b2b93d01e018bfbec92d3a215a67192d19b).