<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Dear Gmsher's,</div>

<div> </div>

<div>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):</div>

<div> </div>

<div>
<div>//+<br/>
SetFactory("OpenCASCADE");</div>

<div>Mesh.CharacteristicLengthMin = 0.001;<br/>
Mesh.CharacteristicLengthMax = 2.0;</div>

<div>Mesh.CharacteristicLengthExtendFromBoundary = 0;</div>

<div>Mesh.Algorithm = 6;<br/>
Mesh.Smoothing = 3;<br/>
Mesh.Algorithm3D = 1;</div>

<div>Box(1) = {0, -0.5, -0.5, 1, 1, 1};<br/>
Box(2) = {-1, -0.5, -0.5, 1, 1, 1};</div>

<div>Coherence;</div>

<div>surfs_box1() = Unique(Abs(Boundary{ Volume{1}; } ));<br/>
lines_box1() = Unique(Abs(Boundary{ Surface{surfs_box1()}; } ));<br/>
pts_box1() = Unique(Abs(Boundary{ Line{lines_box1()}; } ));</div>

<div>surfs_box2() = Unique(Abs(Boundary{ Volume{2}; } ));<br/>
lines_box2() = Unique(Abs(Boundary{ Surface{surfs_box2()}; } ));<br/>
pts_box2() = Unique(Abs(Boundary{ Line{lines_box2()}; } ));</div>

<div>Field[1] = MathEval;<br/>
Field[1].F = "0.1";<br/>
Field[2] = Restrict;<br/>
Field[2].EdgesList = {lines_box1()};<br/>
Field[2].FacesList = {surfs_box1()};<br/>
Field[2].VerticesList = {pts_box1()};<br/>
Field[2].RegionsList = {1};<br/>
Field[3] = MathEval;<br/>
Field[3].F = "0.5";<br/>
Field[4] = Restrict;<br/>
Field[4].IField = 3;<br/>
Field[4].RegionsList = {2};<br/>
Field[4].EdgesList = {lines_box2()};<br/>
Field[4].FacesList = {surfs_box2()};<br/>
Field[4].VerticesList = {pts_box2()};<br/>
Field[5] = Min;<br/>
Field[5].FieldsList = {2, 4};</div>

<div>Background Field = 5;</div>

<div> </div>

<div> </div>

<div>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?</div>

<div> </div>

<div>Best regards,</div>

<div> </div>

<div>Thomas Kiel</div>

<div> </div>

<div>P.S.:</div>

<div>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 (debian-kernel@lists.debian.org) (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.</div>

<div> </div>

<div>
<div>--<br/>
Thomas Kiel<br/>
Theoretische Optik und Photonik</div>

<div> </div>

<div>Humboldt-Universität zu Berlin, Institut für Physik<br/>
Newtonstraße 15, 12489 Berlin</div>

<div> </div>

<div>Web:    https://top.physik.hu-berlin.de/people/thomas-kiel</div>
</div>

<div> </div>

<div> </div>

<div> </div>
</div></div></body></html>