int MatMgnt3d::UpwChk2UpwEqu_dgemv int  level,
const DblNumVec &  ,
DblNumVec & 
 

Definition at line 90 of file matmgnt3d.cpp.

References _hom, _knl, _upwChk2UpwEqu, alt(), dim(), Kernel3d::kernel(), plnDatSze(), samPos(), UC, and UE.

00091 {
00092   DblNumMat& _UC2UE = (_hom==true) ? _upwChk2UpwEqu[0] : _upwChk2UpwEqu[l];
00093   double R = (_hom==true) ? 1 : 1.0/pow(2.0,l);
00094   //---------compute matrix
00095   if(_UC2UE.m()==0) {    //cerr<<"UpwChk2UpwEqu compute"<<endl;
00096          //set matrix
00097          DblNumMat ud2c(plnDatSze(UC), plnDatSze(UE));
00098          DblNumMat chkPos(dim(),samPos(UC).n());         clear(chkPos);  iC( daxpy(R, samPos(UC), chkPos) ); //scale
00099          DblNumMat denPos(dim(),samPos(UE).n());         clear(denPos);  iC( daxpy(R, samPos(UE), denPos) ); //scale
00100          
00101          iC( _knl.kernel(denPos, denPos, chkPos, ud2c) );
00102          _UC2UE.resize(plnDatSze(UE), plnDatSze(UC));
00103          iC( pinv(ud2c, alt(), _UC2UE) );
00104   }
00105   //---------matvec
00106   if(_hom==true) {
00107          //matvec
00108          int srcDOF = this->srcDOF();
00109          DblNumVec tmpDen(srcDOF*samPos(UE).n(), false, _wsbuf);         clear(tmpDen);
00110          iC( dgemv(1.0, _UC2UE, chk, 1.0, tmpDen) );
00111          //scale
00112          vector<double> sclvec(srcDOF);  for(int s=0; s<srcDOF; s++)            sclvec[s] = pow(2.0, - l*_degVec[s]);
00113          int cnt = 0;
00114          for(int i=0; i < samPos(UE).n(); i++)
00115                 for(int s=0; s < srcDOF; s++) {
00116                   den(cnt) = den(cnt) + tmpDen(cnt) * sclvec[s];
00117                   cnt++;
00118                 }
00119   } else {
00120          iC( dgemv(1.0, _UC2UE, chk, 1.0, den) );
00121   }
00122   return (0);
00123 }


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