Class documentation of Concepts

Loading...
Searching...
No Matches
space2D.hh
Go to the documentation of this file.
1
6#ifndef linSpace2D_hh
7#define linSpace2D_hh
8#include "toolbox/hashMap.hh"
9#include "element2D.hh"
10#include "basics/typedefs.hh"
11#include "space/space.hh"
12#include "space/element.hh"
14
15namespace concepts {
16
17 // forward declarations
18 class Mesh2;
19 class BoundaryConditions;
20
21 // ************************************************************** Scanners **
22
23 template<>
24 class Scan<linearFEM::Triangle> : public Scan<linearFEM::Element> {
25 public:
27 };
28
29 template<>
30 class Scan<linearFEM::Quad> : public Scan<linearFEM::Element> {
31 public:
32 virtual linearFEM::Quad& operator++(int) = 0;
33 };
34
35} // namespace concepts
36
37namespace linearFEM {
38
39 // ************************************************************** Linear2d **
40
44 class Linear2d : public concepts::Space<Real> {
45 public:
47 typedef void (*SMap)(const concepts::TColumn<Real>&,
49
55 Linear2d(concepts::Mesh2& msh, uint level,
57 virtual ~Linear2d();
58 virtual uint dim() const { return dim_; }
59 virtual uint nelm() const { return nelm_; }
60 virtual Scan* scan() const;
62 void rebuild();
68 void adjust(const Quad& elm, const short level);
69
76 const SMap& S(uint i) const;
77
78 static void S0(const concepts::TColumn<Real>& src,
79 concepts::TColumn<Real>& dst); // bottom left
80 static void S1(const concepts::TColumn<Real>& src,
81 concepts::TColumn<Real>& dst); // bottom right
82 static void S2(const concepts::TColumn<Real>& src,
83 concepts::TColumn<Real>& dst); // top right
84 static void S3(const concepts::TColumn<Real>& src,
85 concepts::TColumn<Real>& dst); // top left
86
87 protected:
88 virtual std::ostream& info(std::ostream& os) const;
89 private:
91 uint dim_;
93 uint nelm_;
95 bool rebuild_;
97 concepts::Mesh2& msh_;
103 std::unordered_map<uint, short> adj_;
105 std::unordered_map<uint, short> ctrl0_;
107 std::unordered_map<uint, short> ctrl0L_;
109 std::unordered_map<uint, short> ctrl1_;
111 std::unordered_map<uint, short> ctrl1L_;
113 std::unordered_map<uint, short> ctrl2_;
115 std::unordered_map<uint, uint> dof_;
116
117 static SMap S_[4];
118
125 void rebuild0_(concepts::Connector2& cntr, const int l, int& L);
126
133 void rebuild1_(concepts::Quad2d& cell, concepts::TColumn<Real>* T0 = 0);
134
143 void rebuild1_(concepts::Triangle2d& cell,
146 void deactivate_(concepts::Connector1& edg);
147 };
148
149} // namespace linearFEM
150
151#endif // linSpace2D_hh
virtual linearFEM::Quad & operator++(int)=0
Returns the next element in the scanned set.
virtual linearFEM::Triangle & operator++(int)=0
Returns the next element in the scanned set.
virtual Scan * scan() const
Returns a scanner to iterate over the elements of the space.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
const SMap & S(uint i) const
virtual uint dim() const
Returns the dimension of the space.
Definition space2D.hh:58
Linear2d(concepts::Mesh2 &msh, uint level, concepts::BoundaryConditions *bc=0)
void adjust(const Quad &elm, const short level)
virtual uint nelm() const
Returns the number of elements in the space.
Definition space2D.hh:59
void rebuild()
Rebuilds the space.