144 class NodeTetrahedron;
145 class NodeHexahedron;
147 virtual std::ostream&
info(std::ostream&
os)
const;
150 class S :
public Scan<Cell3> {
152 inline S(std::vector<Cell3*>& cell) :
153 idx_(cell.begin()), cell_(cell) {}
154 inline S(
const S&
scan) : idx_(
scan.idx_), cell_(
scan.cell_) {}
155 inline bool eos()
const {
return idx_ == cell_.end(); }
156 inline Cell3& operator++(
int) {
return *(*idx_++); }
157 inline Scan3* clone()
const {
return new S(*
this); }
159 std::vector<Cell3*>::iterator idx_;
160 std::vector<Cell3*>& cell_;
163 std::vector<Vertex*> vtx_;
165 std::vector<Edge*> edg_;
167 std::unordered_map<Index, Triangle*, std::hash<Index>,
170 std::unordered_map<Index, Quad*, std::hash<Index>,
173 std::vector<Cell3*> cell_;
178 uint readInts_(
const std::string& i, std::vector<int>& v)
const;
181 void clear_(std::vector<NodeCell*>& cells)
const;
194 std::map<
uint, std::map<uint, Edge*> >&
edges,
195 Attribute
attr = 0, Edge** e = 0);
203 Triangle* createTriangle_(
const Index&
I,
204 std::map<
uint, std::map<uint, Edge*> >&
edges,
213 Quad* createQuad_(
const Index&
I,
214 std::map<
uint, std::map<uint, Edge*> >&
edges,
uint size() const
Returns the requested size of the array.
Array< uint > nodes_
Node numbers of the cell.
virtual Triangle ** triangle(const uint i)=0
Returns the face with index i.
uint operator[](const uint i) const
Returns the node with index i.
virtual Quad ** quad(const uint i)=0
Returns the face with index i.
virtual uint nofaces() const =0
Returns the number of faces.
uint size() const
Returns the number of nodes.
NodeCell(const uint size)
virtual Index faceIndex(const uint i)=0
Returns the indices of the nodes which define the face i.
virtual Cell3 * cell(const std::vector< Real3d > &vertices) const =0
Creates and returns the cell.
virtual Cell3 * cell(const std::vector< Real3d > &vertices) const
Creates and returns the cell.
virtual uint nofaces() const
Returns the number of faces.
virtual Index faceIndex(const uint i)
Returns the indices of the nodes which define the face i.
virtual Triangle ** triangle(const uint i)
Returns the face with index i.
NodeHexahedron(const uint one, const uint two, const uint three, const uint four, const uint five, const uint six, const uint seven, const uint eight, const uint elmType=0)
virtual Quad ** quad(const uint i)
Returns the face with index i.
NodeTetrahedron(const uint one, const uint two, const uint three, const uint four, const bool leftHand=false)
virtual uint nofaces() const
Returns the number of faces.
virtual Index faceIndex(const uint i)
Returns the indices of the nodes which define the face i.
virtual Quad ** quad(const uint i)
Returns the face with index i.
virtual Tetrahedron3d * cell(const std::vector< Real3d > &vertices) const
Creates and returns the cell.
virtual Triangle ** triangle(const uint i)
Returns the face with index i.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
Import3dMesh(const std::string coord, const std::string elms, const std::string boundary, const uint idxStart=1, const bool leftHand=false, const uint elmtyp=0)
virtual uint ncell() const
Returns the number of cells in the mesh.
size_t hash_value(const concepts::Index &i)
Computes a hash for i.
Set< F > makeSet(uint n, const F &first,...)
Scan< Cell3 > Scan3
A scanner for a 3D mesh.
Index(const Index &i)
Copy constructor.
bool operator==(const concepts::Index &y) const
== operator
uint operator[](const uint i) const
Returns the ith entry of n_.
uint & operator[](const uint i)
Returns the ith entry of n_.
Array< uint > n_
Stores the data.
uint size() const
Returns number of entries in n_.
Index(const uint n0, const uint n1, const uint n2)
Constructor for use in a triangle.
Index(const uint n0, const uint n1, const uint n2, const uint n3)
Constructor for use in a quad.
bool operator<(const concepts::Index &y) const
< operator for
Key equal function class.
size_t operator()(const concepts::Index &x) const
Computes the hash function value for x.