[Gmsh] 3D array

Ingo Reinhold ingo at pdx.edu
Sun Apr 16 00:35:03 CEST 2006


Dear all,

I am pretty new to GMSH and I tried to initialize a 3D array and fill  
it with random numbers.

lc=1;
//dimensions
xdim=5;
ydim=5;
zdim=5;
array[{xdim,ydim,zdim}]=1;
//random distribution
For i In {0:(xdim-1):1}
For j In {0:(ydim-1):1}
For k In {0:(zdim-1):1}
	array[{i,j,k}]=0;
	array[{i,j,k}]=Fmod (Rand (1),1);
EndFor
EndFor
EndFor

For some reason i can not write or acces the array. It also tells me  
that the number of imbricated loops is reached. Does that mean I  
can't interleave more that 3 loops?

Thanks for helping,

Ingo