<div dir="ltr"><div><div><div>Dear all,<br><br></div>Thank you so much. Indeed it seems that volume embedded points would have been ideal, but Ruth's solution with surfaces works just fine! Ruth: thank you very, very much for taking the time to edit my code. I really appreciate it.<br><br></div><div>And thank you for this great software!<br></div><div><br></div>Best wishes,<br></div>Julius<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 1 April 2016 at 09:59, Ruth Vazquez Sabariego <span dir="ltr"><<a href="mailto:ruth.sabariego@esat.kuleuven.be" target="_blank">ruth.sabariego@esat.kuleuven.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div>Dear Julius, </div>
<div>What you would need is to embed the points in the volume. Unfortunately, that is not yet implemented.</div>
<div><br>
</div>
<div>From the manual:</div>
<div><dt style="line-height:1.35;font-family:helvetica,sans-serif;font-size:15px">
<code style="line-height:1.35;font-size:12px">Point | Line { <var style="line-height:1.35">expression-list</var> } In Surface { <var style="line-height:1.35">expression</var> };</code><a name="m_1068139117363302073_index-Point-_007c-Line-_007b-expression_002dlist-_007d-In-Surface-_007b-expression-_007d_003b" style="line-height:1.35;color:rgb(26,13,171);background-image:none"></a></dt><dd style="line-height:1.35;font-family:helvetica,sans-serif;font-size:15px">
<div style="line-height:1.35;margin:0.8em 0px">Embed the point(s) or line(s) in the given surface. The surface mesh will conform to the mesh of the point(s) or lines(s). </div>
</dd><dt style="line-height:1.35;font-family:helvetica,sans-serif;font-size:15px">
<code style="line-height:1.35;font-size:12px">Surface { <var style="line-height:1.35">expression-list</var> } In Volume { <var style="line-height:1.35">expression</var> };</code><a name="m_1068139117363302073_index-Surface-_007b-expression_002dlist-_007d-In-Volume-_007b-expression-_007d_003b" style="line-height:1.35;color:rgb(26,13,171);background-image:none"></a></dt><dd style="line-height:1.35;font-family:helvetica,sans-serif;font-size:15px">
<div style="line-height:1.35;margin:0.8em 0px">Embed the surface in the given volume. The volume mesh will conform to the mesh of the surface.</div>
<div><br>
</div>
</dd></div>
<div><br>
</div>
<div>I’ve modified your code creating two surfaces for the points that where on the same plane. One point is still not embedded, thus. </div>
<div>See hereafter. </div>
<div><br>
</div>
<div>Note that newp, newl, newll, news give you automatically the new number available, that avoids taking point values generated by the Extrude command. Also aux[] is a list containing the generated surfaces and volume. aux[0] is the surface opposite
to Surface{6}, aux[1] is the volume, the rest of aux[] contains the surrounding surfaces.</div>
<div>
<div><br>
</div>
<div>Plane Surface(6) = {5};</div>
<div>aux[]= Extrude {0, 0, box_size} {</div>
<div> Surface{6};</div>
<div>};</div>
<div>volBox = aux[1];</div>
<div><br>
</div>
<div>lc=10;</div>
<div>pnts[] += newp; Point(newp) = {7.150548, 1.000000, -6.990684, lc};</div>
<div>pnts[] += newp; Point(newp) = {-4.438894, 1.000000, -8.960816, lc};</div>
<div>pnts[] += newp; Point(newp) = {-9.893936, 1.000000, 1.452595, lc};</div>
<div>pnts[] += newp; Point(newp) = {-1.675894, 1.000000, 9.858569, lc};</div>
<div>pnts[] += newp; Point(newp) = {8.858176, 1.000000, 4.640336, lc};</div>
<div><br>
</div>
<div>For k In {0:#pnts[]-1}</div>
<div> k2 = k<(#pnts[]-1)?k+1:0;</div>
<div> ln1[]+=newl; Line(newl) = {pnts[k],pnts[k2]};</div>
<div>EndFor</div>
<div>Line Loop(newll) = ln1[];</div>
<div>surf1=news; Plane Surface(news) = newll-1;</div>
<div><br>
</div>
<div>pnts2[] += newp; Point(newp) = {1.675894, 4.750000, -9.858569, lc};</div>
<div>pnts2[] += newp; Point(newp) = {-8.858176, 4.750000, -4.640336, lc};</div>
<div>pnts2[] += newp; Point(newp) = {-7.150548, 4.750000, 6.990684, lc};</div>
<div>pnts2[] += newp; Point(newp) = {4.438894, 4.750000, 8.960816, lc};</div>
<div>pnts2[] += newp; Point(newp) = {9.893936, 4.750000, -1.452595, lc};</div>
<div><br>
</div>
<div>For k In {0:#pnts2[]-1}</div>
<div> k2 = k<(#pnts2[]-1)?k+1:0;</div>
<div> ln2[]+=newl; Line(newl) = {pnts2[k],pnts2[k2]};</div>
<div>EndFor</div>
<div>Line Loop(newll) = ln2[];</div>
<div>surf2=news; Plane Surface(news) = newll-1;</div>
<div><br>
</div>
<div>Surface{surf1} In Volume{volBox};</div>
<div>Surface{surf2} In Volume{volBox};</div>
<div><br>
</div>
<div><br>
</div>
<div>// This one is not yet embedded.</div>
<div>Point(newp) = {7.150548, 8.500000, -6.990684, lc};</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>HTH,</div>
<div>Ruth</div>
<div><br>
</div>
<br>
<div>
<div style="text-align:start;text-indent:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-align:start;text-indent:0px;word-wrap:break-word">
—<br>
Prof. Ruth V. Sabariego<br>
KU Leuven <br>
Dept. Electrical Engineering ESAT/Electa, EnergyVille<br>
<a href="http://www.esat.kuleuven.be/electa" target="_blank">http://www.esat.kuleuven.be/electa</a></div>
<div style="text-align:start;text-indent:0px;word-wrap:break-word">
<a href="http://www.energyville.be" target="_blank">http://www.energyville.be</a></div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-align:start;text-indent:0px;word-wrap:break-word">
<br>
</div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-align:start;text-indent:0px;word-wrap:break-word">
Free software: <a href="http://gmsh.info" target="_blank">http://gmsh.info</a> | <a href="http://getdp.info" target="_blank">http://getdp.info</a> | <a href="http://onelab.info" target="_blank">http://onelab.info</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
</div>
</div><div><div class="h5">
<br>
<div>
<blockquote type="cite">
<div>On 31 Mar 2016, at 21:33, Vincent Huber <<a href="mailto:vincent.huber@cemosis.fr" target="_blank">vincent.huber@cemosis.fr</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div style="font-family:'Courier New'">
<p style="margin:1.2em 0px!important">Hi Julius,</p>
<p style="margin:1.2em 0px!important">I guess you have to define theses points as
<code style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;margin:0px 0.15em;padding:0px 0.15em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">
Physical Points</code>, isn’t it ?</p>
<p style="margin:1.2em 0px!important">All the best,</p>
<p style="margin:1.2em 0px!important">VH</p>
<div title="MDH:PGRpdiBjbGFzcz0iZ21haWxfZGVmYXVsdCIgc3R5bGU9ImZvbnQtZmFtaWx5OmNvdXJpZXIgbmV3
LG1vbm9zcGFjZSI+SGkgSnVsaXVzLDwvZGl2PjxkaXYgY2xhc3M9ImdtYWlsX2RlZmF1bHQiIHN0
eWxlPSJmb250LWZhbWlseTpjb3VyaWVyIG5ldyxtb25vc3BhY2UiPjxicj48L2Rpdj48ZGl2IGNs
YXNzPSJnbWFpbF9kZWZhdWx0IiBzdHlsZT0iZm9udC1mYW1pbHk6Y291cmllciBuZXcsbW9ub3Nw
YWNlIj5JIGd1ZXNzIHlvdSBoYXZlIHRvIGRlZmluZSB0aGVzZXMgcG9pbnRzIGFzIGBQaHlzaWNh
bCBQb2ludHNgLCBpc24ndCBpdCA/PC9kaXY+PGRpdiBjbGFzcz0iZ21haWxfZGVmYXVsdCIgc3R5
bGU9ImZvbnQtZmFtaWx5OmNvdXJpZXIgbmV3LG1vbm9zcGFjZSI+PGJyPjwvZGl2PjxkaXYgY2xh
c3M9ImdtYWlsX2RlZmF1bHQiIHN0eWxlPSJmb250LWZhbWlseTpjb3VyaWVyIG5ldyxtb25vc3Bh
Y2UiPkFsbCB0aGUgYmVzdCw8L2Rpdj48ZGl2IGNsYXNzPSJnbWFpbF9kZWZhdWx0IiBzdHlsZT0i
Zm9udC1mYW1pbHk6Y291cmllciBuZXcsbW9ub3NwYWNlIj48YnI+PC9kaXY+PGRpdiBjbGFzcz0i
Z21haWxfZGVmYXVsdCIgc3R5bGU9ImZvbnQtZmFtaWx5OmNvdXJpZXIgbmV3LG1vbm9zcGFjZSI+
Vkg8L2Rpdj4=" style="min-height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2016-03-31 17:54 GMT+02:00 Julius Bier Kirkegaard <span dir="ltr">
<<a href="mailto:juliusbierk@gmail.com" target="_blank">juliusbierk@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>Dear all,<br>
<br>
</div>
I have (I think) a fairly simple question, but it's also quite atypical, so I have had no luck Googling. I hope that you one of you might have time to point me in the right direction...<br>
<div>
<p>I have a box:</p>
<pre style="margin-left:40px"><code><font size="1">box_size = 50;
lb = 10.;
Point(1) = {-box_size/2, -box_size/2, -box_size/2, lb};
Point(2) = {box_size/2, -box_size/2, -box_size/2, lb};
Point(3) = {box_size/2, box_size/2, -box_size/2, lb};
Point(4) = {-box_size/2, box_size/2, -box_size/2, lb};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line Loop(5) = {1, 2, 3, 4};
Plane Surface(6) = {5};
Extrude {0, 0, box_size} {
Surface{6};
}</font>
</code></pre>
<p>This works quite well and gmsh is happy to (3D) mesh it.</p>
<p>The problem is that I would to ensure that certain points inside the box are node points. So my question is, how do I ensure that points, like these</p>
<pre style="margin-left:40px"><code><font size="1">lc = 10;
Point(5) = {7.150548, 1.000000, -6.990684, lc};
Point(6) = {-4.438894, 1.000000, -8.960816, lc};
Point(7) = {-9.893936, 1.000000, 1.452595, lc};
Point(8) = {-1.675894, 1.000000, 9.858569, lc};
Point(9) = {8.858176, 1.000000, 4.640336, lc};
Point(10) = {1.675894, 4.750000, -9.858569, lc};
Point(11) = {-8.858176, 4.750000, -4.640336, lc};
Point(12) = {-7.150548, 4.750000, 6.990684, lc};
Point(13) = {4.438894, 4.750000, 8.960816, lc};
Point(14) = {9.893936, 4.750000, -1.452595, lc};
Point(15) = {7.150548, 8.500000, -6.990684, lc};</font>
</code></pre>
<p>are part of the mesh nodes?<br>
</p>
<p>The reason I need this is that I need to impose boundary conditions at these specific points.</p>
<div><br>
</div>
<p>Thank you all in advance.</p>
<div><br>
</div>
Best wishes,<br>
</div>
<div>Julius<br>
<br>
</div>
<br>
<br>
<br>
<br>
<br>
</div>
<br>
_______________________________________________<br>
gmsh mailing list<br>
<a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
<a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>
<div dir="ltr"><font face="courier new, monospace">Docteur Ingénieur de recherche</font>
<div><font face="courier new, monospace"><a href="http://www.cemosis.fr/" target="_blank">CeMoSiS</a> -
<a href="mailto:vincent.huber@cemosis.fr" target="_blank">vincent.huber@cemosis.fr</a></font></div>
<div><font face="courier new, monospace">Tel: +33 (0)3 68 8<b>5 02 06</b></font></div>
<div><font face="courier new, monospace">IRMA - 7, rue René Descartes</font></div>
<div><font face="courier new, monospace">67 000 Strasbourg</font></div>
<div><br>
</div>
<div><img src="http://www.google.com/a/cpanel/cemosis.fr/images/logo.gif"></div>
</div>
</div>
</div>
_______________________________________________<br>
gmsh mailing list<br>
<a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
<a href="http://onelab.info/mailman/listinfo/gmsh" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br>
</div>
</blockquote>
</div>
<br>
</div></div></div>
</blockquote></div><br></div>