[Gmsh] Problem defining a compound geometry

Harish Narayanan harish.mlists at gmail.com
Fri Dec 9 11:45:48 CET 2011


Hello all,

I am having difficulty defining compound geometries. The problem I
originally experienced was for a more complicated union of volumes, but
the same issue shows up for the simple following case involving trying
to merge two unit squares.

lc = 0.25;

Point(1) = {0, 0, 0, lc};
Point(2) = {1, 0, 0, lc};
Point(3) = {1, 1, 0, lc};
Point(4) = {0, 1, 0, lc};

Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line Loop(5) = {1, 2, 3, 4};

Plane Surface(6) = {5};
Translate {-0.5, -0.5, 0.0} {
    Duplicata{Surface{6};}
} // Surface(7)
Compound Surface (8) = {6, 7};

//Mesh.RemeshAlgorithm=1;

1. If I try the code above without Mesh.RemeshAlgorithm set to 1, Gmsh
crashes with:

Info    : Meshing surface 8 (Compound surface, MeshAdapt)
Warning : Wrong topology: Genus=-1, Nb boundaries=2, AR=1.5
Error   : For remeshing your geometry, you should enable the automatic
remeshing algorithm.
Error   : Add 'Mesh.RemeshAlgorithm=1;' in your geo file or through the
Fltk window (Options > Mesh > General)

2. If I try it Mesh.RemeshAlgorithm set to 1, Gmsh seemingly hangs while
attempting to complete the meshing process.

Could someone please help me understand what is going on? I am assuming
that Compound Surface (and Volume) are meant to take unions of
geometries. Have I misunderstood what they are for?

Thanks,
Harish