<div dir="ltr"><div class="gmail_default" style="font-family:"times new roman",serif">Hello Guillaume,</div><div class="gmail_default" style="font-family:"times new roman",serif"><br></div><div class="gmail_default" style="font-family:"times new roman",serif">Thank you for your answer.</div><div class="gmail_default" style="font-family:"times new roman",serif">I'm a bit confused : I do not find this option in the doc</div><div class="gmail_default"><font face="times new roman, serif"><a href="http://gmsh.info/doc/texinfo/gmsh.html">http://gmsh.info/doc/texinfo/gmsh.html</a></font><br></div><div class="gmail_default"><font face="times new roman, serif">Moreover, Gmsh complains when loading the geo file.</font></div><div class="gmail_default"><font face="times new roman, serif"><br></font></div><div class="gmail_default"><font face="times new roman, serif">Where have you seen this option ?</font></div><div class="gmail_default"><font face="times new roman, serif"><br></font></div><div class="gmail_default"><font face="times new roman, serif">All the best,</font></div><div class="gmail_default"><font face="times new roman, serif"><br></font></div><div class="gmail_default"><font face="times new roman, serif">VH.</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-15 15:34 GMT+02:00 DILASSER Guillaume <span dir="ltr"><<a href="mailto:Guillaume.DILASSER@cea.fr" target="_blank">Guillaume.DILASSER@cea.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="FR" link="#0563C1" vlink="#954F72">
<div class="m_1328499757424794668WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi Vincent,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I think you can simply add the statement
<i>“Mesh.<wbr>CharacteristicLengthFromBounda<wbr>ry = 0 ;”</i> somewhere in the script of your first model to solve the issue. This will force Gmsh not to use the characteristic length of the surface mesh when computing the volume mesh, but instead only rely on the fields
 you provide. Let me know if it worked,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Sincerely Yours,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Tahoma",sans-serif;color:#000099">Guillaume DILASSER</span><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif;color:#000099"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#000099">Doctorant SACM / LEAS<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#000099">CEA - Centre de Saclay - Bât.123 - PC 319c</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#000099"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#000099">91191 Gif sur Yvette Cedex - France -</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#000099"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#000099"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#000099"><a href="mailto:guillaume.dilasser@cea.fr" target="_blank"><span style="color:blue">guillaume.dilasser@cea.fr</span></a><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">De :</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> gmsh [mailto:<a href="mailto:gmsh-bounces@ace20.montefiore.ulg.ac.be" target="_blank">gmsh-bounces@ace20.<wbr>montefiore.ulg.ac.be</a>]
<b>De la part de</b> Vincent HUBER<br>
<b>Envoyé :</b> mercredi 14 juin 2017 15:26<br>
<b>À :</b> <a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
<b>Objet :</b> [Gmsh] Fields and Volume<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p><span style="font-family:"Courier New"">Hello everyone,<u></u><u></u></span></p>
<p style="margin:0px!important"><span style="font-family:"Courier New"">I work with Gmsh 3.0.2<u></u><u></u></span></p>
<p style="margin:0px!important"><span style="font-family:"Courier New"">I have a cylinder inside a cube.<br>
I want to refine the boundary of the cylinder.<u></u><u></u></span></p>
<p style="margin:0px!important"><span style="font-family:"Courier New"">To do so, I use a combination of MathEval fields.<br>
If I declare the cylinder as a volume, it is meshed with very small elements.<br>
If I do not declare the cylinder as a volume, only the region near the interface is correctly meshed.<u></u><u></u></span></p>
<p style="margin:0px!important"><span style="font-family:"Courier New"">How can I have both :<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:2.4pt;margin-left:0cm">
<u></u><span style="font-size:10.0pt;font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><u></u><span style="font-family:"Courier New"">the cylinder as a volume<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:2.4pt;margin-left:0cm">
<u></u><span style="font-size:10.0pt;font-family:Symbol"><span>·<span style="font:7.0pt "Times New Roman"">        
</span></span></span><u></u><span style="font-family:"Courier New"">the reffinement near the interface ?<u></u><u></u></span></p>
<p style="margin:0px!important"><span style="font-family:"Courier New"">With the cylinder as a volume<u></u><u></u></span></p>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">h=0.1;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">x=1;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">y=1;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">z=1;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">ratio = 3.;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">radius=Sqrt(2.*(x/ratio)^2);<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">distance=h;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">p0 = newp; Point(p0) = {0,0,0,50*h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">pc = newp; Point(pc) = {0,0,-z,h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">p1 = newp; Point(p1) = {-x,-y,-z,h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">p2 = newp; Point(p2) = {-x, y,-z,h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">p3 = newp; Point(p3) = { x, y,-z,h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">p4 = newp; Point(p4) = { x,-y,-z,h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">r1 = newp; Point(r1) = {      0,  radius, -z, h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">r2 = newp; Point(r2) = { radius,       0, -z, h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">r3 = newp; Point(r3) = {      0, -radius, -z, h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">r4 = newp; Point(r4) = {-radius,       0, -z, h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">l1 = newl; Line(l1) = {p1,p2};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">l2 = newl; Line(l2) = {p2,p3};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">l3 = newl; Line(l3) = {p3,p4};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">l4 = newl; Line(l4) = {p4,p1};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">c1 = newl; Circle(c1) = {r1,pc,r2};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">c2 = newl; Circle(c2) = {r2,pc,r3};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">c3 = newl; Circle(c3) = {r3,pc,r4};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">c4 = newl; Circle(c4) = {r4,pc,r1};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">outer = newll; Line Loop(outer) = {l1,l2,l3,l4};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">inner = newll; Line Loop(inner) = {c1,c2,c3,c4};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">s1 = news; Plane Surface(s1) = {outer,-inner};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">s2 = news; Plane Surface(s2) = {inner};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">extruded[] = Extrude{0,0,2.*z} { <u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Surface{s1,s2};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Physical Point("center") = {p0};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Physical Volume("Omega1") = {extruded[1]};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Physical Volume("Omega2") = {extruded[11]};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[1] = MathEval;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[1].F = Sprintf("(Fabs(%g-Sqrt(x*x+y*<wbr>y)))+%g/5",radius,h);<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[2] = MathEval;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[2].F = "0.1";<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[3] = Min;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[3].FieldsList = {1,2};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Background Field = 3;<u></u><u></u></span></code></pre>
<p style="margin:0px!important"><span style="font-family:"Courier New"">With the reffinement I target<u></u><u></u></span></p>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">h=0.1;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">x=1;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">y=1;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">z=1;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">ratio = 3.;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">radius=Sqrt(2.*(x/ratio)^2);<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">distance=h;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">p0 = newp; Point(p0) = {0,0,0,50*h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">pc = newp; Point(pc) = {0,0,-z,h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">p1 = newp; Point(p1) = {-x,-y,-z,h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">p2 = newp; Point(p2) = {-x, y,-z,h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">p3 = newp; Point(p3) = { x, y,-z,h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">p4 = newp; Point(p4) = { x,-y,-z,h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">r1 = newp; Point(r1) = {      0,  radius, -z, h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">r2 = newp; Point(r2) = { radius,       0, -z, h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">r3 = newp; Point(r3) = {      0, -radius, -z, h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">r4 = newp; Point(r4) = {-radius,       0, -z, h};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">l1 = newl; Line(l1) = {p1,p2};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">l2 = newl; Line(l2) = {p2,p3};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">l3 = newl; Line(l3) = {p3,p4};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">l4 = newl; Line(l4) = {p4,p1};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">c1 = newl; Circle(c1) = {r1,pc,r2};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">c2 = newl; Circle(c2) = {r2,pc,r3};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">c3 = newl; Circle(c3) = {r3,pc,r4};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">c4 = newl; Circle(c4) = {r4,pc,r1};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">outer = newll; Line Loop(outer) = {l1,l2,l3,l4};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">inner = newll; Line Loop(inner) = {c1,c2,c3,c4};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">s1 = news; Plane Surface(s1) = {outer};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">//s2 = news; Plane Surface(s2) = {inner};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">extruded[] = Extrude{0,0,2.*z} { <u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Surface{s1};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Physical Point("center") = {p0};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Physical Volume("Omega1") = {extruded[1]};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">//Physical Volume("Omega2") = {extruded[11]};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8"><u></u> <u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[1] = MathEval;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[1].F = Sprintf("(Fabs(%g-Sqrt(x*x+y*<wbr>y)))+%g/5",radius,h);<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[2] = MathEval;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[2].F = "0.1";<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[3] = Min;<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Field[3].FieldsList = {1,2};<u></u><u></u></span></code></pre>
<pre style="margin-right:1.8pt;margin-bottom:0cm;margin-left:1.8pt;margin-bottom:.0001pt;line-height:14.4pt"><code><span style="font-family:"inherit",serif;border:solid #cccccc 1.0pt;padding:6.0pt;background:#f8f8f8">Background Field = 3;<u></u><u></u></span></code></pre>
<p style="margin:0px!important"><span style="font-family:"Courier New"">All the best,<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:1.0pt;font-family:"Cambria Math",serif">​</span><span style="font-size:1.0pt;font-family:"Courier New""><u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black">Vincent HUBER</span><u></u><u></u></p>
</div>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font face="courier new, monospace" color="#000000" size="2">Vincent HUBER</font></div></div>
</div>