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

Definition at line 159 of file matmgnt3d.cpp.

References _dwnChk2DwnEqu, _hom, _knl, alt(), DC, DE, dim(), Kernel3d::kernel(), plnDatSze(), and samPos().

00160 {
00161   DblNumMat& _DC2DE = (_hom==true) ? _dwnChk2DwnEqu[0]: _dwnChk2DwnEqu[l];
00162   double R = (_hom==true) ? 1 : 1.0/pow(2.0,l);
00163   //---------compute matrix
00164   if(_DC2DE.m()==0) {    //cerr<<"DwnChk2DwnEqu compute"<<endl;
00165          DblNumMat dd2c(plnDatSze(DC), plnDatSze(DE));
00166          DblNumMat chkPos(dim(),samPos(DC).n());                clear(chkPos);   iC( daxpy(R, samPos(DC), chkPos) ); //scale
00167          DblNumMat denPos(dim(),samPos(DE).n());                clear(denPos);   iC( daxpy(R, samPos(DE), denPos) ); //scale
00168          
00169          iC( _knl.kernel(denPos, denPos, chkPos, dd2c) );//matrix
00170          _DC2DE.resize(plnDatSze(DE), plnDatSze(DC)); //_memused[2] += plndnenum()*dof()*plndncnum()*dof()*sizeof(double);
00171          iC( pinv(dd2c, alt(), _DC2DE) );
00172   }
00173   //---------matvec
00174   if(_hom==true) {
00175          int srcDOF = this->srcDOF();
00176          DblNumVec tmpDen(srcDOF*samPos(DE).n(), false, _wsbuf);         clear(tmpDen);
00177          iC( dgemv(1.0, _DC2DE, chk, 1.0, tmpDen) );
00178          //scale
00179          vector<double> sclvec(srcDOF);  for(int s=0; s<srcDOF; s++)            sclvec[s] = pow(2.0, - l*_degVec[s]);
00180          int cnt = 0;
00181          for(int i=0; i<samPos(DE).n(); i++)
00182                 for(int s=0; s<srcDOF; s++) {
00183                   den(cnt) = den(cnt) + tmpDen(cnt) * sclvec[s];
00184                   cnt++;
00185                 }
00186   } else {
00187          iC( dgemv(1.0, _DC2DE, chk, 1.0, den) );
00188   }
00189   return 0;
00190 }


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