Class documentation of Concepts

Loading...
Searching...
No Matches
bilinearForm.hh
Go to the documentation of this file.
1
6#ifndef hp3dbilinearform_hh
7#define hp3dbilinearform_hh
8
9#include <memory>
10#include "basics/typedefs.hh"
12#include "formula/formula.hh"
15#include "linearFormHelper.hh"
16
17
18namespace concepts {
19 // forward declarations
20 template<class F>
21 class Element;
22
23 template<class F>
24 class ElementMatrix;
25
26 template<class F>
27 class Array;
28
29 class InOutParameters;
30}
31
32namespace vectorial {
33 //forward declaration
34 template<class F, class G>
35 class BilinearForm;
36}
37
38namespace hp3D {
39 // forward declarations
40 class Hexahedron;
41
42 using concepts::Real;
43
44 // *************************************************************** Laplace **
45
50 template <class F = Real>
51 class Laplace : public concepts::BilinearForm<F> {
52 public:
55 virtual ~Laplace();
56
57 virtual void operator()(const concepts::Element<Real>& elmX,
58 const concepts::Element<Real>& elmY,
60 void operator()(const Hexahedron& elmX, const Hexahedron& elmY,
62 virtual Laplace<F>* clone() const { return new Laplace(); }
63 protected:
64 virtual std::ostream& info(std::ostream& os) const;
65 private:
67 mutable concepts::Array<F> jacobian_;
68 mutable concepts::Array<concepts::MapReal3d> jacobianInv_;
69
70 mutable const Hexahedron* oldElm_;
71 };
72
73 // ************************************************************** Identity **
74
83 template <class F = Real>
84 class Identity : public concepts::BilinearForm<F> {
85 public:
89 virtual ~Identity();
90
91 virtual void operator()(const concepts::Element<Real>& elmX,
92 const concepts::Element<Real>& elmY,
94 void operator()(const Hexahedron& elmX, const Hexahedron& elmY,
96
127 static bool timings();
129 virtual Identity* clone() const { return new Identity(frm_); }
130 protected:
131 virtual std::ostream& info(std::ostream& os) const;
132 private:
134 mutable concepts::Array<F> jacobian_;
135
136 mutable const Hexahedron* oldElm_;
137
140
142 static concepts::InOutParameters* timings_;
144 static uint timeCntr_;
145 };
146
147 // *********************************************************** setupIdentity **
148
153 template<class F>
156
163 template<class F>
167 bool transposed = false);
168
169 // ************************************************************* Advection **
170
185 template<class F = Real>
186 class Advection : public concepts::BilinearForm<F,Real>,
187 public hp3D::LinearFormHelper_1<F>
188 {
189 public:
193 bool all = false)
194 : hp3D::LinearFormHelper_1<F>(frm1, frm2, frm3), all_(all)
195 {}
196
199 bool all = false)
200 : hp3D::LinearFormHelper_1<F>(frm), all_(all)
201 {}
202
203 virtual ~Advection() {}
204
205 virtual Advection<F>* clone() const {
206 return new Advection<F>(this->frm_, all_);
207 }
208
209 virtual void operator()(const concepts::Element<Real>& elmX,
210 const concepts::Element<Real>& elmY,
212
213 protected:
214 virtual std::ostream& info(std::ostream& os) const;
215 private:
216 bool all_;
217
219 bool operator()(const Hexahedron* elmX,
220 const Hexahedron* elmY,
222 };
223
224 // ********************************************************** setupAdvection **
225
246 template<class F>
250
251} // namespace hp3D
252
253#endif // hp3dbilinearform_hh
virtual Advection< F > * clone() const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
static bool timings()
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Identity * clone() const
static void setTimings(concepts::InOutParameters *timings)
Identity(const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Constructor.
virtual Laplace< F > * clone() const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Laplace()
Constructor.
concepts::ElementFormulaContainer< concepts::Point< F, 3 > > frm_
ElementFormula.
double Real
Definition typedefs.hh:39
GenericElement< KarniadakisMixin< F > > Element
template aliases for backwards compatibility
Definition element.hh:267
Definition meshDX.hh:23
void setupAdvection(vectorial::BilinearForm< F, typename concepts::Realtype< F >::type > &bf, const concepts::ElementFormulaContainer< concepts::Point< F, 3 > > frm)
void setupIdentity(vectorial::BilinearForm< F, typename concepts::Realtype< F >::type > &bf)