bf_partialderiv.hh

Go to the documentation of this file.
1 
6 #ifndef hp2dbf_partialderiv_hh
7 #define hp2dbf_partialderiv_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 
46  class InfiniteLaguerreQuad;
47 
48  using concepts::Real;
49 
50 
51  // ********************************************************* partDerivType **
52 
59  enum partDerivType { NO_DERIV = 0, X_DERIV = 1, Y_DERIV = 2};
60 
61  // ********************************************** BilinearFormOnePartDeriv **
62 
84  template<class F = Real>
87  {
88  public:
97 
99 
100  virtual BilinearFormOnePartDeriv<F>* clone() const {
101  return new BilinearFormOnePartDeriv<F>(i_, this->frm_);
102  }
103 
104  virtual void operator()(const concepts::Element<Real>& elmX,
105  const concepts::Element<Real>& elmY,
106  concepts::ElementMatrix<F>& em) const;
107 
108  protected:
109  virtual std::ostream& info(std::ostream& os) const;
110  private:
112  const enum partDerivType i_;
113 
116 
118  bool operator()(const hp2D::Quad<Real>* elmX,
119  const hp2D::Quad<Real>* elmY,
120  concepts::ElementMatrix<F>& em) const;
121 
123  const InfiniteLaguerreQuad* elmY,
124  concepts::ElementMatrix<F>& em) const;
125  };
126 
127  // ********************************************** BilinearFormTwoPartDeriv **
128 
150  template<class F = Real>
152  public BilinearFormHelper_1_1<F>
153  {
154  public:
162  const enum partDerivType j,
165 
167 
168  virtual BilinearFormTwoPartDeriv<F>* clone() const {
169  return new BilinearFormTwoPartDeriv<F>(i_, j_, this->frm_);
170  }
171 
172  virtual void operator()(const concepts::Element<Real>& elmX,
173  const concepts::Element<Real>& elmY,
174  concepts::ElementMatrix<F>& em) const;
175 
176  protected:
177  virtual std::ostream& info(std::ostream& os) const;
178  private:
180  const enum partDerivType i_, j_;
181 
183  bool operator()(const Quad<Real>* elmX,
184  const Quad<Real>* elmY,
185  concepts::ElementMatrix<F>& em) const;
186  };
187 
188 } // namespace hp2D
189 
190 #endif // hp2dbf_partialderiv_hh
virtual void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
enum partDerivType i_
Component of the test function.
concepts::ElementMatrix< Real > stiff1D_
Local 1D stiffness and mass matrices for Karniadakis basis.
concepts::ElementFormulaContainer< Real > frm_
Element formula.
bool operator()(const InfiniteLaguerreQuad *elmX, const InfiniteLaguerreQuad *elmY, concepts::ElementMatrix< F > &em) const
Vector valued problems.
Definition: spaceTraits.hh:24
A 2D FEM element: an infinite quad with basis based on Laguerre functions.
Definition: quad.hh:452
bool operator()(const hp2D::Quad< Real > *elmX, const hp2D::Quad< Real > *elmY, concepts::ElementMatrix< F > &em) const
Assembling for hp2D::Quad.
A function class to calculate element matrices for the bilinear form related to a partial derivative ...
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
GenericElement< KarniadakisMixin< F > > Element
template aliases for backwards compatibility
Definition: element.hh:270
Helper class for bilinearforms a(u,v), where u and v are 1-forms, which computes intermediate data fo...
concepts::ElementMatrix< Real > mass1D_
2D hp-FEM for H1-conforming elements.
Abstract function class to evaluate a bilinear form.
Definition: bilinearForm.hh:33
bool operator()(const Quad< Real > *elmX, const Quad< Real > *elmY, concepts::ElementMatrix< F > &em) const
Assembling for hp2D::Quad.
BilinearFormTwoPartDeriv(const enum partDerivType i, const enum partDerivType j, const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Constructor.
Element matrix.
Definition: linearForm.hh:18
concepts::ElementFormulaContainer< Real > frm_
ElementFormula.
Helper class for bilinear forms a(u,v) where u is a 0-form and v is a 1-form.
virtual void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
virtual BilinearFormOnePartDeriv< F > * clone() const
Virtual constructor.
BilinearFormOnePartDeriv(const enum partDerivType i, const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual BilinearFormTwoPartDeriv< F > * clone() const
Virtual constructor.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
enum partDerivType i_ j_
Component of the test or trial function.
A function class to calculate element matrices for the bilinear form related to a partial derivative ...
partDerivType
Direction of partial derivative.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich