<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 10 Feb 2018, at 22:06, Juan E. Sanchez <<a href="mailto:juan.e.sanchez@gmail.com" class="">juan.e.sanchez@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello,<br class=""><br class="">I have an existing msh file, and a pos file containing a background mesh.  Is there a script example showing how to use these files to create a refined mesh using the background field?<br class=""><br class=""></div></div></blockquote><div><br class=""></div><div>Start from the geometrical description (not the mesh): this way Gmsh will be able to place the new vertices correctly, i.e. on the CAD</div><div><br class=""></div><div>gmsh -3 test.geo -bgm test.pos</div><div><br class=""></div><div>CG</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">Using<br class=""><br class="">gmsh -3 test.msh -bgm test.pos<br class=""><br class="">results in a mesh where there is the same number of nodes and elements, but it appears that the physical entity number is lost:<br class=""><br class="">last element in original file:<br class=""><br class="">36210 4 3 15 15 0 5786 5791 5792 5800<br class=""><br class="">last element in new file:<br class=""><br class="">36210 4 2 0 15 2603 5822 2604 2605<br class=""><br class="">Now all of the mesh elements belong to the same physical entity, 0.<br class=""><br class="">If I perform a "refine by splitting" in the gui, the physical entity information is maintained:<br class=""><br class="">266256 4 2 15 15 42825 10009 41452 9710<br class=""><br class="">The file is a 3d tetrahedral mesh, and it also contains triangular surfaces to impose boundary conditions.<br class=""><br class="">Regards,<br class=""><br class="">Juan<br class=""><br class=""><br class="">_______________________________________________<br class="">gmsh mailing list<br class=""><a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a><br class="">http://onelab.info/mailman/listinfo/gmsh<br class=""></div></div></blockquote></div><br class=""><div class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">— </div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 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=""></body></html>