bf_advection.hh

Go to the documentation of this file.
1 
6 #ifndef hp2dbf_advection_hh
7 #define hp2dbf_advection_hh
8 
9 #include <memory>
10 #include "operator/bilinearForm.hh"
11 #include "basics/typedefs.hh"
14 #include "arrayElementFormula.hh"
15 
16 
17 namespace concepts {
18  // forward declarations
19  template<class F>
20  class Array;
21 
22  template<class F, uint dim>
23  class Point;
24 
25  template<class F>
26  class Element;
27 
28  template<class F>
29  class ElementMatrix;
30 
31  template<typename F, typename G>
32  class ElementFormula;
33 }
34 
35 namespace vectorial {
36  // forward declarations
37  template<class F, class G>
38  class BilinearForm;
39 }
40 
41 namespace hp2D {
42  // forward declarations
43  template<class F>
44  class Quad;
45 
47 
48  using concepts::Real;
49 
50 
51  // ************************************************************* Advection **
52 
71  template<class F = Real>
72  class Advection : public concepts::BilinearForm<F,Real>,
73  public hp2D::LinearFormHelper_1<F>
74  {
75  public:
78  : hp2D::LinearFormHelper_1<F>(frm1, frm2)
79  {}
80 
83  : hp2D::LinearFormHelper_1<F>(frm)
84  {}
85 
86  virtual ~Advection() {}
87 
88  virtual Advection<F>* clone() const {
89  return new Advection<F>(this->frm_);
90  }
91 
92  virtual void operator()(const concepts::Element<Real>& elmX,
93  const concepts::Element<Real>& elmY,
94  concepts::ElementMatrix<F>& em) const;
95 
96  protected:
97  virtual std::ostream& info(std::ostream& os) const;
98  private:
100  bool operator()(const Quad<Real>* elmX,
101  const Quad<Real>* elmY,
102  concepts::ElementMatrix<F>& em) const;
105  const InfiniteLaguerreQuad* elmY,
106  concepts::ElementMatrix<F>& em) const;
107  };
108 
109  // ********************************************************* setupAdvection **
110 
134  template<class F>
138  bool transpose = true);
139 
140 
141 } // namespace hp2D
142 
143 #endif // hp2dbf_advection_hh
bool operator()(const Quad< Real > *elmX, const Quad< Real > *elmY, concepts::ElementMatrix< F > &em) const
Assembling for hp2D::Quad.
virtual ~Advection()
Definition: bf_advection.hh:86
A function class to calculate element matrices for the bilinear form.
Definition: bf_advection.hh:74
Vector valued problems.
Definition: spaceTraits.hh:24
virtual void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
A 2D FEM element: an infinite quad with basis based on Laguerre functions.
Definition: quad.hh:452
virtual Advection< F > * clone() const
Virtual constructor.
Definition: bf_advection.hh:88
Vector valued bilinear form.
Definition: bf_advection.hh:38
GenericElement< KarniadakisMixin< F > > Element
template aliases for backwards compatibility
Definition: element.hh:270
void setupAdvection(vectorial::BilinearForm< F, typename concepts::Realtype< F >::type > &bf, const concepts::ElementFormulaContainer< concepts::Point< F, 2 > > frm, bool transpose=true)
Function to setup a bilinear form related to the vector Advection, namely.
2D hp-FEM for H1-conforming elements.
concepts::ElementFormulaContainer< concepts::Point< F, 2 > > frm_
ElementFormula.
Abstract function class to evaluate a bilinear form.
Definition: bilinearForm.hh:33
Mapping< F, dim > & transpose(Mapping< F, dim > &m)
Definition: operations.hh:54
Advection(const concepts::ElementFormulaContainer< F > frm1, const concepts::ElementFormulaContainer< F > frm2)
Definition: bf_advection.hh:76
Element matrix.
Definition: linearForm.hh:18
Advection(const concepts::ElementFormulaContainer< concepts::Point< F, 2 > > frm)
Definition: bf_advection.hh:82
A 2D FEM element: a quad.
Definition: bf_advection.hh:44
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
bool operator()(const InfiniteLaguerreQuad *elmX, const InfiniteLaguerreQuad *elmY, concepts::ElementMatrix< F > &em) const
Assembling for hp2D::InfiniteLaguerreQuad.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Helper class for linearforms l(v), where v is a one form.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich