int MatMgnt3d::regPosCal int  n,
double  R,
DblNumMat &  ret
 

calculate the fft regular position grid

Definition at line 423 of file matmgnt3d.cpp.

References dim().

Referenced by setup().

00424 {
00425   int n = 2*np*2*np*2*np;
00426   positions.resize(dim(), n);
00427   double step = 2.0/(np-1);
00428   int cnt = 0;
00429   for(int k=0; k<2*np; k++)
00430          for(int j=0; j<2*np; j++)
00431                 for(int i=0; i<2*np; i++) {
00432                   int gi = (i<np) ? i : i-2*np;
00433                   int gj = (j<np) ? j : j-2*np;
00434                   int gk = (k<np) ? k : k-2*np;
00435                   positions(0, cnt) = R * gi*step;
00436                   positions(1, cnt) = R * gj*step;
00437                   positions(2, cnt) = R * gk*step;
00438                   cnt ++;
00439                 }
00440   iA(cnt==n);
00441   return 0;
00442 }


Generated on Sun Dec 4 19:24:41 2005 for fmm3d by  doxygen 1.4.5