Class documentation of Concepts

Loading...
Searching...
No Matches
meshConverter.hh
Go to the documentation of this file.
1
7#ifndef meshConverter2D_hh
8#define meshConverter2D_hh
9
10#include <list>
11#include "mesh.hh"
12#include "cell2D.hh"
13
14namespace concepts {
15
16 // ****************************************************** ConvertMeshQuads **
17
35 class ConvertMeshQuads : public Mesh2 {
36 public:
42 ConvertMeshQuads(Mesh2& m, const uint level);
44
45 virtual uint ncell() const { return quadList_.size(); }
46 virtual Scan2* scan() { return new S(quadList_); }
47 protected:
48 virtual std::ostream& info(std::ostream& os) const;
49 private:
51 Mesh2& m_;
53 Joiner<Vertex*, 1>* vertexList_;
55 Joiner<Edge*, 1>* edgeList_;
57 Joiner<Quad2d*, 1>* newQuadList_;
59 std::list<Quad2d*> quadList_;
61 bool hasQuads, hasTris;
62
64 class S : public Scan2 {
65 public:
66 S(std::list<Quad2d*>& cell) :
67 idx_(cell.begin()), cell_(cell) {}
68 S(const S& scan) : idx_(scan.idx_), cell_(scan.cell_) {}
69 bool eos() const { return idx_ == cell_.end(); }
70 Quad2d& operator++(int) { return *(*idx_++); }
71 Scan2* clone() const { return new S(*this); }
72 private:
73 std::list<Quad2d*>::iterator idx_;
74 std::list<Quad2d*>& cell_;
75 };
76
78 void convertCell_(Cell2& c, const uint level);
79 void deleteStuff_();
80 };
81
82} // namespace concepts
83
84#endif // meshConverter2D_hh
virtual uint ncell() const
Returns the number of cells in the mesh.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
ConvertMeshQuads(Mesh2 &m, const uint level)
A scanner for a 2D mesh.
Definition mesh.hh:44
Scan< Cell2 > Scan2
A scanner for a 2D mesh.
Definition mesh.hh:62
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320