Class documentation of Concepts

Loading...
Searching...
No Matches
lform.hh
Go to the documentation of this file.
1
6#ifndef bemLform_hh
7#define bemLform_hh
8
9#include <memory>
11#include "bemInt.hh"
12#include "bem/element.hh"
13
14namespace concepts {
15
16 // forward declaration
17 template <typename F>
18 class Formula;
19}
20
21namespace bem {
22
23 // ************************************************************ LaplaceSLP **
24
28 template <class F = concepts::Real>
29 class LaplaceSLP : public concepts::LinearForm<F> {
31 Lpl003<F> qrA_;
32 Lpl004<F> qrB_;
33
37 uint gauss_;
38
39 public:
44 inline LaplaceSLP(const concepts::Real3d& x, uint gauss = 0)
45 : x_(x), gauss_(gauss) {}
46
54 inline void operator()(const Linear3d000<F>& elm,
56 inline void operator()(const Constant3d000<F>& elm,
58 inline void operator()(const Constant3d002<F>& elm,
60 };
61
62 template <class F>
63 inline void LaplaceSLP<F>::operator()(const Linear3d000<F>& elm,
65 F m[3];
66 qrA_(x_, elm, gauss_, m);
67
68 em.resize(3, 1); em(0, 0) = m[0]; em(1, 0) = m[1]; em(2, 0) = m[2];
69 }
70
71 template <class F>
72 inline void LaplaceSLP<F>::operator()(const Constant3d000<F>& elm,
74 F m;
75 qrB_(x_, elm, gauss_, &m);
76
77 em.resize(1, 1); em(0, 0) = m;
78 }
79
80 template <class F>
81 inline void LaplaceSLP<F>::operator()(const Constant3d002<F>& elm,
83 F m;
84 qrB_(x_, elm, gauss_, &m);
85
86 em.resize(1, 1); em(0, 0) = m;
87 }
88
89 // ******************************************************* AdaptLaplaceSLP **
90
99 template <class F = concepts::Real>
102 Lpl004<F> qrA_;
103
107 uint gauss_;
108 concepts::Real deltaG_;
109
110 public:
115 inline AdaptLaplaceSLP(const concepts::Real3d& x, uint gauss = 0,
116 concepts::Real deltaG = 1.0) :
117 x_(x), gauss_(gauss), deltaG_(deltaG) {}
118
124 inline void operator()(const Constant3d001<F>& elm,
126 };
127
128 template <class F>
131 F m;
132 uint dG = (uint)((Constant3d001<F>::maxlevel() - elm.key().l()) * deltaG_);
133 qrA_(x_, elm, gauss_+dG, &m);
134
135 em.resize(1, 1); em(0, 0) = m;
136 }
137
138 // ************************************************************ LaplaceDLP **
139
143 template <class F = concepts::Real>
146 Lpl000<F> qrA_;
147 Lpl001<F> qrB_;
148
152 uint gauss_;
153
154 public:
159 inline LaplaceDLP(const concepts::Real3d& x, uint gauss = 0)
160 : x_(x), gauss_(gauss) {}
161
169 inline void operator()(const Linear3d000<F>& elm,
171 inline void operator()(const Constant3d000<F>& elm,
173 inline void operator()(const Constant3d001<F>& elm,
175 inline void operator()(const Constant3d002<F>& elm,
177 };
178
179 template <class F>
180 inline void LaplaceDLP<F>::operator()(const Linear3d000<F>& elm,
182 F m[3];
183 qrA_(x_, elm, gauss_, m);
184
185 em.resize(3, 1); em(0, 0) = m[0]; em(1, 0) = m[1]; em(2, 0) = m[2];
186 }
187
188 template <class F>
189 inline void LaplaceDLP<F>::operator()(const Constant3d000<F>& elm,
191 F m;
192 qrB_(x_, elm, gauss_, &m);
193
194 em.resize(1, 1); em(0, 0) = m;
195 }
196
197 template <class F>
198 inline void LaplaceDLP<F>::operator()(const Constant3d001<F>& elm,
200 F m;
201 qrB_(x_, elm, gauss_, &m);
202
203 em.resize(1, 1); em(0, 0) = m;
204 }
205
206 template <class F>
207 inline void LaplaceDLP<F>::operator()(const Constant3d002<F>& elm,
209 F m;
210 qrB_(x_, elm, gauss_, &m);
211
212 em.resize(1, 1); em(0, 0) = m;
213 }
214
215 // *********************************************** agloAdaptLaplaceDLP **
216
224 template <class F = concepts::Real>
227 Lpl001<F> qrA_;
228
232 uint gauss_;
233 concepts::Real deltaG_;
234
235 public:
240 inline AdaptLaplaceDLP(const concepts::Real3d& x, uint gauss = 0,
241 concepts::Real deltaG = 1.0) :
242 x_(x), gauss_(gauss), deltaG_(deltaG) {}
243
244
250 inline void operator()(const Constant3d001<F>& elm,
252 };
253
254 template <class F>
258 uint dG = (uint)((Constant3d001<F>::maxlevel() - elm.key().l()) * deltaG_);
259 qrA_(x_, elm, gauss_+dG, &m);
260
261 em.resize(1, 1); em(0, 0) = m;
262 }
263
264 // ***************************************************************** Riesz **
265
268 class Riesz : public concepts::LinearForm<concepts::Real> {
269 public:
274 Riesz(const concepts::Formula<Real>& formula, uint gauss = 0);
275
295
296 inline uint gauss() const {return gauss_;}
297
298 private:
300 std::unique_ptr<const concepts::Formula<Real> > frm_;
301
303 const uint gauss_;
304 };
305
306 // *************************************************************** Neumann **
307
312 class Neumann : public concepts::LinearForm<concepts::Real> {
313 public:
321 concepts::Formula<Real> const& fz, uint gauss = 0);
322
335 inline uint gauss() const {return gauss_;}
336
337 private:
338 // spatial dimension
339 uint dim_;
340
342 std::unique_ptr<const concepts::Formula<Real> > frmx_, frmy_, frmz_;
343
345 uint gauss_;
346 };
347
348} // namespace bem
349
350#endif // bemLform_hh
AdaptLaplaceDLP(const concepts::Real3d &x, uint gauss=0, concepts::Real deltaG=1.0)
Definition lform.hh:240
void operator()(const concepts::Element< F > &elm, concepts::ElementMatrix< F > &em)
AdaptLaplaceSLP(const concepts::Real3d &x, uint gauss=0, concepts::Real deltaG=1.0)
Definition lform.hh:115
void operator()(const concepts::Element< F > &elm, concepts::ElementMatrix< F > &em)
const Key & key() const
Returns the key of the element.
Definition element.hh:377
void operator()(const concepts::Element< F > &elm, concepts::ElementMatrix< F > &em)
LaplaceDLP(const concepts::Real3d &x, uint gauss=0)
Definition lform.hh:159
LaplaceSLP(const concepts::Real3d &x, uint gauss=0)
Definition lform.hh:44
void operator()(const concepts::Element< F > &elm, concepts::ElementMatrix< F > &em)
Neumann(concepts::Formula< Real > const &fx, concepts::Formula< Real > const &fy, concepts::Formula< Real > const &fz, uint gauss=0)
void operator()(const concepts::Element< concepts::Real > &elm, concepts::ElementMatrix< concepts::Real > &em)
void operator()(const concepts::Element< concepts::Real > &elm, concepts::ElementMatrix< concepts::Real > &em)
Riesz(const concepts::Formula< Real > &formula, uint gauss=0)
virtual void resize(uint m, uint n)
Definition bem.hh:18
double Real
Definition typedefs.hh:39