Class documentation of Concepts

Loading...
Searching...
No Matches
element2D.hh
Go to the documentation of this file.
1
6#ifndef element2DLin_hh
7#define element2DLin_hh
8
9#include "element.hh"
10#include "geometry/cell2D.hh"
11
12namespace concepts {
13 // forward declaration
14 template<typename F>
15 class ElementGraphics;
16}
17
18namespace linearFEM {
19 // forward declaration
20 class TriangleGraphics;
21 class QuadGraphics;
22
23 // ************************************************************** Triangle **
24
29 class Triangle : public Element {
30 public:
36 Triangle(const concepts::Triangle2d& cell, uint idx[]) :
37 Element(3, idx), cell_(cell) {}
47 virtual const concepts::Triangle& support() const {
48 return cell_.connector(); }
49 virtual const concepts::Triangle2d& cell() const { return cell_; }
57 Real shapefct(const uint i, const Real xi1, const Real xi2) const;
63 concepts::Real2d shapefctD(const uint i) const;
64 virtual const concepts::ElementGraphics<Real>* graphics() const;
65 protected:
66 virtual std::ostream& info(std::ostream& os) const;
67 private:
69 const concepts::Triangle2d& cell_;
70 static std::unique_ptr<TriangleGraphics> graphics_;
71 };
72
73 // ****************************************************************** Quad **
74
79 class Quad : public Element {
80 public:
86 Quad(const concepts::Quad2d& cell, uint idx[]) :
87 Element(4, idx), cell_(cell) {}
96 virtual const concepts::Quad& support() const { return cell_.connector(); }
97 virtual const concepts::Quad2d& cell() const { return cell_; }
108 void evaluate(Real* res, const Real* x, const uint n) const;
119 void evaluateD(concepts::Real2d* res, const Real* x, const uint n) const;
120 virtual const concepts::ElementGraphics<Real>* graphics() const;
121 protected:
122 virtual std::ostream& info(std::ostream& os) const;
123 private:
125 const concepts::Quad2d& cell_;
126 static std::unique_ptr<QuadGraphics> graphics_;
127 };
128
129} // namespace linearFEM
130
131#endif // element2DLin_hh
Quad & connector() const
Returns the quadrilateral connector (topology)
Definition cell2D.hh:234
Triangle & connector() const
Returns the triangle connector (topology)
Definition cell2D.hh:91
void evaluateD(concepts::Real2d *res, const Real *x, const uint n) const
virtual const concepts::Quad2d & cell() const
Returns the cell of this element.
Definition element2D.hh:97
void evaluate(Real *res, const Real *x, const uint n) const
Quad(const concepts::Quad2d &cell, uint idx[])
Definition element2D.hh:86
Quad(const concepts::Quad2d &cell, concepts::TColumn< Real > *T0, concepts::TColumn< Real > *T1=0)
Definition element2D.hh:94
virtual const concepts::Quad & support() const
Returns the support of this element.
Definition element2D.hh:96
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Triangle(const concepts::Triangle2d &cell, concepts::TColumn< Real > *T0, concepts::TColumn< Real > *T1=0)
Definition element2D.hh:44
Triangle(const concepts::Triangle2d &cell, uint idx[])
Definition element2D.hh:36
virtual const concepts::Triangle & support() const
Returns the support of this element.
Definition element2D.hh:47
virtual const concepts::Triangle2d & cell() const
Returns the cell of this element.
Definition element2D.hh:49
concepts::Real2d shapefctD(const uint i) const
Real shapefct(const uint i, const Real xi1, const Real xi2) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.