Class documentation of Concepts

Loading...
Searching...
No Matches
bilinearForm.hh
Go to the documentation of this file.
1
6#ifndef dgBilinearForms_hh
7#define dgBilinearForms_hh
8
9#include "basics/typedefs.hh"
10#include "elementPair.hh"
12#include "operator/matrix.hh"
13
14#define DEBUG_ASSEMBLY 0
15#define DEBUG_IDENTITY 0
16#define DEBUG_LAPLACE 0
17
18namespace linDG3D {
19
20 using concepts::Real;
21 // ***************************************************** FvdgBilinearForm **
22
27 public:
37 virtual void operator()(const FvdgElement& elmX, const FvdgElement& elmY,
39 const FvdgElementPair& ep) const = 0;
40 };
41
42
43 // ************************************************************** Assembly **
44
49 {
50 public:
59 static void inner(concepts::Matrix<Real>& dest,
62 bool transpose = false);
74 bool transpose = false);
75 private:
77 Assembly() {};
78 };
79
80 // ************************************************************** Identity **
86 class Identity : public concepts::BilinearForm<Real> {
87 public:
88 Identity() {}
90 virtual void operator()(const concepts::Element<Real>& elmX,
91 const concepts::Element<Real>& elmY,
94 void operator()(const FvdgP0TetElem& eX,
95 const FvdgP0TetElem& eY,
98 void operator()(const FvdgP1TetElem& eX,
99 const FvdgP1TetElem& eY,
101 virtual Identity* clone() const { return new Identity(); }
102 };
103
104 //*********************************************************** LaplaceVolBF **
111 public:
112 LaplaceVolBF() {}
114 virtual void operator()(const concepts::Element<Real>& elmX,
115 const concepts::Element<Real>& elmY,
118 void operator()(const FvdgP1TetElem& eX,
119 const FvdgP1TetElem& eY,
121 virtual LaplaceVolBF* clone() const { return new LaplaceVolBF(); }
122 };
123
124 //********************************************************* LaplaceInnerBF **
131 public:
136 LaplaceInnerBF(bool symm = false) { symm_ = symm ? -1 : 1; }
138 virtual void operator()(const FvdgElement& elmX, const FvdgElement& elmY,
140 const FvdgElementPair& ep) const;
141 virtual LaplaceInnerBF* clone() const { return new LaplaceInnerBF(symm_); }
142 private:
144 int symm_;
145 };
146
147 //****************************************************** LaplaceBoundaryBF **
154 public:
159 LaplaceBoundaryBF(bool symm = false) {
160 symm_ = symm ? -1 : 1;
161 }
163 virtual void operator()(const FvdgElement& elmX, const FvdgElement& elmY,
165 const FvdgElementPair& ep) const;
166 virtual LaplaceBoundaryBF* clone() const {
167 return new LaplaceBoundaryBF(symm_); }
168 private:
170 int symm_;
171 };
172
173 //************************************************************** PenaltyBF **
180 public:
184 virtual void operator()(const FvdgElement& elmX, const FvdgElement& elmY,
186 const FvdgElementPair& ep) const;
187 virtual PenaltyBF* clone() const { return new PenaltyBF(); }
188 };
189
190} // namespace linDG3D
191
192#endif // dgBilinearForms_hh
static void boundary(concepts::Matrix< Real > &dest, FvdgBilinearForm &bf, const concepts::ElementPairList< Real > &pairs, bool transpose=false)
static void inner(concepts::Matrix< Real > &dest, FvdgBilinearForm &bf, const concepts::ElementPairList< Real > &pairs, bool transpose=false)
virtual void operator()(const FvdgElement &elmX, const FvdgElement &elmY, concepts::ElementMatrix< Real > &em, const FvdgElementPair &ep) const =0
void operator()(const FvdgP0TetElem &eX, const FvdgP0TetElem &eY, concepts::ElementMatrix< Real > &em) const
Application operator for P0 elements.
virtual void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< Real > &em) const
General application operator.
virtual Identity * clone() const
void operator()(const FvdgP1TetElem &eX, const FvdgP1TetElem &eY, concepts::ElementMatrix< Real > &em) const
Application operator for P1 elements.
LaplaceBoundaryBF(bool symm=false)
virtual void operator()(const FvdgElement &elmX, const FvdgElement &elmY, concepts::ElementMatrix< Real > &em, const FvdgElementPair &ep) const
Application operator.
virtual void operator()(const FvdgElement &elmX, const FvdgElement &elmY, concepts::ElementMatrix< Real > &em, const FvdgElementPair &ep) const
Application operator.
LaplaceInnerBF(bool symm=false)
void operator()(const FvdgP1TetElem &eX, const FvdgP1TetElem &eY, concepts::ElementMatrix< Real > &em) const
Application operator for P1 elements.
virtual void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< Real > &em) const
General application operator.
virtual LaplaceVolBF * clone() const
virtual void operator()(const FvdgElement &elmX, const FvdgElement &elmY, concepts::ElementMatrix< Real > &em, const FvdgElementPair &ep) const
Application operator.
PenaltyBF()
Constructor.
double Real
Definition typedefs.hh:39