Helllo Roman,

thanks! Indeed, you are very right.

I did not see the forest for the trees!

I appreciate your help!

Greetings to Cracow! Benedikt



-----Original Message-----
From: Roman Putanowicz [mailto:[email protected]]
Sent: Thu 2/7/2013 21:23
To: Oswald Benedikt
Cc: [email protected]
Subject: Re: [Gmsh] behavior of doubly nested loop ?
 
> Dear gmsh, the following doubly nested loops gives me results that I do not 
> understand,
> i.e. the index should count through from 0 to 19, without giving certain 
> indices twice.
> 
> I use the most recent nightly build of gmsh (2.6.2-svn)
> 
> Perhaps, I do not see the forest for the trees, can you comment ?

Well the problem is that with the syntex {0:numnpx} you have not
numnpx elements but numnpx+1 elements (the counter goes from 0 to numnpx).
In that case you equation for index should be:

     index = uy * (numnpx+1) + ux;

If you are used to C/C++ loops it is easy to make this mistake 
(I know something about it :-);


Regards

Roman

-- 
Roman Putanowicz, PhD  < [email protected]  >
Institute for Computational Civil Engng (L-5)
Dept. of Civil Engng, Cracow Univ. of Technology
www.l5.pk.edu.pl, tel. +48 12 628 2569, fax 2034

_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh

Reply via email to