multipoleDY.hh

Go to the documentation of this file.
1 
6 #ifndef multipoleDY_hh
7 #define multipoleDY_hh
8 
9 #include "basics/exceptions.hh"
10 #include "bem/element.hh"
11 #include "cluster/expansion.hh"
12 #include "cluster/multipoleY.hh"
13 
14 namespace cluster {
15 
16  // *********************************************************** DMultipoleY **
17 
21  template <class F = concepts::Real>
22  class DMultipoleY : public ExpansionXY<F> {
23 
26 
28  uint m_;
30  uint blksz_;
32  uint gauss_;
33 
37 
38  public:
43  DMultipoleY(uint m, uint gauss);
44 
45  ~DMultipoleY() {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;
55  void evaluate(const concepts::Real3d& z, const concepts::Unit3d& h,
56  concepts::Real Y[]) const;
57  inline void shift(const concepts::Real3d& z, const concepts::Real src[],
58  concepts::Real dst[]) const;
59  inline void shift(const concepts::Real3d& z, const concepts::Cmplx src[],
60  concepts::Cmplx dst[]) const;
62  inline void apply(const XYColExpPtr* Y, const F src[], F dst[]) const;
63 
70  void evaluate(const concepts::Element<F>& elm,
71  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
74  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
77  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
80  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
82  void evaluate(const bem::Linear3d000<F>& elm,
83  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
84  };
85 
86  template <class Fspc>
87  inline XYColReal* DMultipoleY<Fspc>::getCol(uint blksz, uint n) const {
88  return new XYColReal(blksz, n);
89  }
90 
91  template <class Fspc>
93  const concepts::Real src[],
94  concepts::Real dst[]) const {
95  Y_.shift(z, src, dst, 0);
96  }
97 
98  template <class Fspc>
100  const concepts::Cmplx src[],
101  concepts::Cmplx dst[]) const {
102  Y_.shift(z, src, dst);
103  }
104 
105  template <class F>
106  inline void DMultipoleY<F>::apply(const XYColExpPtr* Y,
107  const F src[], F dst[]) const {
108  const XYColRealPtr* YMPE = dynamic_cast<const XYColRealPtr*>(Y);
109  if (YMPE) {Y_.apply(YMPE->value(), src, dst); return;}
110 
111  throw
112  conceptsException(concepts::MissingFeature("XYColExp not supported"));
113  }
114 
115 } // namespace cluster
116 
117 #endif // multipoleDY_hh
uint blksz_
Memory used for expansion coefficients.
Definition: multipoleDY.hh:30
uint blksz() const
Definition: multipoleDY.hh:47
An abstract class for an element of a space.
Definition: exceptions.hh:15
Linear triangular element.
Definition: element.hh:141
XYColF< concepts::Real > XYColReal
Definition: expansion.hh:89
Constant triangular element.
Definition: element.hh:239
#define conceptsException(exc)
Prepares an exception for throwing.
Definition: exceptions.hh:344
concepts::Real * fee_
Definition: multipoleDY.hh:36
void apply(const XYColExpPtr *Y, const F src[], F dst[]) const
Definition: multipoleDY.hh:106
void evaluate(const bem::Constant3d001< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
MultipoleY< F > Y_
Expansion used for shift and apply.
Definition: multipoleDY.hh:25
Normal derivative of the part of the Multipole kernel expansion.
Definition: multipoleDY.hh:22
part of the Multipole kernel expansion
Definition: multipoleY.hh:21
Constant space element with a level dependent key.
Definition: element.hh:335
void shift(const concepts::Real3d &z, const concepts::Real src[], concepts::Real dst[]) const
Shifting the expansion.
Definition: multipoleDY.hh:92
Abstract class for the and the part of a kernel expansion.
Definition: expansion.hh:98
A vector of dimension dim and length 1.
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
void evaluate(const concepts::Element< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
Computation of the expansion coefficients.
uint gauss_
Number of quadrature points.
Definition: multipoleDY.hh:32
uint m_
Expansion order.
Definition: multipoleDY.hh:28
Used for the cluster classes for the boundary element method.
Definition: cebysev.hh:13
Constant triangular element with normed basis function.
Definition: element.hh:427
void evaluate(const bem::Linear3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
void evaluate(const concepts::Real3d &z, const concepts::Unit3d &h, concepts::Real Y[]) const
Evaluation of the expansion coefficients of one point.
Exception class to express a missing feature.
Definition: exceptions.hh:206
F * value() const
Definition: expansion.hh:37
void evaluate(const bem::Constant3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
Class to hold expansion coefficients of type F.
Definition: expansion.hh:60
void evaluate(const bem::Constant3d002< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
Abstract class for a pointer to the expansion coefficients.
Definition: expansion.hh:18
concepts::Real * foo_
Auxiliary vectors.
Definition: multipoleDY.hh:35
XYColReal * getCol(uint blksz, uint n) const
Allocates memory for the expansion coefficients and sets it to zero.
Definition: multipoleDY.hh:87
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
DMultipoleY(uint m, uint gauss)
Constructor.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich