<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 16 Jul 2012, at 17:12, Giorgos Kourakos wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi I'm trying to mesh a simple geometry with lines and points.<br>I want the mesh to be refined around the points and the lines up to a specified distance <br><br>To do so, I define an Attractor field and a MathEval field with the following relation "20*exp(-(F1/400)^2)" (radial basis function), where 20 is the minimum desired length near the attractor and 400 is the distance from the attractor  that the relation vanishes to zero. <br>
<br>I'm attaching also the *.geo file<br>The zoom_out.png  image shows that the distribution is somewhat as expected, however when I zoom (zoom_in.png) I see that just around the point attractors the elements have larger size compared to the desired lengths.<br>
<br>I have tried to change the points desired length, which partly solves my problem (see zoom_in_1.png) but this refines unnecessarily the mesh in the area between the points and line (see zoom_out_1.png plot)<br><br></blockquote><div><br></div><div>Hi Giorgos,</div><div><br></div><div>As defined, the function "20*Fabs(Exp(-(F1/400)^2))" takes the distance to the attractors as argument (which is approx. in [0,10000]): this gives </div><img id="ca47b8f9-885d-4b8a-8b72-36fdca152012" height="751" width="984" apple-width="yes" apple-height="yes" src="cid:48497818-5088-4BC7-9C89-463DC19889E1"><br><br></div><div>which is coherent with the mesh you get (since by default Gmsh takes the minimum of the field and the mesh sizes defined at the CAD points).</div><div><br></div><div>For further testing you can plot your fields using Mesh->Define->Fields in the GUI.</div><div><br></div><div>Christophe</div><div><br></div><div><br><blockquote type="cite">I would appreciate any thoughts and suggestion<br>
<br clear="all">
Kind regards <br><br>Giorgos<br><br>-- <br>Giorgos Kourakos, Phd<br>Land Air and Water Resources<br>229 Veihmayer Hall<br>University of California Davis<br><br>Γιώργος Κουράκος<br>
<span><large_examp.geo></span><span><zoom_out.png></span><span><zoom_in.png></span><span><zoom_in_1.png></span><span><zoom_out_1.png></span>_______________________________________________<br>gmsh mailing list<br><a href="mailto:gmsh@geuz.org">gmsh@geuz.org</a><br>http://www.geuz.org/mailman/listinfo/gmsh<br></blockquote></div><br><div>-- <br>Prof. Christophe Geuzaine<br>University of Liege, Electrical Engineering and Computer Science <br><a href="http://www.montefiore.ulg.ac.be/~geuzaine">http://www.montefiore.ulg.ac.be/~geuzaine</a><br><br><br></div><br></body></html>