quadsubdiv.hh

Go to the documentation of this file.
1 
7 #ifndef quadsubdiv_hh
8 #define quadsubdiv_hh
9 
10 #include <iostream>
11 #include "subdivision.hh"
12 
13 namespace concepts {
14 
15  // forward declaration
16  class Vertex;
17  class Connector1;
18  class Edge;
19  class Quad;
20  class InfiniteEdge;
21  class InfiniteQuad;
22 
23  // ******************************************************* QuadSubdivision **
24 
37  class QuadSubdivision : public Subdivision {
38  public:
41  virtual void createChildren(Quad& q) const = 0;
45  virtual void removeChildren(Quad& q) const = 0;
52  virtual Edge* newEdge(const Quad& q, uint i) const = 0;
60  virtual Vertex* newVertex(const Quad& q, uint i) const = 0;
61  };
62 
63  // *********************************************************** QuadSubdiv4 **
64 
73  class QuadSubdiv4 : public QuadSubdivision {
74  public:
75  virtual void createChildren(Quad& q) const;
76  virtual void removeChildren(Quad& q) const;
77  virtual Edge* newEdge(const Quad& q, uint i) const;
78  virtual Vertex* newVertex(const Quad& q, uint i) const;
79  static const QuadSubdiv4* instance();
80  virtual ~QuadSubdiv4();
81  protected:
82  virtual std::ostream& info(std::ostream& os) const;
83  private:
84  static std::unique_ptr<QuadSubdiv4> instance_;
85  };
86 
87  // ********************************************************** QuadSubdiv2H **
88 
95  class QuadSubdiv2H : public QuadSubdivision {
96  public:
97  virtual void createChildren(Quad& q) const;
98  virtual void removeChildren(Quad& q) const;
99  virtual Edge* newEdge(const Quad& q, uint i) const;
100  virtual Vertex* newVertex(const Quad& q, uint i) const;
101  static const QuadSubdiv2H* instance();
102  virtual ~QuadSubdiv2H();
103  protected:
104  virtual std::ostream& info(std::ostream& os) const;
105  private:
106  static std::unique_ptr<QuadSubdiv2H> instance_;
107  };
108 
109  // ********************************************************** QuadSubdiv2V **
110 
117  class QuadSubdiv2V : public QuadSubdivision {
118  public:
119  virtual void createChildren(Quad& q) const;
120  virtual void removeChildren(Quad& q) const;
121  virtual Edge* newEdge(const Quad& q, uint i) const;
122  virtual Vertex* newVertex(const Quad& q, uint i) const;
123  static const QuadSubdiv2V* instance();
124  virtual ~QuadSubdiv2V();
125  protected:
126  virtual std::ostream& info(std::ostream& os) const;
127  private:
128  static std::unique_ptr<QuadSubdiv2V> instance_;
129  };
130 
131  // ******************************************************* InfQuadSubdivision **
132 
148  public:
151  virtual void createChildren(InfiniteQuad& q) const = 0;
155  virtual void removeChildren(InfiniteQuad& q) const = 0;
162  virtual Connector1* newEdge(const InfiniteQuad& q, uint i) const = 0;
170  virtual Vertex* newVertex(const InfiniteQuad& q, uint i) const = 0;
171  };
172 
173  // ******************************************************* InfQuadSubdiv2V **
174 
183  public:
184  virtual void createChildren(InfiniteQuad& q) const;
185  virtual void removeChildren(InfiniteQuad& q) const;
186  virtual Connector1* newEdge(const InfiniteQuad& q, uint i) const;
187  virtual Vertex* newVertex(const InfiniteQuad& q, uint i) const;
188  static const InfQuadSubdiv2V* instance();
189  virtual ~InfQuadSubdiv2V();
190  protected:
191  virtual std::ostream& info(std::ostream& os) const;
192  private:
193  static std::unique_ptr<InfQuadSubdiv2V> instance_;
194  };
195 
196 
197 } // namespace concepts
198 
199 #endif // quadsubdiv_hh
static const QuadSubdiv2V * instance()
static const QuadSubdiv4 * instance()
static std::unique_ptr< QuadSubdiv2H > instance_
Definition: quadsubdiv.hh:106
virtual Connector1 * newEdge(const InfiniteQuad &q, uint i) const
Returns the ith edge which has been newly created by the subdivision.
Common base class for QuadSubdivision and HexSubdivision.
Definition: subdivision.hh:20
virtual void removeChildren(Quad &q) const =0
If there are children, they are removed.
static const QuadSubdiv2H * instance()
virtual void removeChildren(Quad &q) const
If there are children, they are removed.
A infinite quadrilateral in the topology, which possess one Edge and two InfiniteEdges since one edge...
Definition: topology.hh:423
Subdivision strategy for infinite quadrilaterals which generates two children which are infinite quad...
Definition: quadsubdiv.hh:182
A quadrilateral in the topology.
Definition: topology.hh:272
Interface for topological subdivision strategies for quadrilaterals.
Definition: quadsubdiv.hh:37
virtual void removeChildren(InfiniteQuad &q) const =0
If there are children, they are removed.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Vertex * newVertex(const Quad &q, uint i) const
Return the ith vertex which has been newly created by the subdivision.
virtual void removeChildren(InfiniteQuad &q) const
If there are children, they are removed.
virtual void createChildren(Quad &q) const =0
If no children of q exist, they are created.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Vertex * newVertex(const Quad &q, uint i) const =0
Return the ith vertex which has been newly created by the subdivision.
static std::unique_ptr< InfQuadSubdiv2V > instance_
Definition: quadsubdiv.hh:193
virtual void createChildren(InfiniteQuad &q) const =0
If no children of q exist, they are created.
Subdivision strategy for quadrilaterals which generates two children.
Definition: quadsubdiv.hh:117
virtual Vertex * newVertex(const InfiniteQuad &q, uint i) const =0
Return the ith vertex which has been newly created by the subdivision.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual Edge * newEdge(const Quad &q, uint i) const =0
Returns the ith edge which has been newly created by the subdivision.
virtual Edge * newEdge(const Quad &q, uint i) const
Returns the ith edge which has been newly created by the subdivision.
virtual void createChildren(Quad &q) const
If no children of q exist, they are created.
A vertex in the topology.
Definition: topology.hh:40
static std::unique_ptr< QuadSubdiv4 > instance_
Definition: quadsubdiv.hh:84
virtual void createChildren(Quad &q) const
If no children of q exist, they are created.
Subdivision strategy for quadrilaterals which generates two children.
Definition: quadsubdiv.hh:95
virtual void createChildren(InfiniteQuad &q) const
If no children of q exist, they are created.
virtual void removeChildren(Quad &q) const
If there are children, they are removed.
virtual Connector1 * newEdge(const InfiniteQuad &q, uint i) const =0
Returns the ith edge which has been newly created by the subdivision.
Interface for topological subdivision strategies for infinite quadrilaterals.
Definition: quadsubdiv.hh:147
virtual Vertex * newVertex(const Quad &q, uint i) const
Return the ith vertex which has been newly created by the subdivision.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
A 1D element of the topology.
Definition: connector.hh:182
virtual void createChildren(Quad &q) const
If no children of q exist, they are created.
Subdivision strategy for quadrilaterals which generates four children.
Definition: quadsubdiv.hh:73
An edge in the topology.
Definition: topology.hh:73
virtual Vertex * newVertex(const Quad &q, uint i) const
Return the ith vertex which has been newly created by the subdivision.
static std::unique_ptr< QuadSubdiv2V > instance_
Definition: quadsubdiv.hh:128
virtual Edge * newEdge(const Quad &q, uint i) const
Returns the ith edge which has been newly created by the subdivision.
virtual Edge * newEdge(const Quad &q, uint i) const
Returns the ith edge which has been newly created by the subdivision.
static const InfQuadSubdiv2V * instance()
virtual void removeChildren(Quad &q) const
If there are children, they are removed.
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
virtual Vertex * newVertex(const InfiniteQuad &q, uint i) const
Return the ith vertex which has been newly created by the subdivision.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich