sphereTopology.hh

Go to the documentation of this file.
1 #ifndef SPHERE_HH
2 #define SPHERE_HH
3 
4 #include "toolbox/sequence.hh"
5 #include "geometry/connector.hh"
6 #include "geometry/topology.hh"
7 
8 namespace concepts {
9 
10 
11  //**************************************************** SphericalSurface ***
12 
23  class SphericalSurface : public Connector2 {
24  public:
26  SphericalSurface(const std::vector<Quad*>& quads = std::vector<Quad*>(0),
27  const Attribute attrib = Attribute());
28 
29  ~SphericalSurface() override;
30 
32  const Quad* child(uint i) const override {return chld_.at(i); }
34  Quad* child(uint i, bool mode) override { return chld_[i]; }
35 
37  bool hasChild(const Quad& quad) const;
38 
40  Connector1* edge (uint i) const override;
42  Connector0* vertex (uint i) const override;
43 
44  std::ostream& info(std::ostream& os) const override;
45 
46  private:
48  std::vector<Quad*> chld_;
49 
50  /*static uint cnt_;*/
51 
52  };
53 
54 
55  //************************************************************* Sphere ***
56 
57 
66  class Sphere : public Connector3 {
67  public:
69  const Attribute attrib = Attribute());
70  ~Sphere() override {}
71 
73  SphericalSurface& boundary() const { return *surface_;}
74 
75  const Connector3* child(uint i) const override;
76  Connector3* child(uint i, bool mode) override;
77 
79  Connector2* face (uint i) const override;
81  Connector1* edge (uint i) const override;
83  Connector0* vertex (uint i) const override;
84 
85  std::ostream& info(std::ostream& os) const override;
86 
87  private:
89 
90  /*static uint cnt_;*/
91 
92  };
93 
94 }
95 
96 
97 #endif // SPHERE_HH
std::vector< Quad * > chld_
Quadrilateral children.
A 3D element of the topology.
Definition: connector.hh:277
SphericalSurface(const std::vector< Quad * > &quads=std::vector< Quad * >(0), const Attribute attrib=Attribute())
Constructor accepting the children of the spherical surface.
const Attribute & attrib() const
Returns the attribute of the connector.
Definition: connector.hh:108
Sphere(SphericalSurface &surface, const Attribute attrib=Attribute())
Connector1 * edge(uint i) const override
Required method by Connector2.
A quadrilateral in the topology.
Definition: topology.hh:272
Connector0 * vertex(uint i) const override
Required method by Connector2.
~Sphere() override
const Quad * child(uint i) const override
Get i-th quadrilateral child.
const Connector3 * child(uint i) const override
Connector1 * edge(uint i) const override
Required method by Connector3.
Topological spherical surface connector.
std::ostream & info(std::ostream &os) const override
Returns information in an output stream.
Connector0 * vertex(uint i) const override
Required method by Connector3.
std::ostream & info(std::ostream &os) const override
Returns information in an output stream.
SphericalSurface * surface_
A 2D element of the topology.
Definition: connector.hh:226
SphericalSurface & boundary() const
Return boundary connector.
A 1D element of the topology.
Definition: connector.hh:182
Topological sphere connector.
Connector2 * face(uint i) const override
Required method by Connector3.
Quad * child(uint i, bool mode) override
Get i-th quadrilateral child.
Connector3 * child(uint i, bool mode) override
Returns the ith child of the connector.
bool hasChild(const Quad &quad) const
Check if quad is a child of this connector.
Attributes for elements of the topology.
Definition: connector.hh:22
A 0D element of the topology.
Definition: connector.hh:147
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