Dear gmsh community

I'm wondering if it is possible to have .geo code like this:

/*********************************/
lc = 0.1;
coords[]= { {1,1,1}, {-1,1,1}, {1,-1,1}, {-1,-1,1} };

For i In {0:3}
    Point(i+1) = {coords[i,0],coords[i,1],coords[i,2],lc};
EndFor
/*********************************/

That is, 'coords' is a matrix of values.  I'm aware that if 'coords' is a
list (a vector) of values the piece of code below would work. But if
'coords'  could be declared as a matrix, the rest of my code would be a lot
easier.

/*********************************/
lc = 0.1;
coords[]= { 1,1,1, -1,1,1, 1,-1,1, -1,-1,1 };

aux=0;
N = #coords[]/3;
For i In {0:N-1}
    Point(i) = {coords[aux+0],coords[aux+1],coords[aux+2],lc};
    aux = aux+3;
EndFor
/*********************************/

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

Reply via email to