Class documentation of Concepts

Loading...
Searching...
No Matches
infiniteMeshes.hh
Go to the documentation of this file.
1
6#ifndef infMeshes_hh
7#define infMeshes_hh
8
9#include "basics/typedefs.hh"
10#include "mesh.hh"
11#include "topology.hh"
12#include "cell2D.hh"
13
14namespace concepts {
15
16 // ************************************************** SquareTwoInfiniteRects **
17
28 private:
29 class S : public Scan<Cell2> {
30 unsigned int idx_;
31 Cell2 *(&cell_)[3];
32 public:
33 inline S(Cell2 *(&cell)[3]) : idx_(0), cell_(cell) {}
34 inline S(const S& scan) : idx_(scan.idx_), cell_(scan.cell_) {}
35 inline bool eos() const { return idx_ == 3; }
36 inline Cell2& operator++(int) { return *cell_[idx_++]; }
37 inline Scan2* clone() const { return new S(*this); }
38 };
39
40 Vertex *vtx_ [4];
41 Edge *edg_ [4];
42 InfiniteEdge *infEdg_ [4];
43 Quad *quad_ [1];
44 InfiniteQuad *infQuad_[2];
45 Cell2 *cell_ [3];
46 bool periodic_;
47 public:
48 SquareTwoInfiniteRects(bool periodic = false);
50 inline unsigned int ncell() const { return 3; }
51 inline Scan2* scan() { return new S(cell_); }
52 virtual std::ostream& info(std::ostream& os) const;
53 };
54
55 // *************************************************** SquareOneInfiniteRect **
56
72 private:
73 class S : public Scan<Cell2> {
74 unsigned int idx_;
75 Cell2 *(&cell_)[2];
76 public:
77 inline S(Cell2 *(&cell)[2]) : idx_(0), cell_(cell) {}
78 inline S(const S& scan) : idx_(scan.idx_), cell_(scan.cell_) {}
79 inline bool eos() const { return idx_ == 2; }
80 inline Cell2& operator++(int) { return *cell_[idx_++]; }
81 inline Scan2* clone() const { return new S(*this); }
82 };
83
84 Vertex *vtx_ [4];
85 Edge *edg_ [4];
86 InfiniteEdge *infEdg_ [2];
87 Quad *quad_ [1];
88 InfiniteQuad *infQuad_[1];
89 Cell2 *cell_ [2];
90 bool periodic_;
91 public:
92 SquareOneInfiniteRect(bool periodic = false);
93 virtual ~SquareOneInfiniteRect();
94 inline unsigned int ncell() const { return 2; }
95 inline Scan2* scan() { return new S(cell_); }
96 virtual std::ostream& info(std::ostream& os) const;
97 };
98
99} // namespace concepts
100
101#endif // infMeshes_hh
102
Two dimensional cell.
Definition cell.hh:89
A scanner for a 2D mesh.
Definition mesh.hh:44
unsigned int ncell() const
Returns the number of cells in the mesh.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
unsigned int ncell() const
Returns the number of cells in the mesh.
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320