multipoleX.hh

Go to the documentation of this file.
1 
6 #ifndef multipoleX_hh
7 #define multipoleX_hh
8 
9 #include "basics/exceptions.hh"
10 #include "bem/element.hh"
11 #include "cluster/expansion.hh"
12 
13 namespace cluster {
14 
15  // ************************************************************ MultipoleX **
16 
20  template <class F = concepts::Real>
21  class MultipoleX : public ExpansionXY<F> {
22 
24  uint m_;
26  uint blksz_;
28  uint gauss_;
29 
32 
33  public:
38  MultipoleX(uint m, uint gauss);
39 
40  ~MultipoleX() {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 X[]) const;
51  inline void shift(const concepts::Real3d& z, const concepts::Real src[],
52  concepts::Real dst[]) const;
53  void shift(const concepts::Real3d& z, const concepts::Cmplx src[],
54  concepts::Cmplx dst[]) const;
55  template<class FF>
56  void shift(const concepts::Real3d& z, const FF src[], FF dst[],
57  uint foo) const;
59  void apply(const concepts::Real X[], const F src[], F dst[]) const;
60  inline void apply(const XYColExpPtr* Xexp, const F src[], F dst[]) const;
61 
68  void evaluate(const concepts::Element<F>& elm,
69  const concepts::Real3d& c, XYColExpPtr* X[]) const;
71  void evaluate(const bem::Dirac3d000<F>& elm,
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;
83  void evaluate(const bem::Linear3d000<F>& elm,
84  const concepts::Real3d& c, XYColExpPtr* X[]) const;
85  };
86 
87  template <class F>
88  inline XYColReal* MultipoleX<F>::getCol(uint blksz, uint n) const {
89  return new XYColReal(blksz, n);
90  }
91 
92  template <class F>
93  inline void MultipoleX<F>::shift(const concepts::Real3d& z,
94  const concepts::Real src[],
95  concepts::Real dst[]) const {
96  shift<concepts::Real>(z, src, dst, 0);
97  }
98 
99  template <class F>
100  inline void MultipoleX<F>::apply(const XYColExpPtr* Xexp, const F src[],
101  F dst[]) const {
102  const XYColRealPtr* X = dynamic_cast<const XYColRealPtr*>(Xexp);
103  if (X) {apply(X->value(), src, dst); return;}
104 
105  throw
106  conceptsException(concepts::MissingFeature("XYColExp not supported"));
107  }
108 
109 } // namespace cluster
110 
111 #endif // multipoleX_hh
An abstract class for an element of a space.
Definition: exceptions.hh:15
void evaluate(const bem::Constant3d001< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
XYColReal * getCol(uint blksz, uint n) const
Allocates memory for the expansion coefficients and sets it to zero.
Definition: multipoleX.hh:88
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 evaluate(const bem::Dirac3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
uint m() const
Definition: multipoleX.hh:43
concepts::Real * foo_
Auxiliary vector.
Definition: multipoleX.hh:31
uint blksz_
Memory used for expansion coefficients.
Definition: multipoleX.hh:26
void shift(const concepts::Real3d &z, const FF src[], FF dst[], uint foo) const
uint blksz() const
Definition: multipoleX.hh:42
void evaluate(const concepts::Real3d &z, concepts::Real X[]) const
Evaluation of the expansion coefficients of one point.
Constant space element with a level dependent key.
Definition: element.hh:335
uint m_
Expansion order.
Definition: multipoleX.hh:24
void evaluate(const bem::Constant3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
uint gauss_
Number of quadrature points.
Definition: multipoleX.hh:28
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::Linear3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
part of the Multipole kernel expansion
Definition: multipoleX.hh:21
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 shift(const concepts::Real3d &z, const concepts::Real src[], concepts::Real dst[]) const
Shifting the expansion coefficients.
Definition: multipoleX.hh:93
void apply(const concepts::Real X[], const F src[], F dst[]) const
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
Abstract class for a pointer to the expansion coefficients.
Definition: expansion.hh:18
MultipoleX(uint m, uint gauss)
Constructor.
void shift(const concepts::Real3d &z, const concepts::Cmplx src[], concepts::Cmplx dst[]) const
void evaluate(const concepts::Element< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
Computation of the expansion coefficients.
void evaluate(const bem::Constant3d002< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
void apply(const XYColExpPtr *Xexp, const F src[], F dst[]) const
Definition: multipoleX.hh:100
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