<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hey Ruth,<br>
Thanks for the advice. I figured it out roughly at the same time :)<br>
Excellent, now my amazing geometry works ^^<br>
Greetings,<br>
Aleksejs<br>
<p><br>
</p>
<div class="moz-cite-prefix">On 14.09.2016 16:28, Ruth Vazquez
Sabariego wrote:<br>
</div>
<blockquote
cite="mid:A4092C4F-5958-4B5E-B9B8-439BD4CE8822@kuleuven.be"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div class="">Dear Aleksejs,</div>
<div class="">The problem is the indexing. You should start at 0.</div>
<div class=""><br class="">
</div>
<span class="">For i In {0:n-1}<br class="">
</span> ss1[i] = ...<span class="">
</span> ss2[i] = ...<span class=""><br class="">
</span> ss3[i] = …
<div class=""><span class="">EndFor<br class="">
</span><span class=""><br class="">
<br class="">
Otherwise, the first element of the array won’t be correct.</span></div>
<div class=""><span class="">From your error msg, seems to be 0.</span></div>
<div class=""><span class=""><br class="">
</span></div>
<div class=""><span class="">Regards,</span></div>
<div class=""><span class="">Ruth<br class="">
</span><br class="">
<div class="">
<div style="orphans: auto; text-align: start; text-indent:
0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode:
space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal;
text-transform: none; white-space: normal; word-spacing:
0px; -webkit-text-stroke-width: 0px; orphans: auto;
text-align: start; text-indent: 0px; widows: auto;
word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;" class="">
—<br class="">
Prof. Ruth V. Sabariego<br class="">
KU Leuven <br class="">
Dept. Electrical Engineering ESAT/Electa, EnergyVille<br
class="">
<a moz-do-not-send="true"
href="http://www.esat.kuleuven.be/electa" class="">http://www.esat.kuleuven.be/electa</a></div>
<div style="orphans: auto; text-align: start; text-indent:
0px; widows: auto; word-wrap: break-word;
-webkit-nbsp-mode: space; -webkit-line-break:
after-white-space;" class="">
<a moz-do-not-send="true" href="http://www.energyville.be"
class="">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; -webkit-text-stroke-width: 0px; orphans: auto;
text-align: start; text-indent: 0px; widows: auto;
word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;" class="">
<br class="">
</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal;
text-transform: none; white-space: normal; word-spacing:
0px; -webkit-text-stroke-width: 0px; orphans: auto;
text-align: start; text-indent: 0px; widows: auto;
word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;" class="">
Free software: <a moz-do-not-send="true"
href="http://gmsh.info" class="">http://gmsh.info</a> | <a
moz-do-not-send="true" href="http://getdp.info" class="">http://getdp.info</a> | <a
moz-do-not-send="true" href="http://onelab.info"
class="">http://onelab.info</a><br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</div>
</div>
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 14 Sep 2016, at 12:05, Aleksejs Fomins <<a
moz-do-not-send="true"
href="mailto:aleksejs.fomins@lspr.swiss" class="">aleksejs.fomins@lspr.swiss</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Dear Gmsh,<br class="">
I am trying to make a complicated surface loop<br
class="">
<br class="">
surfloop = newreg; Surface Loop(surfloop_air) = {ss1[],
ss2[], ss3[], ss4[], s1, s2, s3, s4, s5};<br class="">
<br class="">
where s* are Plane Surfaces and ss* are arrays of plane
surfaces. I generate my surface arrays in a loop<br
class="">
<br class="">
For i In {1:n}<br class="">
ss1[i] = ...<br class="">
ss2[i] = ...<br class="">
ss3[i] = ...<br class="">
EndFor<br class="">
<br class="">
I notice that this works if only ss1 is generated inside
the loop, as then the index GMSH assigns to it is
continuous. Otherwise I get error "Unknown surface 0".
However, I can plot any one entry of any array, e.g.
ss2[18], and I would see what I expect, so the arrays
are correct.<br class="">
<br class="">
Could you please explain to me, what is the correct way
to pass all entries of an array?<br class="">
<br class="">
Best regards,<br class="">
Aleksejs<br class="">
<br class="">
<br class="">
_______________________________________________<br
class="">
gmsh mailing list<br class="">
<a moz-do-not-send="true" href="mailto:gmsh@onelab.info"
class="">gmsh@onelab.info</a><br class="">
<a class="moz-txt-link-freetext" href="http://onelab.info/mailman/listinfo/gmsh">http://onelab.info/mailman/listinfo/gmsh</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<br>
</body>
</html>