Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

cluster/multipoleY.hh
Go to the documentation of this file.
00001 /* Multipole kernel expansion
00002  */
00003 
00004 #ifndef multipoleY_hh
00005 #define multipoleY_hh
00006 
00007 #include "basics/exceptions.hh"
00008 #include "bem/element.hh"
00009 #include "cluster/expansion.hh"
00010 
00011 namespace cluster {
00012 
00013   // ************************************************************ MultipoleY **
00014 
00018   template <class F = concepts::Real>
00019   class MultipoleY : public ExpansionXY<F> {
00020 
00022     uint m_;
00024     uint blksz_;
00026     uint gauss_;
00027 
00029     concepts::Real* foo_;
00030 
00031   public:
00036     MultipoleY(uint m, uint gauss);
00037 
00038     ~MultipoleY() {delete[] foo_;}
00039 
00040     uint blksz() const {return blksz_;}
00041     uint m() const {return m_;}
00042     inline XYColReal* getCol(uint blksz, uint n) const;
00047     void evaluate(const concepts::Real3d& z, concepts::Real Y[]) const;
00048     inline void shift(const concepts::Real3d& z, const concepts::Real src[],
00049           concepts::Real dst[]) const;
00050     void shift(const concepts::Real3d& z, const concepts::Cmplx src[],
00051          concepts::Cmplx dst[]) const;
00052     template<class FF>
00053     void shift(const concepts::Real3d& z, const FF src[], FF dst[],
00054          uint foo) const;
00055     void apply(const concepts::Real Y[], const F src[], F dst[]) const;
00056     inline void apply(const XYColExpPtr* Y, const F src[], F dst[]) const;
00057 
00064     void evaluate(const concepts::Element<F>& elm,
00065       const concepts::Real3d& c, XYColExpPtr* Y[]) const;
00067     void evaluate(const bem::Dirac3d000<F>& elm,
00068       const concepts::Real3d& c, XYColExpPtr* Y[]) const;
00070     void evaluate(const bem::Constant3d000<F>& elm,
00071       const concepts::Real3d& c, XYColExpPtr* Y[]) const;
00073     void evaluate(const bem::Constant3d001<F>& elm,
00074       const concepts::Real3d& c, XYColExpPtr* Y[]) const;
00076     void evaluate(const bem::Constant3d002<F>& elm,
00077       const concepts::Real3d& c, XYColExpPtr* Y[]) const;
00079     void evaluate(const bem::Linear3d000<F>& elm,
00080       const concepts::Real3d& c, XYColExpPtr* Y[]) const;
00081   };
00082 
00083   template <class F>
00084   inline XYColReal* MultipoleY<F>::getCol(uint blksz, uint n) const {
00085     return new XYColReal(blksz, n);
00086   }
00087 
00088   template <class F>
00089   inline void MultipoleY<F>::shift(const concepts::Real3d& z,
00090            const concepts::Real src[],
00091            concepts::Real dst[]) const {
00092     shift<concepts::Real>(z, src, dst, 0);
00093   }
00094 
00095   template <class F>
00096   inline void MultipoleY<F>::apply(const XYColExpPtr* Y, const F src[],
00097            F dst[]) const {
00098     const XYColRealPtr* YMPE = dynamic_cast<const XYColRealPtr*>(Y);
00099     if (Y) {apply(YMPE->value(), src, dst);  return;}
00100 
00101     throw
00102       conceptsException(concepts::MissingFeature("XYColExp not supported"));
00103   }
00104 
00105 } // namespace cluster
00106 
00107 #endif // multipoleY_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)