23 static const uint ncell_ = 1;
30 const uint attrib = 0);
37 const uint attrib = 0);
59 virtual std::ostream&
info(std::ostream&
os)
const;
61 class S :
public Scan<Cell2> {
65 inline S(
Quad2d *(&cell)[ncell_]) : idx_(0), cell_(cell) {}
66 inline S(
const S &
scan) : idx_(
scan.idx_), cell_(
scan.cell_) {}
68 inline bool eos()
const {
return idx_ == ncell_; }
69 inline Cell2& operator++(
int) {
return *cell_[idx_++]; }
71 inline Scan2* clone()
const {
return new S(*
this); }
73 void construct_(
const Array<Real2d>& coord,
74 const Array<uint>& attrib,
75 const Array<uint>*
vattrib = 0);
81 Quad2d* cell_[ncell_];
111 static const uint ncell_ = 2;
124 virtual std::ostream&
info(std::ostream&
os)
const;
126 class S :
public Scan<Cell2> {
130 inline S(
Quad2d *(&cell)[ncell_]) : idx_(0), cell_(cell) {}
131 inline S(
const S &
scan) : idx_(
scan.idx_), cell_(
scan.cell_) {}
133 inline bool eos()
const {
return idx_ == ncell_; }
134 inline Cell2& operator++(
int) {
return *cell_[idx_++]; }
136 inline Scan2* clone()
const {
return new S(*
this); }
139 void construct_(
const Array<uint>& attrib,
const Array<uint>&
elmAttrib);
146 Quad2d* cell_[ncell_];
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
uint ncell() const
Returns the number of cells in the mesh.
Square2(Array< uint > attrib, Array< uint > *elmAttrib=0)
Square(const Real x0, const Real y0, const Real x1, const Real y1, const Real x2, const Real y2, const Real x3, const Real y3, const Array< uint > &attrib, const Array< uint > *vattrib=0)
Square(const Real sizex, const Real sizey, const Array< uint > &attrib, const Array< uint > *vattrib=0)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Square(const Real sizex=1.0, const Real sizey=1.0, const uint attrib=0)
Square(const Real x0, const Real y0, const Real x1, const Real y1, const Real x2, const Real y2, const Real x3, const Real y3, const uint attrib=0)
uint ncell() const
Returns the number of cells in the mesh.
Scan< Cell2 > Scan2
A scanner for a 2D mesh.
Set< F > makeSet(uint n, const F &first,...)