bilinearForm.hh

Go to the documentation of this file.
1 
8 #ifndef hp2dEdgeBilinearform_hh
9 #define hp2dEdgeBilinearform_hh
10 
11 #include <memory>
12 #include "operator/bilinearForm.hh"
13 #include "basics/typedefs.hh"
16 #include "formula/boundary.hh"
18 #include "hp2D/quad.hh"
19 #include "hp2D/formula.hh"
22 
23 #include "hp2Dedge/bf_identity.hh"
24 #include "hp2Dedge/bf_graduv.hh"
25 #include "hp2Dedge/bf_advection.hh"
26 
27 namespace concepts {
28  // forward declarations
29  template<class F>
30  class Element;
31 
32  template<class F>
33  class ElementMatrix;
34 
35  template<class F>
36  class Array;
37 
38  template<class F>
39  class RCP;
40 }
41 
42 namespace hp2Dedge {
43  // forward declarations
44  template<class F>
45  class Quad;
46 
47  template<class F>
48  class Edge;
49 
50  using concepts::Real;
51  using concepts::Cmplx;
52 
53  // ************************************************************** RotRot **
54 
61  template<typename F = Real>
62  class RotRot : public concepts::BilinearForm<F>,
64  public:
68  virtual ~RotRot() {}
69  virtual RotRot<F>* clone() const { return new RotRot<F>(this->frm_); }
71  const concepts::Element<Real>& elmY,
72  concepts::ElementMatrix<F>& em) const;
73  void operator()(const Quad<Real>& elmX, const Quad<Real>& elmY,
74  concepts::ElementMatrix<F>& em) const;
75  protected:
76  virtual std::ostream& info(std::ostream& os) const;
77  };
78 
79  // *************************************************************** Rotuv **
80 
88  class Rotuv : public concepts::BilinearForm<Real>,
89  public hp2D::BilinearFormHelper_2_2<Real> {
90  public:
93  virtual ~Rotuv() {}
95  const concepts::Element<Real>& elmY,
97  void operator()(const hp2D::Quad<Real>& elmX, const Quad<Real>& elmY,
99  void operator()(const hp2D::l2::Quad<Real>& elmX, const Quad<Real>& elmY,
101  virtual Rotuv* clone() const { return new Rotuv(); }
102  protected:
103  virtual std::ostream& info(std::ostream& os) const;
104  };
105 
106  // ********************************************************** EdgeIdentity **
107 
118  class EdgeIdentity : public concepts::BilinearForm<Real> {
119  public:
129  const concepts::Element<Real>& elmY,
131  void operator()(const Edge<Real>& elmX, const Edge<Real>& elmY,
133  virtual EdgeIdentity* clone() const { return new EdgeIdentity(); }
134  protected:
135  virtual std::ostream& info(std::ostream& os) const;
136  };
137 
138 } // namespace hp2Dedge
139 
140 #endif // hp2dEdgeBilinearform_hh
Rotuv(const concepts::ElementFormulaContainer< Real > frm=concepts::ElementFormulaContainer< Real >())
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< Real > &em) const
An edge of a 2D FEM edge element quad.
Definition: bf_graduv.hh:47
concepts::ElementFormulaContainer< Real > frm_
ElementFormula.
Helper class for bilinearforms a(u,v), where u and v are 2-forms.
void operator()(const Edge< Real > &elmX, const Edge< Real > &elmY, concepts::ElementMatrix< Real > &em) const
virtual EdgeIdentity * clone() const
Virtual constructor.
GenericElement< KarniadakisMixin< F > > Element
template aliases for backwards compatibility
Definition: element.hh:270
Bilinear form in 2D, integral over an edge.
A 2D FEM element: a quad.
Definition: quad.hh:595
void operator()(const Quad< Real > &elmX, const Quad< Real > &elmY, concepts::ElementMatrix< F > &em) const
Abstract function class to evaluate a bilinear form.
Definition: bilinearForm.hh:33
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Rotuv * clone() const
Virtual constructor.
void operator()(const hp2D::l2::Quad< Real > &elmX, const Quad< Real > &elmY, concepts::ElementMatrix< Real > &em) const
void operator()(const hp2D::Quad< Real > &elmX, const Quad< Real > &elmY, concepts::ElementMatrix< Real > &em) const
virtual ~Rotuv()
Definition: bilinearForm.hh:93
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
virtual ~RotRot()
Definition: bilinearForm.hh:68
virtual RotRot< F > * clone() const
Virtual constructor.
Definition: bilinearForm.hh:69
RotRot(const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Constructor.
Element matrix.
Definition: linearForm.hh:18
A function class to calculate element matrices for the Rot u Rot v-bilinearform (Maxwell equations).
Definition: bilinearForm.hh:63
void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< Real > &em) const
Computes the element mass matrix.
A function class to calculate element matrices for the bilinear form.
Definition: bilinearForm.hh:89
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
hp 2D edge elements for electromagnetics.
Definition: bf_advection.hh:37
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich