[Gmsh] 2D to 3D

Geordie McBain gdmcbain at freeshell.org
Wed Jul 8 02:15:34 CEST 2009


On Tue, Jul 7, 2009 at 10:39 PM, Hines, Albert M.<Albert.Hines at alcoa.com> wrote:
> Please pardon the lack of experience, but I have a closed triangulation
> such as this:
>
>                $MeshFormat
>                2 0 8
>                $EndMeshFormat
>                $Nodes
>                5
>                1   0.0   0.0   0.0
>                2   1.0   0.0   0.0
>                3   0.5   1.0   0.0
>                4   0.5   0.6  0.75
>                5   0.5   0.1  0.75
>                $EndNodes
>                $Elements
>                6
>                1 2 2 1 0   2 3 1
>                2 2 2 1 0   5 4 2
>                3 2 2 1 0   4 3 2
>                4 2 2 1 0   4 1 3
>                5 2 2 1 0   1 4 5
>                6 2 2 1 0   5 2 1
>                $EndElements
>
> and simply wish to generate a conformal linear tetrahedral mesh.
> However, when I attempt a 3D mesh, nothing happens. Do I need to
> manually define some sort of volume to which these triangles belong?
> Puzzled,

Yes, it works if you define a volume.  I saved your .msh code as
hines-in.msh then wrote this script:

%<---hines.geo---
Merge "hines-in.msh";
Surface Loop(1) = {0};
Volume(2) = {1};
Physical Volume(3) = {2};
%<---end-hines.geo---

and called it with

  $ gmsh -3 hines.geo

to produce a hines.msh with two four-node tetrahedral elements.
  You can achieve the same effect in the GUI too.