multipoleDX.hh

Go to the documentation of this file.
1 
6 #ifndef multipoleDX_hh
7 #define multipoleDX_hh
8 
9 #include "basics/exceptions.hh"
10 #include "bem/element.hh"
11 #include "cluster/expansion.hh"
12 #include "cluster/multipoleX.hh"
13 
14 namespace 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 
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;
55  void evaluate(const concepts::Real3d& z, const concepts::Unit3d& h,
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 
71  void evaluate(const concepts::Element<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* 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>
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
An abstract class for an element of a space.
Definition: exceptions.hh:15
uint blksz() const
Definition: multipoleDX.hh:47
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
uint m_
Expansion order.
Definition: multipoleDX.hh:28
Normal derivative of the part of the Multipole kernel expansion.
Definition: multipoleDX.hh:22
void evaluate(const concepts::Element< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
Computation of the expansion coefficients.
void shift(const concepts::Real3d &z, const concepts::Real src[], concepts::Real dst[]) const
Shifting the expansion coefficients.
Definition: multipoleDX.hh:93
MultipoleX< F > X_
Expansion used for shift and apply.
Definition: multipoleDX.hh:25
concepts::Real * fee_
Definition: multipoleDX.hh:36
Constant space element with a level dependent key.
Definition: element.hh:335
void evaluate(const bem::Linear3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
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
uint blksz_
Memory used for expansion coefficients.
Definition: multipoleDX.hh:30
part of the Multipole kernel expansion
Definition: multipoleX.hh:21
DMultipoleX(uint m, uint gauss)
Constructor.
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::Constant3d001< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
uint gauss_
Number of quadrature points.
Definition: multipoleDX.hh:32
void evaluate(const concepts::Real3d &z, const concepts::Unit3d &h, concepts::Real X[]) const
Evaluation of the expansion coefficients of one point.
XYColReal * getCol(uint blksz, uint n) const
Allocates memory for the expansion coefficients and sets it to zero.
Definition: multipoleDX.hh:88
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
concepts::Real * foo_
Auxiliary vectors.
Definition: multipoleDX.hh:35
Abstract class for a pointer to the expansion coefficients.
Definition: expansion.hh:18
void evaluate(const bem::Constant3d002< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
void evaluate(const bem::Constant3d000< F > &elm, const concepts::Real3d &c, XYColExpPtr *X[]) const
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
void apply(const XYColExpPtr *X, const F src[], F dst[]) const
Definition: multipoleDX.hh:107
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich