Skip to content
Snippets Groups Projects

Restore windows and old-gmm compatibility

Merged Boman Romain requested to merge fix_gmm into master
4 files
+ 239
0
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 50
0
// a cube meshed with hex
DefineConstant[ Lx = { 1, Min 5, Max 20, Step 1, Name "Lengths/Lx" } ];
DefineConstant[ Ly = { 1, Min 5, Max 20, Step 1, Name "Lengths/Ly" } ];
DefineConstant[ Lz = { 1, Min 1, Max 2, Step 1, Name "Lengths/Lz" } ];
DefineConstant[ Nx = { 1, Min 1, Max 200, Step 10, Name "Mesh/Nx" } ];
DefineConstant[ Ny = { 1, Min 1, Max 200, Step 10, Name "Mesh/Ny" } ];
DefineConstant[ Nz = { 1, Min 1, Max 200, Step 10, Name "Mesh/Nz" } ];
lc = 1; // useless
Point(1) = { 0, 0, 0, lc};
Point(2) = { Lx, 0, 0, lc};
Point(3) = { Lx, Ly, 0, lc};
Point(4) = { 0, Ly, 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};
Transfinite Line {1, 3} = Nx+1 Using Progression 1;
Transfinite Line {4, 2} = Ny+1 Using Progression 1;
Transfinite Surface {6};
Recombine Surface {6};
Extrude {0, 0, Lz} {
Surface{6}; Layers{Nz}; Recombine;
}
Physical Volume("Volume") = {1};
Physical Surface("FaceZ0") = {6};
Physical Surface("FaceZ1") = {28};
Physical Surface("FaceY0") = {15};
Physical Surface("FaceX1") = {19};
Physical Surface("FaceY1") = {23};
Physical Surface("FaceX0") = {27};
Physical Line("Line1") = {13};
Physical Line("Line2") = {14};
Physical Line("Line3") = {18};
Physical Line("Line4") = {22};
Loading