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

Downward Equivalent To Target Check

Definition at line 84 of file fmm3d.cpp.

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

00085 {
00086   int TMAX = 1024;
00087   if(trgPos.n()<=TMAX) {
00088          DblNumMat srcPos; iC( _matmgnt->localPos(DE, srcCtr, srcRad, srcPos) );
00089          int M = trgPos.n() * _knl_mm.trgDOF();
00090          int N = srcPos.n() * _knl_mm.srcDOF();
00091          DblNumMat tmp(M,N);
00092          iC( _knl_mm.kernel(srcPos, srcPos, trgPos, tmp) );
00093          iC( dgemv(1.0, tmp, srcDen, 1.0, trgVal) );
00094   } else {
00095          DblNumMat srcPos; iC( _matmgnt->localPos(DE, srcCtr, srcRad, srcPos) );
00096          int RUNS = (trgPos.n()-1) / TMAX + 1;
00097          for(int r=0; r<RUNS; r++) {
00098                 int stt = r*TMAX;
00099                 int end = min((r+1)*TMAX, trgPos.n());
00100                 int num = end-stt;
00101                 int M = num * _knl_mm.trgDOF();
00102                 int N = srcPos.n() * _knl_mm.srcDOF();
00103                 DblNumMat tps(dim(), num, false, trgPos.data() + stt*dim());
00104                 DblNumVec tvl(num*_knl_mm.trgDOF(), false, trgVal.data() + stt*_knl_mm.trgDOF());
00105                 DblNumMat tmp(M, N);
00106                 iC( _knl_mm.kernel(srcPos, srcPos, tps, tmp) );
00107                 iC( dgemv(1.0, tmp, srcDen, 1.0, tvl) );
00108          }
00109   }
00110   return 0;
00111 }


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