Dear Gmsher's,
 
I rencently switched from netgen to gmsh, when constructive solid geometry was now introduced. When I found size fields to locally refine different domains I encounterd the following problem, for which I made a small example file (also attached to this mail):
 
//+
SetFactory("OpenCASCADE");
Mesh.CharacteristicLengthMin = 0.001;
Mesh.CharacteristicLengthMax = 2.0;
Mesh.CharacteristicLengthExtendFromBoundary = 0;
Mesh.Algorithm = 6;
Mesh.Smoothing = 3;
Mesh.Algorithm3D = 1;
Box(1) = {0, -0.5, -0.5, 1, 1, 1};
Box(2) = {-1, -0.5, -0.5, 1, 1, 1};
Coherence;
surfs_box1() = Unique(Abs(Boundary{ Volume{1}; } ));
lines_box1() = Unique(Abs(Boundary{ Surface{surfs_box1()}; } ));
pts_box1() = Unique(Abs(Boundary{ Line{lines_box1()}; } ));
surfs_box2() = Unique(Abs(Boundary{ Volume{2}; } ));
lines_box2() = Unique(Abs(Boundary{ Surface{surfs_box2()}; } ));
pts_box2() = Unique(Abs(Boundary{ Line{lines_box2()}; } ));
Field[1] = MathEval;
Field[1].F = "0.1";
Field[2] = Restrict;
Field[2].EdgesList = {lines_box1()};
Field[2].FacesList = {surfs_box1()};
Field[2].VerticesList = {pts_box1()};
Field[2].RegionsList = {1};
Field[3] = MathEval;
Field[3].F = "0.5";
Field[4] = Restrict;
Field[4].IField = 3;
Field[4].RegionsList = {2};
Field[4].EdgesList = {lines_box2()};
Field[4].FacesList = {surfs_box2()};
Field[4].VerticesList = {pts_box2()};
Field[5] = Min;
Field[5].FieldsList = {2, 4};
Background Field = 5;
 
 
While  both the 1D and 2D mesh parts, i.e. lines and surfaces follow the restrict fields for both volumes 1 and 2, the 3D mesh, i.e. volumes only take one restrict field into account for meshing. Please clip the 3D mesh in volume 2, to observed much to small elements. If I use the view for field 5, i.e. the minimum field, the field values are correctly assigned both in volume 1 and 2. Can you please tell me whether I made a mistake in the configuration that for the 3D meshing gmsh only takes into account the first size field?
 
Best regards,
 
Thomas Kiel
 
P.S.:
I'm useing precompiled gmsh version 3.0.6 (November 5 2017) from the website running on Linux version 4.8.0-0.bpo.2-amd64 ([email protected]) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 SMP Debian 4.8.11-1~bpo8+1 (2016-12-14). To avoid spam this email is send from a private email address.
 
--
Thomas Kiel
Theoretische Optik und Photonik
 
Humboldt-Universität zu Berlin, Institut für Physik
Newtonstraße 15, 12489 Berlin
 
Web:    https://top.physik.hu-berlin.de/people/thomas-kiel
 
 
 

Attachment: gmsh_test1.geo
Description: Binary data

_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh

Reply via email to