bilinearForm.hh

Go to the documentation of this file.
1 
6 #ifndef linDG2DbilinearForm_hh
7 #define linDG2DbilinearForm_hh
8 
9 #include "basics/typedefs.hh"
10 #include "operator/bilinearForm.hh"
12 
13 using concepts::Real;
14 
15 namespace linDG2D {
16 
17  // ************************************************************ IdentityBf **
18 
23  class IdentityBf : public concepts::BilinearForm<Real> {
24  public:
28  virtual void operator()(const concepts::Element<Real>& elmV,
29  const concepts::Element<Real>& elmU,
31  virtual IdentityBf* clone() const { return new IdentityBf(); }
32  };
33 
34  // ********************************************************** LaplaceVolBf **
35 
41  class LaplaceVolBf : public concepts::BilinearForm<Real> {
42  public:
46  virtual void operator()(const concepts::Element<Real>& elmV,
47  const concepts::Element<Real>& elmU,
49  virtual LaplaceVolBf* clone() const { return new LaplaceVolBf(); }
50  };
51 
52  // ********************************************************* LaplaceFluxBf **
53 
59  class LaplaceFluxBf : public concepts::BilinearForm<Real> {
60  public:
65  : bc_(bc) {}
67  virtual void operator()(const concepts::Element<Real>& elmV,
68  const concepts::Element<Real>& elmU,
71  }
73  virtual void operator()(const concepts::Element<Real>& elmV,
74  const concepts::Element<Real>& elmU,
76  const concepts::ElementPair<Real>& ep) const;
77  virtual LaplaceFluxBf* clone() const { return new LaplaceFluxBf(bc_); }
78  private:
81  };
82 
83  // ********************************************************* LaplaceStabBf **
84 
90  class LaplaceStabBf : public concepts::BilinearForm<Real> {
91  public:
97  : omega_(omega), bc_(bc) {}
99  virtual void operator()(const concepts::Element<Real>& elmV,
100  const concepts::Element<Real>& elmU,
101  concepts::ElementMatrix<Real>& em) const {
103  }
105  virtual void operator()(const concepts::Element<Real>& elmV,
106  const concepts::Element<Real>& elmU,
108  const concepts::ElementPair<Real>& ep) const;
109  virtual LaplaceStabBf* clone() const {
110  return new LaplaceStabBf(omega_, bc_); }
111  private:
113  const Real omega_;
116  };
117 
118 } // namespace linDG2D
119 
120 #endif // linDG2DbilinearForm_hh
const Real omega_
Stabilization parameter.
Stabilizing edge integral for the Laplacian in DG FEM in 2D.
Definition: bilinearForm.hh:90
Edge fluxes for the Laplacian in DG FEM in 2D.
Definition: bilinearForm.hh:59
virtual LaplaceVolBf * clone() const
Virtual constructor.
Definition: bilinearForm.hh:49
#define conceptsAssert(cond, exc)
Assert that a certain condition is fulfilled.
Definition: exceptions.hh:394
virtual LaplaceFluxBf * clone() const
Virtual constructor.
Definition: bilinearForm.hh:77
DG FEM for 2D problems using piecewise linear shape functions.
Definition: bilinearForm.hh:15
Abstract function class to evaluate a bilinear form.
Definition: bilinearForm.hh:33
const concepts::BoundaryConditions * bc_
Boundary conditions, only the boundary type is relevant.
virtual void operator()(const concepts::Element< Real > &elmV, const concepts::Element< Real > &elmU, concepts::ElementMatrix< Real > &em) const
Application operator for volume terms, does nothing.
Definition: bilinearForm.hh:99
Exception class for assertions.
Definition: exceptions.hh:258
virtual LaplaceStabBf * clone() const
Virtual constructor.
Volume integral for the identity in DG FEM in 2D.
Definition: bilinearForm.hh:23
const concepts::BoundaryConditions * bc_
Boundary conditions, only the boundary type is relevant.
Definition: bilinearForm.hh:80
virtual void operator()(const concepts::Element< Real > &elmV, const concepts::Element< Real > &elmU, concepts::ElementMatrix< Real > &em) const
Application operator.
LaplaceFluxBf(const concepts::BoundaryConditions *bc)
Constructor.
Definition: bilinearForm.hh:64
LaplaceVolBf()
Constructor.
Definition: bilinearForm.hh:44
virtual void operator()(const concepts::Element< Real > &elmV, const concepts::Element< Real > &elmU, concepts::ElementMatrix< Real > &em, const concepts::ElementPair< Real > &ep) const
Application operator for DG term.
LaplaceStabBf(Real omega, const concepts::BoundaryConditions *bc)
Constructor.
Definition: bilinearForm.hh:96
Volume integral for the Laplacian in DG FEM in 2D.
Definition: bilinearForm.hh:41
IdentityBf()
Constructor.
Definition: bilinearForm.hh:26
virtual IdentityBf * clone() const
Virtual constructor.
Definition: bilinearForm.hh:31
virtual void operator()(const concepts::Element< Real > &elmV, const concepts::Element< Real > &elmU, concepts::ElementMatrix< Real > &em) const
Application operator.
virtual void operator()(const concepts::Element< Real > &elmV, const concepts::Element< Real > &elmU, concepts::ElementMatrix< Real > &em, const concepts::ElementPair< Real > &ep) const
Application operator for DG term.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
virtual void operator()(const concepts::Element< Real > &elmV, const concepts::Element< Real > &elmU, concepts::ElementMatrix< Real > &em) const
Application operator for volume terms, does nothing.
Definition: bilinearForm.hh:67
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich