int FMM3d::UpwEqu2TrgChk_dgemv Point3  srcCtr,
double  srcRad,
const DblNumMat &  trgPos,
const DblNumVec &  srcDen,
DblNumVec &  trgVal
[protected]
 

Definition at line 114 of file fmm3d.cpp.

References _knl_mm, _matmgnt, Kernel3d::kernel(), MatMgnt3d::localPos(), Kernel3d::srcDOF(), Kernel3d::trgDOF(), and UE.

00115 {
00116   int TMAX = 1024;
00117   if(trgPos.n()<=TMAX) {
00118          DblNumMat srcPos; iC( _matmgnt->localPos(UE, srcCtr, srcRad, srcPos) );
00119          int M = trgPos.n() * _knl_mm.trgDOF();
00120          int N = srcPos.n() * _knl_mm.srcDOF();
00121          DblNumMat tmp(M,N);
00122          iC( _knl_mm.kernel(srcPos, srcPos, trgPos, tmp) );
00123          iC( dgemv(1.0, tmp, srcDen, 1.0, trgVal) );
00124   } else {
00125          DblNumMat srcPos; iC( _matmgnt->localPos(UE, srcCtr, srcRad, srcPos) );
00126          int RUNS = (trgPos.n()-1) / TMAX + 1;
00127          for(int r=0; r<RUNS; r++) {
00128                 int stt = r*TMAX;
00129                 int end = min((r+1)*TMAX, trgPos.n());
00130                 int num = end-stt;
00131                 int M = num * _knl_mm.trgDOF();
00132                 int N = srcPos.n() * _knl_mm.srcDOF();
00133                 DblNumMat tps(dim(), num, false, trgPos.data() + stt*dim());
00134                 DblNumVec tvl(num*_knl_mm.trgDOF(), false, trgVal.data() + stt*_knl_mm.trgDOF());
00135                 DblNumMat tmp(M,N);
00136                 iC( _knl_mm.kernel(srcPos, srcPos, tps, tmp) );
00137                 iC( dgemv(1.0, tmp, srcDen, 1.0, tvl) );
00138          }
00139   }
00140   return 0;
00141 }


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