103 |
return __cells.size(); |
return __cells.size(); |
104 |
} |
} |
105 |
|
|
106 |
typedef CartesianHexahedron* iterator; |
typedef Mesh::T_iterator<Structured3DMesh, CartesianHexahedron> iterator; |
107 |
typedef CartesianHexahedron const * const_iterator; |
typedef Mesh::T_iterator<const Structured3DMesh, const CartesianHexahedron> const_iterator; |
108 |
|
|
109 |
inline Structured3DMesh::const_iterator find(const double& x, |
inline Structured3DMesh::const_iterator find(const double& x, |
110 |
const double& y, |
const double& y, |
115 |
return find(X[0],X[1],X[2]); |
return find(X[0],X[1],X[2]); |
116 |
} |
} |
117 |
|
|
|
CartesianHexahedron* begin() |
|
|
{ |
|
|
return (&__cells[0]); |
|
|
} |
|
|
|
|
|
CartesianHexahedron* end() |
|
|
{ |
|
|
return (&__cells[0]+__cells.size()); |
|
|
} |
|
|
|
|
|
CartesianHexahedron const * begin() const |
|
|
{ |
|
|
return (&__cells[0]); |
|
|
} |
|
|
|
|
|
CartesianHexahedron const * end() const |
|
|
{ |
|
|
return (&__cells[0]+__cells.size()); |
|
|
} |
|
|
|
|
118 |
//! Writes the mesh to the OpenDX Mesh format |
//! Writes the mesh to the OpenDX Mesh format |
119 |
void plotOpenDX(std::ostream& fmesh, |
void plotOpenDX(std::ostream& fmesh, |
120 |
const std::string& CR) const; |
const std::string& CR) const; |
368 |
bool foundCell = inside(x,y,z); |
bool foundCell = inside(x,y,z); |
369 |
|
|
370 |
if (!foundCell) |
if (!foundCell) |
371 |
return 0; |
return Structured3DMesh::const_iterator(*this, |
372 |
|
Structured3DMesh::const_iterator::End); |
373 |
|
|
374 |
const real_t& x0 = __verticesShape.a(0); |
const real_t& x0 = __verticesShape.a(0); |
375 |
const real_t& y0 = __verticesShape.a(1); |
const real_t& y0 = __verticesShape.a(1); |
392 |
k = (k>nz_1) ? nz_1 : k; |
k = (k>nz_1) ? nz_1 : k; |
393 |
} |
} |
394 |
|
|
395 |
return &(__cells[__cellShape(i, j, k)]); |
return Structured3DMesh::const_iterator(*this, |
396 |
|
__cellShape(i, j, k)); |
397 |
} |
} |
398 |
|
|
399 |
#endif // _STRUCTURED_3D_MESH_HPP_ |
#endif // _STRUCTURED_3D_MESH_HPP_ |