lform.hh

Go to the documentation of this file.
1 
6 #ifndef bemLform_hh
7 #define bemLform_hh
8 
9 #include <memory>
10 #include "function/linearForm.hh"
11 #include "bemInt.hh"
12 #include "bem/element.hh"
13 
14 namespace concepts {
15 
16  // forward declaration
17  template <typename F>
18  class Formula;
19 }
20 
21 namespace bem {
22 
23  // ************************************************************ LaplaceSLP **
24 
28  template <class F = concepts::Real>
29  class LaplaceSLP : public concepts::LinearForm<F> {
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>
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>
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>
103 
107  uint gauss_;
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>
144  class LaplaceDLP : public concepts::LinearForm<F> {
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>
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>
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>
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>
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>
228 
232  uint gauss_;
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>
257  concepts::Real m;
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
Neumann(concepts::Formula< Real > const &fx, concepts::Formula< Real > const &fy, concepts::Formula< Real > const &fz, uint gauss=0)
Constructor.
An abstract class for an element of a space.
Definition: exceptions.hh:15
void operator()(const concepts::Element< concepts::Real > &elm, concepts::ElementMatrix< concepts::Real > &em)
Computes the element load vector.
void operator()(const concepts::Element< F > &elm, concepts::ElementMatrix< F > &em)
Application operator.
concepts::Real deltaG_
Definition: lform.hh:233
Linear triangular element.
Definition: element.hh:141
std::unique_ptr< const concepts::Formula< Real > > frm_
Formula.
Definition: lform.hh:300
uint gauss_
Number of integration points.
Definition: lform.hh:152
Constant triangular element.
Definition: element.hh:239
void operator()(const Constant3d000< concepts::Real > &elm, concepts::ElementMatrix< concepts::Real > &em)
Lpl001< F > qrB_
Definition: lform.hh:147
LaplaceDLP(const concepts::Real3d &x, uint gauss=0)
Constructor.
Definition: lform.hh:159
concepts::Real3d x_
Field point.
Definition: lform.hh:35
uint gauss_
Number of integration points.
Definition: lform.hh:232
Lpl001< F > qrA_
Class for the integration.
Definition: lform.hh:227
void operator()(const concepts::Element< concepts::Real > &elm, concepts::ElementMatrix< concepts::Real > &em)
Computes the element load vector.
void operator()(const concepts::Element< F > &elm, concepts::ElementMatrix< F > &em)
Application operator.
concepts::Real deltaG_
Definition: lform.hh:108
concepts::Real3d x_
Field point.
Definition: lform.hh:150
LaplaceSLP(const concepts::Real3d &x, uint gauss=0)
Constructor.
Definition: lform.hh:44
uint gauss() const
Definition: lform.hh:296
Interface for a formula.
Definition: lform.hh:18
uint dim_
Definition: lform.hh:339
Lpl004< F > qrA_
Class for the integration.
Definition: lform.hh:102
std::unique_ptr< const concepts::Formula< Real > > frmz_
Definition: lform.hh:342
Abstract class for a linear form.
Evaluation of the Laplace double layer potential with linear trial functions for use in the internal/...
Definition: lpl000.hh:23
Lpl004< F > qrB_
Definition: lform.hh:32
AdaptLaplaceDLP(const concepts::Real3d &x, uint gauss=0, concepts::Real deltaG=1.0)
Constructor.
Definition: lform.hh:240
void operator()(const Linear3d000< concepts::Real > &elm, concepts::ElementMatrix< concepts::Real > &em)
Constant space element with a level dependent key.
Definition: element.hh:335
void operator()(const Constant3d001< concepts::Real > &elm, concepts::ElementMatrix< concepts::Real > &em)
Evaluation of the Laplace double layer potential with constant trial functions for use in the interna...
Definition: lpl001.hh:26
void operator()(const Dirac3d000< concepts::Real > &elm, concepts::ElementMatrix< concepts::Real > &em)
Linear form for the Laplace Single Layer potential.
Definition: lform.hh:100
Linear form.
Definition: lform.hh:312
std::unique_ptr< const concepts::Formula< Real > > frmx_
Formula.
Definition: lform.hh:342
uint gauss_
Number of integration points.
Definition: lform.hh:107
Linear form for the Laplace Double Layer potential.
Definition: lform.hh:225
uint gauss_
Number of Gauss points for the quadrature.
Definition: lform.hh:345
void operator()(const Constant3d002< concepts::Real > &elm, concepts::ElementMatrix< concepts::Real > &em)
Used for the basic classes of the boundary element method.
Definition: bform.hh:13
concepts::Real3d x_
Field point.
Definition: lform.hh:230
Constant triangular element with normed basis function.
Definition: element.hh:427
Evaluation of the Laplace single layer potential with linear trial functions for use in the internal/...
Definition: lpl003.hh:23
std::unique_ptr< const concepts::Formula< Real > > frmy_
Definition: lform.hh:342
virtual void resize(uint m, uint n)
Sets a new size.
const uint gauss_
Number of Gauss points for the quadrature.
Definition: lform.hh:303
Element matrix.
Definition: linearForm.hh:18
void operator()(const concepts::Element< F > &elm, concepts::ElementMatrix< F > &em)
Application operator.
uint gauss_
Number of integration points.
Definition: lform.hh:37
Linear form to evaluate the Laplace single layer potential.
Definition: lform.hh:29
Lpl000< F > qrA_
Classes for the integration.
Definition: lform.hh:146
Dirac element on triangles (used for collocation method).
Definition: element.hh:29
uint gauss() const
Definition: lform.hh:335
void operator()(const Linear3d000< concepts::Real > &elm, concepts::ElementMatrix< concepts::Real > &em)
Linear form to evaluate the Laplace double layer potential.
Definition: lform.hh:144
void operator()(const concepts::Element< F > &elm, concepts::ElementMatrix< F > &em)
Application operator.
Lpl003< F > qrA_
Classes for the integration.
Definition: lform.hh:31
Evaluation of the Laplace single layer potential with constant trial functions for use in the interna...
Definition: lpl004.hh:26
Riesz(const concepts::Formula< Real > &formula, uint gauss=0)
Constructor.
concepts::Real3d x_
Field point.
Definition: lform.hh:105
const Key & key() const
Returns the key of the element.
Definition: element.hh:377
Linear form to evaluate .
Definition: lform.hh:268
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
AdaptLaplaceSLP(const concepts::Real3d &x, uint gauss=0, concepts::Real deltaG=1.0)
Constructor.
Definition: lform.hh:115
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich