Hello Francisco,<br><br>It was not checked. Now it runs perfectly.<br>Thank you very much,<br><br>JORDI<br><br><div class="gmail_quote">On Wed, Oct 13, 2010 at 12:55 PM, Francisco Gilabert Villegas <span dir="ltr"><<a href="mailto:francisco.gilabert@itc.uji.es">francisco.gilabert@itc.uji.es</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="blue" lang="ES-TRAD">

<div>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Hi Jordi,</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">In Options -> Geometry
-> General, please see if </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">“Remove duplicate
entities in GEO models” </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">is checked. If not, check
it.</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">It should work</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Regards</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Francisco</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<div>

<div class="MsoNormal" style="text-align: center;" align="center"><font size="3" face="Times New Roman"><span style="font-size: 12pt;" lang="ES">

<hr size="2" width="100%" align="center">

</span></font></div>

<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;" lang="ES">De:</span></font></b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma;" lang="ES"> jordi
poblet [mailto:<a href="mailto:jordi.poblet@gmail.com" target="_blank">jordi.poblet@gmail.com</a>] <br>
<b><span style="font-weight: bold;">Enviado el:</span></b> miércoles, 13 de
octubre de 2010 10:31<br>
<b><span style="font-weight: bold;">Para:</span></b> Francisco Gilabert Villegas<div><div></div><div class="h5"><br>
<b><span style="font-weight: bold;">CC:</span></b> <a href="mailto:gmsh@geuz.org" target="_blank">gmsh@geuz.org</a><br>
<b><span style="font-weight: bold;">Asunto:</span></b> Re: [Gmsh] pointsources
and Nodes and Elements lists</div></div></span></font><span lang="ES"></span></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"> </span></font></p>

<p class="MsoNormal" style="margin-bottom: 12pt;"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Hello Francisco,<br>
<br>
Thanks for the proposal! This definitively seems a better option.<br>
However, I have problems when running the example: " Error: something
wrong in edge loop  (gmsh version 2.4.2)". Is it correct?<br>
<br>
Best regards,<br>
<br>
JORDI</span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">On Wed, Oct 13, 2010 at 9:28 AM, Francisco Gilabert Villegas <<a href="mailto:francisco.gilabert@itc.uji.es" target="_blank">francisco.gilabert@itc.uji.es</a>>
wrote:</span></font></p>

<div>

<div>

<div link="blue" vlink="blue">

<div>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";">Hello,
</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">You can insert points or lines in any surface. Please see the
example below.</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">I hope this help you.</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">Regards,</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">Francisco</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">//****************************************************************</span></font></p>


<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";">len=0.1;</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";">Point(1)
= {0, 0, 0, len};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";">ext1[]=Extrude
{1, 0, 0} {</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";"> 
Point{1};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";">};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">ext2[]=Extrude {0, 1, 0} {</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">  Line{ext1[1]};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">my_point = newp;</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">Point(my_point) = {0.34, 0.45, 0, len};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">// Inserting a point in a surface:</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">Point{my_point} In Surface{ext2[1]};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">my_p1=newp; Point(my_p1) = {0.2, 0.78, 0, len};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">my_p2=newp; Point(my_p2) = {0.6, 0.67, 0, len};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">my_line=newl;</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">Line(my_line)={my_p1,my_p2};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">// Inserting a line in surface</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">Line{my_line} In Surface{ext2[1]};</span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: "Courier New";" lang="EN-GB">//****************************************************************</span></font></p>


<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>

<div>

<div class="MsoNormal" style="text-align: center;" align="center"><font size="3" face="Times New Roman"><span style="font-size: 12pt;" lang="ES">

<hr size="2" width="100%" align="center">

</span></font></div>

<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;" lang="ES">De:</span></font></b><font size="2" face="Tahoma"><span style="font-size: 10pt; font-family: Tahoma;" lang="ES"> <a href="mailto:gmsh-bounces@ace20.montefiore.ulg.ac.be" target="_blank">gmsh-bounces@ace20.montefiore.ulg.ac.be</a>
[mailto:<a href="mailto:gmsh-bounces@ace20.montefiore.ulg.ac.be" target="_blank">gmsh-bounces@ace20.montefiore.ulg.ac.be</a>]
<b><span style="font-weight: bold;">En nombre de </span></b>jordi poblet<br>
<b><span style="font-weight: bold;">Enviado el:</span></b> lunes, 11 de octubre
de 2010 14:10<br>
<b><span style="font-weight: bold;">Para:</span></b> Bart Vandewoestyne<br>
<b><span style="font-weight: bold;">CC:</span></b> <a href="mailto:gmsh@geuz.org" target="_blank">gmsh@geuz.org</a><br>
<b><span style="font-weight: bold;">Asunto:</span></b> Re: [Gmsh] pointsources
and Nodes and Elements lists</span></font></p>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"> </span></font></p>

<p class="MsoNormal" style="margin-bottom: 12pt;"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Hello Bart,<br>
<br>
I also need so often points in an specific position of the mesh. What I so is
to construct the mesh by parts in order to be sure that there will be a node in
the desired position (I copy an example for a single rectangle with a node in
X=0.49; Y = 0.48).<br>
I suppose that this is not the answer that you were expecting... sometimes it
is hard to build the meshes. In any case, I would also be interested in a
better procedure to specify a priori the positions of some nodes of the mesh.
But I guess that this is not natural for most of the meshing algorithms.<br>
<br>
Best regards,<br>
<br>
JORDI<br>
<br>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
<br>
<br>
lc = 0.13 ; <br>
 <br>
//Coords <br>
x0 = 0.0 ; <br>
y0 = 0.0 ; <br>
xs = 0.49 ; //X Point source <br>
ys = 0.48 ;  //Y Point source <br>
x1 = 2.0 ; <br>
y1 = 3.0 ; <br>
 <br>
//Points: <br>
Point(1) = {x0, y0, 0, lc}; <br>
Point(2) = {xs, y0, 0, lc} ; <br>
Point(3) = {x1, y0, 0, lc} ; <br>
Point(4) = {x0, ys, 0, lc} ; <br>
Point(5) = {xs, ys, 0, lc}; <br>
Point(6) = {x1, ys, 0, lc} ; <br>
Point(7) = {x0, y1, 0, lc} ; <br>
Point(8) = {xs, y1, 0, lc} ; <br>
Point(9) = {x1, y1, 0, lc}; <br>
 <br>
//Lines: <br>
Line(1) = {1,2} ; <br>
Line(2) = {2,3} ; <br>
 <br>
Line(3) = {4,5} ; <br>
Line(4) = {5,6} ; <br>
 <br>
Line(5) = {7,8} ; <br>
Line(6) = {8,9} ; <br>
 <br>
Line(7) = {1,4} ; <br>
Line(8) = {4,7} ; <br>
 <br>
Line(9) = {2,5} ; <br>
Line(10) = {5,8} ; <br>
 <br>
Line(11) = {3,6} ; <br>
Line(12) = {6,9} ; <br>
 <br>
//Loops: <br>
Line Loop(10) = {1,9,-3,-7} ; <br>
Line Loop(11) = {2,11,-4,-9} ; <br>
Line Loop(12) = {3,10,-5,-8} ; <br>
Line Loop(13) = {4,12,-6,-10} ; <br>
 <br>
// Surfaces  <br>
Plane Surface(10) = {10} ; <br>
Plane Surface(11) = {11} ; <br>
Plane Surface(12) = {12} ; <br>
Plane Surface(13) = {13} ; <br>
 <br>
//Physical properties (final physical surface): <br>
    Physical Surface(100) = {10,11,12,13} ; <br>
<br>
<br>
//-------------------------------------------------------------------------------------------------------------------------------------
</span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">On Mon, Oct 11,
2010 at 10:40 AM, Bart Vandewoestyne <<a href="mailto:Bart.Vandewoestyne@telenet.be" target="_blank">Bart.Vandewoestyne@telenet.be</a>>
wrote:</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;">Hello list,<br>
<br>
For an application I'm working on, we use gmsh as our mesher, we parse the .msh<br>
file and then run our solver in Matlab.  From the .msh file, we extract
the X<br>
and Y coordinates of the nodes (from $Nodes) in the mesh.  We also have a<br>
matrix representing the triangular elements in the mesh (extracted from<br>
$Elements).<br>
<br>
We would like our users to be able to specify pointsources in our computational<br>
domain.  The location of the pointsource is an arbitrary point that a user<br>
specifies and has nothing to do with the mesh.  In gmsh, we currently
specify<br>
it as follows:<br>
<br>
<br>
----------------------- small example ------------------<br>
lc = 0.6;<br>
<br>
// Corner points.<br>
Point(1) = {0, 0, 0, lc};<br>
Point(2) = {0, 1, 0, lc};<br>
Point(3) = {1, 1, 0, lc};<br>
Point(4) = {1, 0, 0, lc};<br>
<br>
// Point sources.<br>
Point(5) = {0.6, 0.6, 0, lc};<br>
Point(6) = {0.7, 0.7, 0, lc};<br>
<br>
Line(1) = {1, 2};<br>
Line(2) = {2, 3};<br>
Line(3) = {3, 4};<br>
Line(4) = {4, 1};<br>
<br>
Line Loop(5) = {1, 2, 3, 4};<br>
Plane Surface(6) = {5};<br>
<br>
Physical Point("Pointsource") = {5, 6};<br>
Physical Surface("My Surface") = {6};<br>
----------------------- end small example ------------------<br>
<br>
<br>
And now here is the problem: if I mesh this .geo file with<br>
<br>
 gmsh -2 pointsource_test.geo<br>
<br>
then this is the result:<br>
<br>
<br>
------------------ small example mesh ---------------------<br>
<br>
$MeshFormat<br>
2.1 0 8<br>
$EndMeshFormat<br>
$PhysicalNames<br>
2<br>
0 1 "Pointsource"<br>
2 2 "My Surface"<br>
$EndPhysicalNames<br>
$Nodes<br>
7<br>
1 0 0 0<br>
2 0 1 0<br>
3 1 1 0<br>
4 1 0 0<br>
5 0.6 0.6 0<br>
6 0.7 0.7 0<br>
7 0.5 0.5 0<br>
$EndNodes<br>
$Elements<br>
6<br>
1 15 3 1 5 0 5<br>
2 15 3 1 6 0 6<br>
3 2 3 2 6 0 1 7 4<br>
4 2 3 2 6 0 3 7 2<br>
5 2 3 2 6 0 7 3 4<br>
6 2 3 2 6 0 7 1 2<br>
$EndElements<br>
<br>
----------------------- end small example mesh ---------<br>
<br>
<br>
The 'problem' is that the coordinates of the pointsource appear in the list<br>
of nodal coordinates.  This has two consequences:<br>
<br>
1) Our solver cannot have the pointsource coordinates in its list of x and y<br>
  coordinates.  It should only have the x and y coordinates of the
*real*<br>
  nodes in our mesh.<br>
<br>
2) Using the tags in the $Elements section, i can of course detect which<br>
  nodes are pointsources, and remove them from the $Nodes section in my<br>
  Matlab parser, but removing nodes from the $Nodes section also means
that<br>
  a lot of indices in the $Elements section need to change!  For
example,<br>
  if I remove nodes 5 and 6, then every 7 in the $Elements section has to
be<br>
  replaced by a 5 (because node 5 and 6 were removed, and node 7 has
become<br>
  node 5).<br>
<br>
<br>
Is there a way to circumvent this troublesome bookkeeping?  Maybe somehow<br>
prevent gmsh from putting our pointsources in the list of nodes, and returning<br>
the coordinates of our pointsources in another section somehow? (I'm just<br>
guessing here...)<br>
<br>
Kind regards,<br>
Bart<br>
<font color="#888888"><span style="color: rgb(136, 136, 136);"><br>
--<br>
       "Share what you know.  Learn what you
don't."<br>
<br>
_______________________________________________<br>
gmsh mailing list<br>
<a href="mailto:gmsh@geuz.org" target="_blank">gmsh@geuz.org</a><br>
<a href="http://www.geuz.org/mailman/listinfo/gmsh" target="_blank">http://www.geuz.org/mailman/listinfo/gmsh</a></span></font></span></font></p>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"> </span></font></p>

</div>

</div>

</div>

</div>

<p class="MsoNormal" style="margin-bottom: 12pt;"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"><br>
_______________________________________________<br>
gmsh mailing list<br>
<a href="mailto:gmsh@geuz.org" target="_blank">gmsh@geuz.org</a><br>
<a href="http://www.geuz.org/mailman/listinfo/gmsh" target="_blank">http://www.geuz.org/mailman/listinfo/gmsh</a></span></font></p>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12pt;"> </span></font></p>

</div></div></div>

</div>


</blockquote></div><br>