bf_laplace.hh

Go to the documentation of this file.
1 
6 #ifndef hp2dbf_laplace_hh
7 #define hp2dbf_laplace_hh
8 
9 #include <memory>
10 #include "basics/typedefs.hh"
12 #include "toolbox/sharedPointer.hh"
14 #include "operator/bilinearForm.hh"
16 #include "arrayElementFormula.hh"
17 
18 
19 namespace concepts {
20  // forward declarations
21  template<class F>
22  class Array;
23 
24  template<class F, uint dim>
25  class Point;
26 
27  template<class F>
28  class Element;
29 
30  template<class F>
31  class ElementMatrix;
32 
33  template<typename F, typename G>
34  class ElementFormula;
35 }
36 
37 namespace vectorial {
38  // forward declarations
39  template<class F, class G>
40  class BilinearForm;
41 }
42 
43 namespace hp2D {
44  // forward declarations
45  template<class F>
46  class Quad;
47 
48  class InfiniteLaguerreQuad;
49 
50  using concepts::Real;
51 
52 
53  // *********************************************************** LaplaceBase **
54 
61  template<class F = Real, class G = typename concepts::Realtype<F>::type>
62  class LaplaceBase : public BilinearFormHelper_1_1<F,G> {
63  public:
65 
69  LaplaceBase(const concepts::ElementFormulaContainer<F> frm, bool all = false);
70 
72  , bool all = false);
73  protected:
75  bool all_;
76 
77  bool assemble_(const Quad<Real>* elmX, const Quad<Real>* elmY,
79  };
80 
81 
82  // *************************************************************** Laplace **
83 
89  template<class F = Real>
90  class Laplace : public concepts::BilinearForm<F>,
91  public LaplaceBase<F> {
92  public:
98  , bool all = false);
99 
100  virtual ~Laplace();
101  virtual Laplace<F>* clone() const;
102  virtual void operator()(const concepts::Element<Real>& elmX,
103  const concepts::Element<Real>& elmY,
104  concepts::ElementMatrix<F>& em) const;
105  protected:
106  virtual std::ostream& info(std::ostream& os) const;
107  private:
109  bool all_;
110 
113 
115  const InfiniteLaguerreQuad* elmY,
116  concepts::ElementMatrix<F>& em) const;
117  };
118 
119  // ********************************************************* LaplaceMatrix **
120 
127  template<class F = Real>
129  public LaplaceBase<Real,F> {
130  public:
133 
138  , bool all = false);
139  virtual ~LaplaceMatrix();
140  virtual LaplaceMatrix<F>* clone() const;
141  virtual void operator()(const concepts::Element<Real>& elmX,
142  const concepts::Element<Real>& elmY,
143  concepts::ElementMatrix<F>& em) const;
144  protected:
145  virtual std::ostream& info(std::ostream& os) const;
146  };
147 
148  // *********************************************************** setupLaplace **
149 
154  template<class F>
159 
160 
161 } // namespace hp2D
162 
163 #endif // hp2dbf_laplace_hh
bool all_
Parameter for the sum factorisation.
Definition: bf_laplace.hh:75
Basic class for a 2D or 3D map.
bool all_
Parameter for the sum factorisation.
Definition: bf_laplace.hh:109
Vector valued problems.
Definition: spaceTraits.hh:24
void setupLaplace(vectorial::BilinearForm< F, typename concepts::Realtype< F >::type > &bf, const concepts::ElementFormulaContainer< F, typename concepts::Realtype< F >::type > frm=concepts::ElementFormulaContainer< F, typename concepts::Realtype< F >::type >())
Function to setup a bilinear form related to the vector Laplace, namely.
A 2D FEM element: an infinite quad with basis based on Laguerre functions.
Definition: quad.hh:452
Vector valued bilinear form.
Definition: bf_advection.hh:38
concepts::ElementMatrix< Real > mass1D_
Definition: bf_laplace.hh:112
bool assembleLaguerre_(const InfiniteLaguerreQuad *elmX, const InfiniteLaguerreQuad *elmY, concepts::ElementMatrix< F > &em) const
GenericElement< KarniadakisMixin< F > > Element
template aliases for backwards compatibility
Definition: element.hh:270
virtual Laplace< F > * clone() const
Virtual constructor.
Helper class for bilinearforms a(u,v), where u and v are 1-forms, which computes intermediate data fo...
virtual void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
virtual LaplaceMatrix< F > * clone() const
Virtual constructor.
Laplace(const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >(), bool all=false)
Constructor.
2D hp-FEM for H1-conforming elements.
Abstract function class to evaluate a bilinear form.
Definition: bilinearForm.hh:33
concepts::ElementFormulaContainer< concepts::Mapping< F, 2u > > FrmE_Matrix
Definition: bf_laplace.hh:132
LaplaceBase(const concepts::ElementFormulaContainer< F > frm, bool all=false)
Constructor.
concepts::ElementMatrix< Real > stiff1D_
Local 1D stiffness and mass matrices for Karniadakis basis.
Definition: bf_laplace.hh:112
Base class to calculate element matrices for the Laplacian, for both scalar and matrix formulas.
Definition: bf_laplace.hh:62
virtual ~Laplace()
LaplaceBase(const concepts::ElementFormulaContainer< concepts::Mapping< G, 2 > > frm, bool all=false)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
A function class to calculate element matrices for the Laplacian.
Definition: bf_laplace.hh:91
virtual ~LaplaceMatrix()
concepts::Combtype< F, G >::type value_type
Definition: bf_laplace.hh:64
Element matrix.
Definition: linearForm.hh:18
LaplaceMatrix(const FrmE_Matrix frm=FrmE_Matrix(), bool all=false)
Constructor.
virtual void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
A function class to calculate element matrices for the Laplacian for matrix formulas.
Definition: bf_laplace.hh:129
bool assemble_(const Quad< Real > *elmX, const Quad< Real > *elmY, concepts::ElementMatrix< value_type > &em) const
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich