bilinearForm.hh

Go to the documentation of this file.
1 
6 #ifndef bilinearform1D_hh
7 #define bilinearform1D_hh
8 
9 #include "basics/typedefs.hh"
11 #include "operator/bilinearForm.hh"
12 #include "formula.hh"
13 
14 namespace concepts {
15  // forward declarations
16  template<class F>
17  class Element;
18 
19  template<class F>
20  class ElementMatrix;
21 
22  template<class F>
23  class Array;
24 }
25 
26 namespace hp1D {
27 
28  using concepts::Real;
29 
30  // *************************************************************** Laplace **
31 
36  template<class F = Real>
37  class Laplace : public concepts::BilinearForm<F,Real>,
38  public BilinearFormHelper<1,1,F> {
39  public:
45  : BilinearFormHelper<1,1,F>(frm)
46  { }
47  virtual ~Laplace();
48 
50  const concepts::Element<Real>& elmY,
51  concepts::ElementMatrix<F>& em) const;
52  virtual Laplace<F>* clone() const { return new Laplace<F>(this->frm_); }
53  protected:
54  virtual std::ostream& info(std::ostream& os) const;
55  };
56 
57  // ************************************************************** Identity **
58 
62  template<class F = Real>
63  class Identity : public concepts::BilinearForm<F,Real>,
64  public BilinearFormHelper<0,0,F> {
65  public:
69  virtual ~Identity();
70 
72  const concepts::Element<Real>& elmY,
73  concepts::ElementMatrix<F>& em) const;
74  virtual Identity<F>* clone() const;
75  protected:
76  virtual std::ostream& info(std::ostream& os) const;
77  private:
78  };
79 
80  // ****************************************************** IdentityParallel **
81 
92  template<class F = Real>
93  class IdentityParallel : public concepts::BilinearForm<F,Real>,
94  public BilinearFormHelper<0,0,F> {
95  public:
105  const concepts::Real3d
106  shiftX = concepts::Real3d(),
107  const concepts::Real3d
108  shiftY = concepts::Real3d(),
109  const bool negShift = false
110  );
111  virtual ~IdentityParallel();
112 
114  const concepts::Element<Real>& elmY,
115  concepts::ElementMatrix<F>& em) const;
116  virtual IdentityParallel<F>* clone() const;
117  protected:
118  virtual std::ostream& info(std::ostream& os) const;
119  private:
122  const bool negShift_;
123  };
124 
125 
126  // *************************************************************** Bi-Laplace **
127 
132  template<class F = Real>
133  class BiLaplace: public concepts::BilinearForm<F, Real>,
134  public BilinearFormHelper<2, 2, F> {
135  public:
141  BilinearFormHelper<2, 2, F>(frm) {
142  }
143 
145  virtual ~BiLaplace();
146 
148  const concepts::Element<Real>& elmY, concepts::ElementMatrix<F>& em) const;
149 
150  virtual BiLaplace<F>* clone() const {
151  return new BiLaplace<F>(this->frm_);
152  }
153 
154  protected:
155  virtual std::ostream& info(std::ostream& os) const;
156  };
157 
158  // *************************************************************** Bi-Laplace **
159 
164  template<class F = Real>
165  class Jump1Jump1: public concepts::BilinearForm<F, Real>,
166  public BilinearFormVtxHelper<F> {
167  public:
168 
174  BilinearFormVtxHelper<F>(frm) {
175  }
176 
178  virtual ~Jump1Jump1();
179 
182  const concepts::Element<Real>& elmY, concepts::ElementMatrix<F>& em) const;
183 
184  virtual Jump1Jump1<F>* clone() const {
185  return new Jump1Jump1<F>(this->frm_);
186  }
187 
188  protected:
189  virtual std::ostream& info(std::ostream& os) const;
190 
191  };
192 
193  // *************************************************************** Bi-Laplace **
194 
199  template<class F = Real>
200  class Mean2Jump1: public concepts::BilinearForm<F, Real>,
201  public BilinearFormVtxHelper<F> {
202  public:
203 
209  BilinearFormVtxHelper<F>(frm) {
210  }
211 
213  virtual ~Mean2Jump1();
214 
217  const concepts::Element<Real>& elmY, concepts::ElementMatrix<F>& em) const;
218 
219  virtual Mean2Jump1<F>* clone() const {
220  return new Mean2Jump1<F>(this->frm_);
221  }
222 
223  protected:
224  virtual std::ostream& info(std::ostream& os) const;
225 
228  };
229 
230 } // namespace hp1D
231 
232 #endif // bilinearform1D_hh
virtual Mean2Jump1< F > * clone() const
Virtual constructor.
A function class to calculate element matrices for the mass matrix.
Definition: bilinearForm.hh:64
A function class to calculate element matrices for the mass matrix for elements that are shifted.
Definition: bilinearForm.hh:94
virtual ~Jump1Jump1()
Destructor.
A function class to calculate element matrices for the Laplacian.
Definition: bilinearForm.hh:38
const concepts::Point< Real, 3 > shiftX_
Helper class for bilinearforms a(u,v), where u is i-form and v is j-form.
Definition: formula.hh:184
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
A function class to calculate element matrices for the Product the mean of the second derivative and ...
virtual Identity< F > * clone() const
Virtual constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
const concepts::ElementFormulaContainer< Real > frm_
ElementFormula.
Definition: formula.hh:308
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< F > &em) const
GenericElement< KarniadakisMixin< F > > Element
template aliases for backwards compatibility
Definition: element.hh:270
IdentityParallel(const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >(), const concepts::Real3d shiftX=concepts::Real3d(), const concepts::Real3d shiftY=concepts::Real3d(), const bool negShift=false)
Constructor.
virtual ~Laplace()
void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
virtual BiLaplace< F > * clone() const
Virtual constructor.
Laplace(const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Constructor.
Definition: bilinearForm.hh:43
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Identity(const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Constructor.
Abstract function class to evaluate a bilinear form.
Definition: bilinearForm.hh:33
virtual ~Mean2Jump1()
Destructor.
const concepts::Point< Real, 3 > shiftY_
void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
Operator.
An array of objects.
Definition: bilinearForm.hh:23
virtual Jump1Jump1< F > * clone() const
Virtual constructor.
A function class to calculate element matrices for the Product of the jumps of the derivative.
A function class to calculate element matrices for the Bi-Laplacian.
const concepts::ElementFormulaContainer< F > frm_
ElementFormula.
virtual ~Identity()
virtual Laplace< F > * clone() const
Virtual constructor.
Definition: bilinearForm.hh:52
BiLaplace(const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Constructor.
Helper class for bilinearforms a(u,v), where a is a i-j Form that just works on the Vertices,...
Definition: formula.hh:264
void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
Operator.
virtual ~BiLaplace()
Destructor.
void operator()(const concepts::Element< Real > &elmX, const concepts::Element< Real > &elmY, concepts::ElementMatrix< F > &em) const
Jump1Jump1(const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Constructor.
Mean2Jump1(const concepts::ElementFormulaContainer< F > frm=concepts::ElementFormulaContainer< F >())
Constructor.
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.
Element matrix.
Definition: linearForm.hh:18
virtual IdentityParallel< F > * clone() const
Virtual constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
1D hp-FEM
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich