[Gmsh] 3D array

Christophe Geuzaine cag32 at case.edu
Sun Apr 16 05:56:19 CEST 2006


Ingo Reinhold wrote:
> 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;

Ingo - Gmsh only supports 1D arrays...


> //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
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 


-- 
Christophe Geuzaine
Assistant Professor, Case Western Reserve University, Mathematics
http://www.case.edu/artsci/math/geuzaine