int FMM3d::SrcEqu2TrgChk_dgemv const DblNumMat &  srcPos,
const DblNumMat &  srcNor,
const DblNumMat &  trgPos,
const DblNumVec &  srcDen,
DblNumVec &  trgVal
[protected]
 

Source Equivaluent To Target Check Multiplication

Definition at line 35 of file fmm3d.cpp.

References KnlMat3d::_knl, Kernel3d::kernel(), Kernel3d::srcDOF(), and Kernel3d::trgDOF().

00036 {
00037   int TMAX = 1024;
00038   if(trgPos.n()<=TMAX) {
00039          int M = trgPos.n() * _knl.trgDOF();
00040          int N = srcPos.n() * _knl.srcDOF();
00041          DblNumMat tmp(M,N);
00042          iC( _knl.kernel(srcPos, srcNor, trgPos, tmp) );
00043          iC( dgemv(1.0, tmp, srcDen, 1.0, trgVal) );
00044   } else {
00045          int RUNS = (trgPos.n()-1) / TMAX + 1;
00046          for(int r=0; r<RUNS; r++) {
00047                 int stt = r*TMAX;
00048                 int end = min((r+1)*TMAX, trgPos.n());
00049                 int num = end-stt;
00050                 int M = num * _knl.trgDOF();
00051                 int N = srcPos.n() * _knl.srcDOF();
00052                 DblNumMat tps(dim(), num, false, trgPos.data() + stt*dim() );
00053                 DblNumVec tvl(num*_knl.trgDOF(), false, trgVal.data() + stt*_knl.trgDOF());
00054                 DblNumMat tmp(M,N);
00055                 iC( _knl.kernel(srcPos, srcNor, tps, tmp) );
00056                 iC( dgemv(1.0, tmp, srcDen, 1.0, tvl) );
00057          }
00058   }
00059   return (0);
00060 }


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