0
$\begingroup$

Is there a way to take an existing gmsh .msh file, and convert it to second-order elements? Specifically, I'm trying to go from 8-point hexahedra (hex8) to 20-point hexahedra (hex20). Ideally, I'd like a command-line solution. I tried this:

gmsh -o output.msh -format msh2 input.msh -order 2 -0

But it doesn't seem to work - I still get hex8 elements in the output. Is there a way to do this, or does the order need to be set when the mesh is first generated? I do need to maintain the gmsh version 2 format (unfortunately).

$\endgroup$
1
$\begingroup$

You should ask this on gmsh list. The gmsh developer answers questions.

Searching online suggests an answer

http://geuz.org/pipermail/gmsh/2020/013631.html

Create a geo file like this

Merge "input.msh";
SetOrder 2;
Save "output.msh";

and run it in Gmsh.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.