/[ff3d]/ff3d/solver/Structured3DMesh.hpp
ViewVC logotype

Diff of /ff3d/solver/Structured3DMesh.hpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by delpinux, Fri Aug 8 08:39:56 2003 UTC revision 1.7 by delpinux, Wed Oct 22 17:08:28 2003 UTC
# Line 103  public: Line 103  public:
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,
# Line 115  public: Line 115  public:
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;
# Line 388  Structured3DMesh::find(const double& x, Line 368  Structured3DMesh::find(const double& x,
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);
# Line 411  Structured3DMesh::find(const double& x, Line 392  Structured3DMesh::find(const double& x,
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_

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26