int MatMgnt3d::regVal2SamVal const DblNumVec &  ,
DblNumVec & 
 

Definition at line 289 of file matmgnt3d.cpp.

References _np, np(), and trgDOF().

Referenced by effVal2PlnVal().

00290 {
00291   int np = _np;
00292   int rgnum = 2*np;
00293   int trgDOF = this->trgDOF();
00294   int cnt=0;
00295   //the order of iterating is the same as SampleGrid
00296   for(int i=0; i<np; i++)
00297          for(int j=0; j<np; j++)
00298                 for(int k=0; k<np; k++) {
00299                   if(i==0 || i==np-1 || j==0 || j==np-1 || k==0 || k==np-1) {
00300                          //the position is fortran style
00301                          int rgoff = (k+np/2)*rgnum*rgnum + (j+np/2)*rgnum + (i+np/2);
00302                          for(int f=0; f<trgDOF; f++) {
00303                                 samVal(trgDOF*cnt + f) += regVal(trgDOF*rgoff + f);
00304                          }
00305                          cnt++;
00306                   }
00307                 }
00308   return 0;
00309 }


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