[Gmsh] create the coarsest 3d hexahedra mesh

Denis Davydov davydden at gmail.com
Wed Mar 27 18:31:47 CET 2013


p/s/ 

here is a simple .geo file which illustrate the problem. 
1D and 2D meshes look fine, but on 3D something is wrong…
Is there a way to make 3D hex mesh work at least for such a simple/trivial case?

cl__1 = 1;
Point(1) = {-36.15000000000001, 0, 0, 1};
Point(2) = {-36.15000000000001, 14.46, 0, 1};
Point(3) = {-36.15000000000001, 14.46, 14.46, 1};
Point(4) = {-36.15000000000001, 0, 14.46, 1};
Point(5) = {0, 0, 0, 1};
Point(6) = {0, 14.46, 0, 1};
Point(7) = {0, 14.46, 14.46, 1};
Point(8) = {0, 0, 14.46, 1};
Point(9) = {7.23, 0, 0, 1};
Point(10) = {7.23, 14.46, 0, 1};
Point(11) = {7.23, 14.46, 14.46, 1};
Point(12) = {7.23, 0, 14.46, 1};
Point(13) = {14.46, 0, 0, 1};
Point(14) = {14.46, 14.46, 0, 1};
Point(15) = {14.46, 14.46, 14.46, 1};
Point(16) = {14.46, 0, 14.46, 1};
Line(1) = {1, 4};
Line(2) = {4, 3};
Line(3) = {3, 2};
Line(4) = {2, 1};
Line(5) = {4, 8};
Line(6) = {8, 7};
Line(7) = {7, 3};
Line(8) = {7, 6};
Line(9) = {6, 2};
Line(10) = {8, 5};
Line(11) = {5, 6};
Line(12) = {5, 1};
Line(13) = {8, 12};
Line(14) = {12, 16};
Line(15) = {12, 11};
Line(16) = {11, 7};
Line(17) = {11, 10};
Line(18) = {10, 6};
Line(19) = {10, 9};
Line(20) = {9, 12};
Line(21) = {9, 5};
Line(22) = {10, 14};
Line(23) = {14, 15};
Line(24) = {15, 11};
Line(25) = {15, 16};
Line(26) = {14, 13};
Line(27) = {13, 9};
Line(28) = {13, 16};
Line Loop(46) = {4, 1, 2, 3};
Plane Surface(46) = {46};
Line Loop(48) = {7, -2, 5, 6};
Plane Surface(48) = {48};
Line Loop(50) = {7, 3, -9, -8};
Plane Surface(50) = {50};
Line Loop(52) = {9, 4, -12, 11};
Plane Surface(52) = {52};
Line Loop(54) = {16, -6, 13, 15};
Plane Surface(54) = {54};
Line Loop(56) = {24, -15, 14, -25};
Plane Surface(56) = {56};
Line Loop(58) = {24, 17, 22, 23};
Plane Surface(58) = {58};
Line Loop(60) = {8, -18, -17, 16};
Plane Surface(60) = {60};
Line Loop(80) = {28, -14, -20, -27};
Plane Surface(80) = {80};
Line Loop(82) = {26, 27, -19, 22};
Plane Surface(82) = {82};
Line Loop(84) = {20, -13, 10, -21};
Plane Surface(84) = {84};
Line Loop(86) = {11, -18, 19, 21};
Plane Surface(86) = {86};
Line Loop(88) = {12, 1, 5, 10};
Plane Surface(88) = {88};
Line Loop(92) = {26, 28, -25, -23};
Plane Surface(92) = {92};
Line Loop(94) = {11, -8, -6, 10};
Plane Surface(94) = {94};
Line Loop(96) = {19, 20, 15, 17};
Plane Surface(96) = {96};
Surface Loop(98) = {46, 52, 50, 48, 88, 94};
Volume(98) = {98};
Surface Loop(100) = {84, 54, 60, 86, 94, 96};
Volume(100) = {100};
Surface Loop(102) = {80, 56, 58, 82, 92, 96};
Volume(102) = {102};
Physical Surface(107) = {54, 60, 84, 86};
Physical Surface(108) = {56, 58, 80, 82};
Physical Surface(112) = {48, 50, 52, 88};
Physical Surface(113) = {46};
Physical Surface(114) = {92};
Physical Volume(109) = {100};
Physical Volume(110) = {102};
Physical Volume(111) = {98};

//set the minimum mesh based on input geometry:
Mesh.CharacteristicLengthMin = 7.23;
Mesh.Algorithm = 8;//delquad
Mesh.Algorithm3D=6;//Frontal Hex
Mesh.CharacteristicLengthFactor = 10;//Factor applied to all mesh element sizes
Mesh.RecombineAll = 1;//Apply recombination algorithm to all surfaces, ignoring per-surface spec
Mesh.Recombine3DAll = 1;//Apply recombination3D algorithm to all volumes, ignoring per-volume spec
Mesh.SubdivisionAlgorithm = 2;//Mesh subdivision algorithm (0=none, 1=all quadrangles, 2=all hexahedra)
Mesh.Smoothing = 20;//Number of smoothing steps applied to the final mesh
Mesh.SaveAll = 0;//Ignore Physical definitions and save all elements
Mesh.CharacteristicLengthExtendFromBoundary = 0;
Mesh.ElementOrder = 1;//linear


On 27.03.2013, at 17:22, Denis Davydov <davydden at gmail.com> wrote:

> Dear all,
> 
> I just started trying to use Gmsh software.
> What I need is a coarsest (for current test almost no refinement) mesh
> based on few cuboids. In other words, i want nodes = points (roughly),
> since i plan to do refinement inside FE library. 
> The restriction is that i need ONLY hexahedra elements (or quads in 2d).
> So these are the options i try to use in the input script: 
> 
>   Mesh.Algorithm = 8;//delquad 
>   Mesh.Algorithm3D=6;//Frontal Hex
>   Mesh.CharacteristicLengthFactor = 999;//want the biggest size
> 
> initially i though if I set subdivision to "0" then the set of nodes will be equal to the set of points.
>    Mesh.SubdivisionAlgorithm = 2;//Mesh subdivision algorithm (0=none, 1=all quadrangles, 2=all hexahedra
> which turned out not to be true, so i use 2. 
> 
> With regards to the following 2 i'm not sure, but it seems that if RecombineAll = 0, 
> then i have some non-quad element from 2D mesh even when Mesh.Algorithm = 8 !
> 
>   Mesh.RecombineAll = 1;
>   Mesh.Recombine3DAll = 1;
> 
> 
> I was also looking for a way to define a number of devisions per line (in 1D) to set it to "1", 
> but could not find this. If there is a way to do it, that would probably solve the problem. 
> 
> 
> Thank you in advance,
> Regards,
> Denis.