linearForm.hh

Go to the documentation of this file.
1 
6 #ifndef hp2dlinearform_hh
7 #define hp2dlinearform_hh
8 
9 #include <memory>
10 #include "basics/typedefs.hh"
11 #include "function/linearForm.hh"
12 #include "linearFormHelper.hh"
13 #include "arrayElementFormula.hh"
14 
15 namespace concepts {
16  // forward declarations
17  template<class F>
18  class Formula;
19 
20  template<class F, uint dim>
21  class Point;
22 
23  class BoundaryConditions;
24 
25  template<class F>
26  class Element;
27 
28  template<class F>
29  class ElementMatrix;
30 
31  template<class F>
32  class Array;
33 }
34 
35 namespace vectorial {
36 
37  template<class F, class G>
38  class LinearForm;
39 }
40 
41 namespace hp2D {
42  // forward declarations
43  template<class F>
44  class Quad;
45 
46  using concepts::Real;
47 
48 
49  // ***************************************************************** Riesz **
50 
59  template<class F = Real>
60  class Riesz : public concepts::LinearForm<F>,
61  public LinearFormHelper_0<F>,
63  public:
71  bool ignoreMissingElem = false);
72 
80  Riesz(const std::string& str,
82  bool ignoreMissingElem = false);
83 
84  virtual ~Riesz();
85 
94  concepts::ElementMatrix<F>& em) const;
95 
96  protected:
97  virtual std::ostream& info(std::ostream& os) const;
98  private:
101 
102  void operator()(const Quad<Real>& elm, concepts::ElementMatrix<F>& em) const;
103 
108  };
109 
110  // ************************************************************ setupRiesz **
111 
118  template<class F>
122 
123 
124  // ******************************************************** GradLinearForm **
125 
135  template<class F = concepts::Real>
137  public LinearFormHelper_1<F>,
139  public:
146  bool ignoreMissingElem = false);
154  bool ignoreMissingElem = false);
155 
162  virtual void operator()(const concepts::Element<Real>& elm,
163  concepts::ElementMatrix<F>& em) const;
164 
165 
166  protected:
167  virtual std::ostream& info(std::ostream& os) const;
168  private:
169  virtual void operator()(const Quad<Real>& elm,
170  concepts::ElementMatrix<F>& em) const;
171 
173  };
174 
175  // *************************************************** setupGradLinearForm **
176 
184  template<class F>
189 
190  // ****************************************************** PlCurlLinearForm **
191 
201  template<class F>
202  class PlCurlLinearForm : public GradLinearForm<F> {
203  public:
217  protected:
218  virtual std::ostream& info(std::ostream& os) const;
219  };
220 
221  namespace l2 {
222 
223  // *************************************************************** Riesz **
224 
234  template<class F = Real>
235  class Riesz : public concepts::LinearForm<F>,
236  public LinearFormHelper_2<F> {
237  public:
243  bool ignoreMissingElem = false);
244  virtual ~Riesz();
245 
254  concepts::ElementMatrix<F>& em) const;
255 
256  protected:
257  virtual std::ostream& info(std::ostream& os) const;
258  private:
259  void operator()(const Quad<Real>& elm, concepts::ElementMatrix<F>& em) const;
260 
262  };
263 
264  } // namespace hp2D::l2
265 
266 } // namespace hp2D
267 
268 #endif // hp2dlinearform_hh
virtual ~Riesz()
void setupGradLinearForm(vectorial::LinearForm< F, typename concepts::Realtype< F >::type > &lf, const concepts::ElementFormulaContainer< concepts::Point< F, 2 > > frm1, const concepts::ElementFormulaContainer< concepts::Point< F, 2 > > frm2)
Function to setup a linear form related to the vectorial linear form.
virtual void operator()(const Quad< Real > &elm, concepts::ElementMatrix< F > &em) const
virtual void operator()(const concepts::Element< Real > &elm, concepts::ElementMatrix< F > &em) const
Computes the element load vector.
Interface class for Linearform in that one can choice for the basis evaluation type,...
Definition: linearForm.hh:64
virtual std::ostream & info(std::ostream &os) const
Riesz(const concepts::ElementFormulaContainer< F > frm, concepts::BoundaryConditions *bc=0, bool ignoreMissingElem=false)
Constructor.
Vector valued problems.
Definition: spaceTraits.hh:24
PlCurlLinearForm(const concepts::ElementFormulaContainer< F > frm1, const concepts::ElementFormulaContainer< F > frm2)
Constructor.
virtual std::ostream & info(std::ostream &os) const
void setupRiesz(vectorial::LinearForm< F, typename concepts::Realtype< F >::type > &lf, const concepts::ElementFormulaContainer< concepts::Point< F, 2 > > frm)
Function to setup a linear form related to the vector Riesz, namely.
Helper class for linearforms l(v), where v is a 0-form.
GenericElement< KarniadakisMixin< F > > Element
template aliases for backwards compatibility
Definition: element.hh:270
Linear form in 2D.
Definition: linearForm.hh:236
Abstract class for a linear form.
virtual std::ostream & info(std::ostream &os) const
2D hp-FEM for H1-conforming elements.
Riesz(const std::string &str, concepts::BoundaryConditions *bc=0, bool ignoreMissingElem=false)
Contructor via a string of real valued Riesz.
virtual std::ostream & info(std::ostream &os) const
void operator()(const concepts::Element< Real > &elm, concepts::ElementMatrix< F > &em) const
Computes the element load vector.
Linear form in 2D.
Definition: linearForm.hh:138
virtual ~Riesz()
Vector valued linear form.
Definition: linearForm.hh:38
void operator()(const Quad< Real > &elm, concepts::ElementMatrix< F > &em) const
PlCurlLinearForm(const concepts::ElementFormulaContainer< concepts::Point< F, 2 > > frm)
Constructor.
Linear form in 2D.
Definition: linearForm.hh:62
bool ignoreMissingElem
Definition: linearForm.hh:107
Riesz(const concepts::ElementFormulaContainer< F > frm, bool ignoreMissingElem=false)
Constructor.
void operator()(const Quad< Real > &elm, concepts::ElementMatrix< F > &em) const
Element matrix.
Definition: linearForm.hh:18
Linear form in 2D.
Definition: linearForm.hh:202
bool ignoreMissingElem
Definition: linearForm.hh:261
Helper class for linearforms l(v), where v is a two form.
concepts::Array< Real > jacobian_
Intermediate data for element matrix computation.
Definition: linearForm.hh:100
void operator()(const concepts::Element< Real > &elm, concepts::ElementMatrix< F > &em) const
Computes the element load vector.
GradLinearForm(const concepts::ElementFormulaContainer< concepts::Point< F, 2 > > frm, bool ignoreMissingElem=false)
Constructor.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
concepts::BoundaryConditions * bc_
Reference to the boundary conditions.
Definition: linearForm.hh:106
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
GradLinearForm(const concepts::ElementFormulaContainer< F > frm1, const concepts::ElementFormulaContainer< F > frm2, bool ignoreMissingElem=false)
Constructor.
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