Class documentation of Concepts

Loading...
Searching...
No Matches
multipoleDX.hh
Go to the documentation of this file.
1
6#ifndef multipoleDX_hh
7#define multipoleDX_hh
8
10#include "bem/element.hh"
11#include "cluster/expansion.hh"
12#include "cluster/multipoleX.hh"
13
14namespace cluster {
15
16 // *********************************************************** DMultipoleX **
17
21 template <class F = concepts::Real>
22 class DMultipoleX : public ExpansionXY<F> {
23
26
28 uint m_;
30 uint blksz_;
32 uint gauss_;
33
35 concepts::Real* foo_;
36 concepts::Real* fee_;
37
38 public:
43 DMultipoleX(uint m, uint gauss);
44
45 ~DMultipoleX() {delete[] fee_; delete[] foo_;}
46
47 uint blksz() const {return blksz_;}
48 uint m() const {return m_;}
49 inline XYColReal* getCol(uint blksz, uint n) const;
56 concepts::Real X[]) const;
58 inline void shift(const concepts::Real3d& z, const concepts::Real src[],
59 concepts::Real dst[]) const;
60 inline void shift(const concepts::Real3d& z, const concepts::Cmplx src[],
61 concepts::Cmplx dst[]) const;
63 inline void apply(const XYColExpPtr* X, const F src[], F dst[]) const;
64
72 const concepts::Real3d& c, XYColExpPtr* X[]) const;
75 const concepts::Real3d& c, XYColExpPtr* X[]) const;
78 const concepts::Real3d& c, XYColExpPtr* X[]) const;
81 const concepts::Real3d& c, XYColExpPtr* X[]) const;
84 const concepts::Real3d& c, XYColExpPtr* X[]) const;
85 };
86
87 template <class F>
88 inline XYColReal* DMultipoleX<F>::getCol(uint blksz, uint n) const {
89 return new XYColReal(blksz, n);
90 }
91
92 template <class F>
94 const concepts::Real src[],
95 concepts::Real dst[]) const {
96 X_.shift(z, src, dst, 0);
97 }
98
99 template <class F>
100 inline void DMultipoleX<F>::shift(const concepts::Real3d& z,
101 const concepts::Cmplx src[],
102 concepts::Cmplx dst[]) const {
103 X_.shift(z, src, dst);
104 }
105
106 template <class F>
107 inline void DMultipoleX<F>::apply(const XYColExpPtr* X,
108 const F src[], F dst[]) const {
109 const XYColRealPtr* XMPE = dynamic_cast<const XYColRealPtr*>(X);
110 if (X) {X_.apply(XMPE->value(), src, dst); return;}
111
112 throw
113 conceptsException(concepts::MissingFeature("XYColExp not supported"));
114 }
115
116} // namespace cluster
117
118#endif // multipoleDX_hh
#define conceptsException(exc)
void evaluate(const bem::Linear3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
XYColReal * getCol(uint blksz, uint n) const
void shift(const concepts::Real3d &z, const concepts::Real src[], concepts::Real dst[]) const
Shifting the expansion coefficients.
uint m() const
Order of the expansion.
void evaluate(const concepts::Element< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
void apply(const XYColExpPtr *X, const F src[], F dst[]) const
void evaluate(const bem::Constant3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
void evaluate(const bem::Constant3d002< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
void evaluate(const bem::Constant3d001< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
DMultipoleX(uint m, uint gauss)
void evaluate(const concepts::Real3d &z, const concepts::Unit3d &h, concepts::Real X[]) const
uint blksz() const
Size of memory used for the expansion.
double Real
Definition typedefs.hh:39
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition typedefs.hh:42