Class documentation of Concepts

Loading...
Searching...
No Matches
topology3D.hh
Go to the documentation of this file.
1
7#ifndef topology3D_hh
8#define topology3D_hh
9
10#include <memory>
11#include "basics/typedefs.hh"
12#include "basics/Zm.hh"
13#include "connector.hh"
14#include "topology.hh"
15#include "hexsubdiv.hh"
16
17namespace concepts {
18
19 // *********************************************************** Tetrahedron **
20
35 class Tetrahedron : public Connector3 {
36 public:
55 virtual ~Tetrahedron();
56
69 virtual Tetrahedron* child(uint i, bool mode = 0);
70 virtual const Tetrahedron* child(uint i) const;
71
72 Edge* edge(uint i) const;
73 Triangle* face(uint i) const { return i < 4 ? tri_[i] : 0; }
74 Vertex* vertex(uint i) const;
75
79 int rho(int i) const { return rho_[i]; }
80
85 int tau(int i) const { return tau_[i]; }
86 protected:
87 virtual std::ostream& info(std::ostream& os) const;
88 private:
92 Tetrahedron* chld_;
93
95 Tetrahedron* lnk_;
96
98 Triangle* tri_[4];
99
105 Z3 tau_[4];
106
113 Z2 rho_[4];
114 };
115
116 // ************************************************************ Hexahedron **
117
134 class Hexahedron : public Connector3 {
135 friend class HexSubdiv8;
136 friend class HexSubdiv2x;
137 friend class HexSubdiv2y;
138 friend class HexSubdiv2z;
139 friend class HexSubdiv4x;
140 friend class HexSubdiv4y;
141 friend class HexSubdiv4z;
142 public:
164 const Attribute attrib = Attribute());
165 virtual ~Hexahedron();
166
178 virtual Hexahedron* child(uint i, bool mode = 0);
179 virtual const Hexahedron* child(uint i) const;
180
181 Edge* edge(uint i) const;
182 Quad* face(uint i) const { return i < 6 ? quad_[i] : 0; }
183 Vertex* vertex(uint i) const;
184
188 Z2 rho(int i) const { return rho_[i]; }
189
193 Z4 tau(int i) const { return tau_[i]; }
194
195
196
209
215 const HexSubdivision* getStrategy() const { return subdivStrategy_; }
216 protected:
217 virtual std::ostream& info(std::ostream& os) const;
218 private:
222 Hexahedron* chld_;
223
225 Hexahedron* lnk_;
226
228 Quad* quad_[6];
229
238 Z4 tau_[6];
239
248 Z2 rho_[6];
266 const HexSubdivision* subdivStrategy_;
267 };
268
269} // namespace concepts
270
271#endif // topology3D_hh
const Attribute & attrib() const
Returns the attribute of the connector.
Definition connector.hh:108
Vertex * vertex(uint i) const
Z4 tau(int i) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Hexahedron * child(uint i, bool mode=0)
Edge * edge(uint i) const
void setStrategy(const HexSubdivision *strategy=0)
Z2 rho(int i) const
const HexSubdivision * getStrategy() const
Quad * face(uint i) const
Hexahedron(Quad &quad0, Quad &quad1, Quad &quad2, Quad &quad3, Quad &quad4, Quad &quad5, const Attribute attrib=Attribute())
Tetrahedron(Triangle &tri0, Triangle &tri1, Triangle &tri2, Triangle &tri3, Attribute attrib=Attribute())
int rho(int i) const
Definition topology3D.hh:79
virtual Tetrahedron * child(uint i, bool mode=0)
Vertex * vertex(uint i) const
Triangle * face(uint i) const
Definition topology3D.hh:73
int tau(int i) const
Definition topology3D.hh:85
Edge * edge(uint i) const
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320