int FMM3d::setup map< string, string > &  opts  )  [virtual]
 

Setup function

Implements KnlMat3d.

Definition at line 26 of file fmm3d_setup.cpp.

References _np, and ComObject::prefix().

00027 {
00028   //-----------------------------------------------------
00029   map<string,string>::iterator mi;
00030   mi = opts.find("-" + prefix() + "np"); iA(mi!=opts.end());
00031   { istringstream ss((*mi).second); ss>>_np; }
00032     
00033   //-----------------------------------------------------
00034   iA(_srcPos!=NULL && _srcNor!=NULL && _trgPos!=NULL);
00035   iA((*_srcPos).m()==dim() && (*_trgPos).m()==dim());  //nothing to do
00036   //1. _let
00037   _let = new Let3d(prefix()+"let3d_");
00038   _let->srcPos()=_srcPos;  _let->trgPos()=_trgPos;  _let->center()=_center;  _let->rootLevel()=_rootLevel;
00039   iC( _let->setup(opts) );
00040   //2. decide _eq_mm and _mul_mm, and get matmgnt based on that
00041   switch(_knl.kernelType()) {
00042          //laplace kernels
00043   case KNL_LAP_S_U: _knl_mm = Kernel3d(KNL_LAP_S_U, _knl.coefs()); break;
00044   case KNL_LAP_D_U: _knl_mm = Kernel3d(KNL_LAP_S_U, _knl.coefs()); break;
00045          //stokes kernels
00046   case KNL_STK_S_U: _knl_mm = Kernel3d(KNL_STK_F_U, _knl.coefs()); break;
00047   case KNL_STK_S_P: _knl_mm = Kernel3d(KNL_LAP_S_U, vector<double>()); break;
00048   case KNL_STK_D_U: _knl_mm = Kernel3d(KNL_STK_F_U, _knl.coefs()); break;
00049   case KNL_STK_D_P: _knl_mm = Kernel3d(KNL_LAP_S_U, vector<double>()); break;
00050          //navier kernels
00051   case KNL_NAV_S_U: _knl_mm = Kernel3d(KNL_NAV_S_U, _knl.coefs()); break;
00052   case KNL_NAV_D_U: _knl_mm = Kernel3d(KNL_NAV_S_U, _knl.coefs()); break;
00053          //others
00054   case KNL_SQRTLAP: _knl_mm = Kernel3d(KNL_SQRTLAP, _knl.coefs()); break;
00055   case KNL_EXP    : _knl_mm = Kernel3d(KNL_EXP    , _knl.coefs()); break;
00056   default: iA(0);
00057   }
00058   _mul_mm = 1; //for the time being
00059   
00060   _matmgnt  = MatMgnt3d::getmmptr(_knl_mm, _np);
00061   //3. self setup
00062   iC( srcData() );
00063   iC( trgData() );
00064   //-----------------------------------------------------
00065   return (0);
00066 }


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