Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

app-heier/meshes/fiveQuads.hh
Go to the documentation of this file.
00001 /* cross with some round edges
00002  */
00003 
00004 #ifndef fivequads_hh
00005 #define fivequads_hh
00006 
00007 #include "basics/typedefs.hh"
00008 #include "geometry/mesh.hh"
00009 #include "geometry/topology.hh"
00010 #include "geometry/cell2D.hh"
00011 
00012 namespace concepts {
00013 
00014   // ***************************************************************** Square5 **
00015   class FiveQuads : public Mesh2 {
00016     static const uint ncell_ = 5;
00017     
00018   public:
00019     FiveQuads();
00020 
00023     FiveQuads(Array<uint> attrib);
00024     virtual ~FiveQuads();
00025 
00026     inline uint ncell() const { return ncell_; }
00027     inline Scan2* scan() { return new S(cell_); }
00028 
00029     virtual std::ostream& info(std::ostream& os) const;
00030 
00031   private:
00032     class S : public Scan<Cell2> {
00033       uint idx_;
00034       Quad2d *(&cell_)[ncell_];
00035     public:
00036       inline S(Quad2d *(&cell)[ncell_]) : idx_(0), cell_(cell) {}
00037       inline S(const S &scan) : idx_(scan.idx_), cell_(scan.cell_) {}
00038 
00039       inline bool eos() const { return idx_ == ncell_; }
00040       inline Cell2& operator++(int) { return *cell_[idx_++]; }
00041 
00042       inline Scan2* clone() const { return new S(*this); }
00043     };
00044 
00045     void construct_(const Array<uint>& attrib);
00046 
00047 
00048     Vertex* vtx_[12];
00049     Edge* edg_[16];
00050     Quad* quad_[ncell_];
00051 
00052     Quad2d* cell_[ncell_];
00053   };
00054 
00055 } // namespace concepts
00056 
00057 #endif // fivequads_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)