<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Thanks! It works now.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I was only using</p>
<p style="margin-top:0;margin-bottom:0"><span>Mesh.CharacteristicLengthFromPoints = 0;</span><br>
</p>
<p style="margin-top:0;margin-bottom:0">but I was missing that other option.<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">In addition to that I had to delete the lines</p>
<p style="margin-top:0;margin-bottom:0"><span>Mesh.CharacteristicLengthExtendFromBoundary = 1;</span></p>
<p style="margin-top:0;margin-bottom:0"><span><span>Mesh.CharacteristicLengthFromPoints = 1;</span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0">from the .opt file because gmsh reads first the .geo and then the .opt<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
Sincerely,
<p><br>
</p>
<p>Héctor Espinoza</p>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De:</b> Christophe Geuzaine <cgeuzaine@uliege.be><br>
<b>Enviado:</b> viernes, 22 de junio de 2018 1:39:06<br>
<b>Para:</b> Hector Gabriel Espinoza Román<br>
<b>Cc:</b> gmsh@onelab.info<br>
<b>Asunto:</b> Re: [Gmsh] MathEval field in a circle with Open Cascade</font>
<div> </div>
</div>
<meta content="text/html; charset=utf-8">
<div class="" style="word-wrap:break-word; line-break:after-white-space"><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 22 Jun 2018, at 00:55, Hector Gabriel Espinoza Román <<a href="mailto:hespinoza@utb.edu.co" class="">hespinoza@utb.edu.co</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div id="x_divtagdefaultwrapper" dir="ltr" class="" style="font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-size:12pt; font-family:Calibri,Helvetica,sans-serif">
<div class="" style="margin-top:0px; margin-bottom:0px">Hello:</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">This simple script should draw a circle (2D surface) and when meshed it should be refined on the boundary, but I am not getting that. I have done the same without Open Cascade and it works.</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<p class="" style="margin-top:0px; margin-bottom:0px"></p>
<div class="">cx = 0.0 ;<br class="">
cy = 0.0 ;<br class="">
cz = 0.0 ;</div>
<span class="">D = 1.0 ;</span>
<p class="" style="margin-top:0px; margin-bottom:0px"></p>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class="">R = D/2;</span><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class=""><span class="">SetFactory("OpenCASCADE");</span><br class="">
</span></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class=""></span><span class="">Disk(1) = {cx,cy,cz,R} ; // creates a circle surface</span></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class="">Field[1] = MathEval ;</span></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class=""><span class="">//Field[1].F = "0.15 - 0.13*((x^2)/(0.5^2))" ; // works 2D, 617 elements: 0.02 to 0.15</span><br class="">
</span></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class="">Field[1].F = "0.15 - 0.13*(x^2 + y^2)/(0.5^2)" ; // doesnt work 2D</span><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class="">Background Field = 1 ;</span><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">What I am doing wrong?<br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Add</div>
<div><br class="">
</div>
<div>Mesh.CharacteristicLengthExtendFromBoundary = 0;</div>
<div>
<div class=""><br class="">
</div>
<div class="">Christophe</div>
<div class=""><br class="">
</div>
</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div id="x_divtagdefaultwrapper" dir="ltr" class="" style="font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-size:12pt; font-family:Calibri,Helvetica,sans-serif">
<div id="x_Signature" class="">
<div id="x_divtagdefaultwrapper" dir="ltr" class="" style="font-size:12pt; font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
Sincerely,<br class="">
<br class="">
Héctor<br class="">
</div>
</div>
</div>
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">gmsh
 mailing list</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="mailto:gmsh@onelab.info" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">gmsh@onelab.info</a><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="http://onelab.info/mailman/listinfo/gmsh" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">http://onelab.info/mailman/listinfo/gmsh</a></div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" class="" style="word-wrap:break-word; line-break:after-white-space">
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
— </div>
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
Prof. Christophe Geuzaine<br class="">
University of Liege, Electrical Engineering and Computer Science <br class="">
<a href="http://www.montefiore.ulg.ac.be/~geuzaine" class="">http://www.montefiore.ulg.ac.be/~geuzaine</a><br class="">
<br class="">
Free software: http://gmsh.info | http://getdp.info | http://onelab.info</div>
</div>
</div>
<br class="">
</div>
</body>
</html>