Class documentation of Concepts

Loading...
Searching...
No Matches
multipole.hh
Go to the documentation of this file.
1
6#ifndef multipole_hh
7#define multipole_hh
8
10#include "bem/element.hh"
11#include "cluster/expansion.hh"
12
13namespace cluster {
14
15 // ***************************************************** MultipoleLaplaceF **
16
20 template <class Fspc = concepts::Real>
21 class MultipoleLaplaceF : public ExpansionF<Fspc> {
23 uint m_;
24
25 public:
29 MultipoleLaplaceF(uint m) {m_ = m;}
30
34 uint blksz(uint m) const {return m * (m + 1);}
35 uint m() const {return m_;}
38 virtual FColReal* getCol(uint blksz) const {
39 return new FColReal(blksz);
40 }
42 inline void evaluate(uint m, const concepts::Real3d& z,
43 FColExp* Fexp) const;
44 void evaluate(uint m, const concepts::Real3d& z, FColReal* Fexp) const;
46 inline void apply(uint m, const FColExp* Fexp, const Fspc src[],
47 Fspc dst[]) const;
48 void apply(uint m, const FColReal Fexp[], const Fspc src[],
49 Fspc dst[]) const;
50 };
51
52 template <class Fspc>
54 FColExp* Fexp) const {
55 FColReal* Fmpe = dynamic_cast<FColReal*>(Fexp);
56 if (Fmpe) {evaluate(m, z, Fmpe); return;}
57
58 throw
59 conceptsException(concepts::MissingFeature("FColExp not supported"));
60 }
61
62 template <class Fspc>
63 void MultipoleLaplaceF<Fspc>::apply(uint m, const FColExp* Fexp,
64 const Fspc src[], Fspc dst[]) const {
65 const FColReal* Fmpe = dynamic_cast<const FColReal*>(Fexp);
66 if (Fmpe) {apply(m, Fmpe, src, dst); return;}
67
68 throw
69 conceptsException(concepts::MissingFeature("FColExp not supported"));
70 }
71
72} // namespace cluster
73
74#endif // multipole_hh
#define conceptsException(exc)
uint blksz(uint m) const
Definition multipole.hh:34
virtual FColReal * getCol(uint blksz) const
Definition multipole.hh:38
uint m() const
Order of the expansion.
Definition multipole.hh:35
void evaluate(uint m, const concepts::Real3d &z, FColExp *Fexp) const
Definition multipole.hh:53
void apply(uint m, const FColExp *Fexp, const Fspc src[], Fspc dst[]) const
Definition multipole.hh:63