multipoleY.hh

Go to the documentation of this file.
1 
6 #ifndef multipoleY_hh
7 #define multipoleY_hh
8 
9 #include "basics/exceptions.hh"
10 #include "bem/element.hh"
11 #include "cluster/expansion.hh"
12 
13 namespace cluster {
14 
15  // ************************************************************ MultipoleY **
16 
20  template <class F = concepts::Real>
21  class MultipoleY : public ExpansionXY<F> {
22 
24  uint m_;
26  uint blksz_;
28  uint gauss_;
29 
32 
33  public:
38  MultipoleY(uint m, uint gauss);
39 
40  ~MultipoleY() {delete[] foo_;}
41 
42  uint blksz() const {return blksz_;}
43  uint m() const {return m_;}
44  inline XYColReal* getCol(uint blksz, uint n) const;
49  void evaluate(const concepts::Real3d& z, concepts::Real Y[]) const;
50  inline void shift(const concepts::Real3d& z, const concepts::Real src[],
51  concepts::Real dst[]) const;
52  void shift(const concepts::Real3d& z, const concepts::Cmplx src[],
53  concepts::Cmplx dst[]) const;
54  template<class FF>
55  void shift(const concepts::Real3d& z, const FF src[], FF dst[],
56  uint foo) const;
57  void apply(const concepts::Real Y[], const F src[], F dst[]) const;
58  inline void apply(const XYColExpPtr* Y, const F src[], F dst[]) const;
59 
66  void evaluate(const concepts::Element<F>& elm,
67  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
69  void evaluate(const bem::Dirac3d000<F>& elm,
70  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
73  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
76  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
79  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
81  void evaluate(const bem::Linear3d000<F>& elm,
82  const concepts::Real3d& c, XYColExpPtr* Y[]) const;
83  };
84 
85  template <class F>
86  inline XYColReal* MultipoleY<F>::getCol(uint blksz, uint n) const {
87  return new XYColReal(blksz, n);
88  }
89 
90  template <class F>
91  inline void MultipoleY<F>::shift(const concepts::Real3d& z,
92  const concepts::Real src[],
93  concepts::Real dst[]) const {
94  shift<concepts::Real>(z, src, dst, 0);
95  }
96 
97  template <class F>
98  inline void MultipoleY<F>::apply(const XYColExpPtr* Y, const F src[],
99  F dst[]) const {
100  const XYColRealPtr* YMPE = dynamic_cast<const XYColRealPtr*>(Y);
101  if (Y) {apply(YMPE->value(), src, dst); return;}
102 
103  throw
104  conceptsException(concepts::MissingFeature("XYColExp not supported"));
105  }
106 
107 } // namespace cluster
108 
109 #endif // multipoleY_hh
void apply(const concepts::Real Y[], const F src[], F dst[]) const
void evaluate(const bem::Constant3d002< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
An abstract class for an element of a space.
Definition: exceptions.hh:15
uint blksz_
Memory used for expansion coefficients.
Definition: multipoleY.hh:26
uint blksz() const
Definition: multipoleY.hh:42
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
void apply(const XYColExpPtr *Y, const F src[], F dst[]) const
Definition: multipoleY.hh:98
void evaluate(const concepts::Element< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
Computation of the expansion coefficients.
MultipoleY(uint m, uint gauss)
Constructor.
uint m_
Expansion order.
Definition: multipoleY.hh:24
void evaluate(const bem::Constant3d001< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
void shift(const concepts::Real3d &z, const FF src[], FF dst[], uint foo) const
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: multipoleY.hh:91
void evaluate(const bem::Linear3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
Abstract class for the and the part of a kernel expansion.
Definition: expansion.hh:98
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
void evaluate(const bem::Constant3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
Used for the cluster classes for the boundary element method.
Definition: cebysev.hh:13
void shift(const concepts::Real3d &z, const concepts::Cmplx src[], concepts::Cmplx dst[]) const
Constant triangular element with normed basis function.
Definition: element.hh:427
concepts::Real * foo_
Auxiliary vector.
Definition: multipoleY.hh:31
Exception class to express a missing feature.
Definition: exceptions.hh:206
F * value() const
Definition: expansion.hh:37
Class to hold expansion coefficients of type F.
Definition: expansion.hh:60
Dirac element on triangles (used for collocation method).
Definition: element.hh:29
void apply(Operator< F > &op, const Matrix< H > &mX, Matrix< I > &mY)
Multiplication with a matrix.
Definition: matrix.hh:256
uint gauss_
Number of quadrature points.
Definition: multipoleY.hh:28
Abstract class for a pointer to the expansion coefficients.
Definition: expansion.hh:18
XYColReal * getCol(uint blksz, uint n) const
Allocates memory for the expansion coefficients and sets it to zero.
Definition: multipoleY.hh:86
void evaluate(const concepts::Real3d &z, concepts::Real Y[]) const
Evaluation of the expansion coefficients of one point.
void evaluate(const bem::Dirac3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *Y[]) const
uint m() const
Definition: multipoleY.hh:43
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich