*/
raw_cell_iterator end () const;
+ /**
+ * Return an iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ cell_iterator end (const unsigned int level) const;
+
+ /**
+ * Return a raw iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ raw_cell_iterator end_raw (const unsigned int level) const;
+
+ /**
+ * Return an active iterator which is the
+ * first iterator not on level. If #level#
+ * is the last level, then this returns
+ * #end()#.
+ */
+ active_cell_iterator end_active (const unsigned int level) const;
+
/**
* Return an iterator pointing to the
* last cell, used or not.
*/
raw_face_iterator end_face () const;
+ /**
+ * Return an iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ face_iterator end_face (const unsigned int level) const;
+
+ /**
+ * Return a raw iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ raw_face_iterator end_raw_face (const unsigned int level) const;
+
+ /**
+ * Return an active iterator which is the
+ * first iterator not on level. If #level#
+ * is the last level, then this returns
+ * #end()#.
+ */
+ active_face_iterator end_active_face (const unsigned int level) const;
+
/**
* Return an iterator pointing to the
* last face, used or not.
raw_line_iterator
end_line () const;
+ /**
+ * Return an iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ line_iterator end_line (const unsigned int level) const;
+
+ /**
+ * Return a raw iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ raw_line_iterator end_raw_line (const unsigned int level) const;
+
+ /**
+ * Return an active iterator which is the
+ * first iterator not on level. If #level#
+ * is the last level, then this returns
+ * #end()#.
+ */
+ active_line_iterator end_active_line (const unsigned int level) const;
+
+
/**
* Return an iterator pointing to the
* last line, used or not.
raw_quad_iterator
end_quad () const;
+ /**
+ * Return an iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ quad_iterator end_quad (const unsigned int level) const;
+
+ /**
+ * Return a raw iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ raw_quad_iterator end_raw_quad (const unsigned int level) const;
+
+ /**
+ * Return an active iterator which is the
+ * first iterator not on level. If #level#
+ * is the last level, then this returns
+ * #end()#.
+ */
+ active_quad_iterator end_active_quad (const unsigned int level) const;
+
+
/**
* Return an iterator pointing to the
* last quad, used or not.
template <int dim, class Accessor> class TriaActiveIterator;
template <int dim> class DoFHandler;
+template <int dim> class MGDoFHandler;
template <int dim> struct CellData;
struct SubCellData;
* template <int dim>
* int Triangulation<dim>::n_cells (const int level) const {
* cell_iterator cell = begin (level),
- * endc = (level == levels.size()-1 ?
- * cell_iterator(end()) :
- * begin (level+1));
+ * endc = end(level);
* int n=0;
* for (; cell!=endc; ++cell)
* ++n;
void load_user_flags_quad (const vector<bool> &v);
/*@}*/
+ /* ------------------------------------ */
/**
* @name Cell iterator functions
*/
raw_cell_iterator end () const;
+ /**
+ * Return an iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ cell_iterator end (const unsigned int level) const;
+
+ /**
+ * Return a raw iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ raw_cell_iterator end_raw (const unsigned int level) const;
+
+ /**
+ * Return an active iterator which is the
+ * first iterator not on level. If #level#
+ * is the last level, then this returns
+ * #end()#.
+ */
+ active_cell_iterator end_active (const unsigned int level) const;
+
+
/**
* Return an iterator pointing to the
* last cell, used or not.
*/
raw_face_iterator end_face () const;
+ /**
+ * Return an iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ face_iterator end_face (const unsigned int level) const;
+
+ /**
+ * Return a raw iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ raw_face_iterator end_raw_face (const unsigned int level) const;
+
+ /**
+ * Return an active iterator which is the
+ * first iterator not on level. If #level#
+ * is the last level, then this returns
+ * #end()#.
+ */
+ active_face_iterator end_active_face (const unsigned int level) const;
+
/**
* Return an iterator pointing to the
* last face, used or not.
raw_line_iterator
end_line () const;
+ /**
+ * Return an iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ line_iterator end_line (const unsigned int level) const;
+
+ /**
+ * Return a raw iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ raw_line_iterator end_raw_line (const unsigned int level) const;
+
+ /**
+ * Return an active iterator which is the
+ * first iterator not on level. If #level#
+ * is the last level, then this returns
+ * #end()#.
+ */
+ active_line_iterator end_active_line (const unsigned int level) const;
+
/**
* Return an iterator pointing to the
* last line, used or not.
raw_quad_iterator
end_quad () const;
+ /**
+ * Return an iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ quad_iterator end_quad (const unsigned int level) const;
+
+ /**
+ * Return a raw iterator which is the first
+ * iterator not on level. If #level# is
+ * the last level, then this returns
+ * #end()#.
+ */
+ raw_quad_iterator end_raw_quad (const unsigned int level) const;
+
+ /**
+ * Return an active iterator which is the
+ * first iterator not on level. If #level#
+ * is the last level, then this returns
+ * #end()#.
+ */
+ active_quad_iterator end_active_quad (const unsigned int level) const;
+
/**
* Return an iterator pointing to the
* last quad, used or not.
* rather than by returning a pre-stored
* value. It is therefore often better
* to rewrite lines like
- * #for (i=0; i<tria.n_cells(); ++i) ...#
+ * #for (i=0; i<tria.n_cells() const; ++i) ...#
* by
* #const unsigned int n=tria.n_cells();#
* #for (i=0; i<n; ++i) ...#.
friend class TriaRawIterator<2,CellAccessor<2> >;
friend class DoFHandler<dim>;
+ friend class MGDoFHandler<dim>;
};
+template <int dim>
+typename DoFDimensionInfo<dim>::raw_cell_iterator
+DoFHandler<dim>::end_raw (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ end() :
+ begin_raw (level+1));
+};
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::cell_iterator
+DoFHandler<dim>::end (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ cell_iterator(end()) :
+ begin (level+1));
+};
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::active_cell_iterator
+DoFHandler<dim>::end_active (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ active_cell_iterator(end()) :
+ begin_active (level+1));
+};
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::raw_face_iterator
+DoFHandler<dim>::end_raw_face (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ end_face() :
+ begin_raw_face (level+1));
+};
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::face_iterator
+DoFHandler<dim>::end_face (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ face_iterator(end_face()) :
+ begin_face (level+1));
+};
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::active_face_iterator
+DoFHandler<dim>::end_active_face (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ active_face_iterator(end_face()) :
+ begin_active_face (level+1));
+};
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::raw_line_iterator
+DoFHandler<dim>::end_raw_line (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ end_line() :
+ begin_raw_line (level+1));
+};
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::line_iterator
+DoFHandler<dim>::end_line (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ line_iterator(end_line()) :
+ begin_line (level+1));
+};
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::active_line_iterator
+DoFHandler<dim>::end_active_line (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ active_line_iterator(end_line()) :
+ begin_active_line (level+1));
+};
+
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::raw_quad_iterator
+DoFHandler<dim>::end_raw_quad (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ end_quad() :
+ begin_raw_quad (level+1));
+};
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::quad_iterator
+DoFHandler<dim>::end_quad (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ quad_iterator(end_quad()) :
+ begin_quad (level+1));
+};
+
+
+
+template <int dim>
+typename DoFDimensionInfo<dim>::active_quad_iterator
+DoFHandler<dim>::end_active_quad (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ active_quad_iterator(end_quad()) :
+ begin_active_quad (level+1));
+};
+
+
+
template <int dim>
typename DoFHandler<dim>::raw_line_iterator
DoFHandler<dim>::last_raw_line (const unsigned int level) const {
};
+
template <>
TriaDimensionInfo<1>::raw_cell_iterator
Triangulation<1>::end () const {
-
template <>
TriaDimensionInfo<2>::raw_cell_iterator
Triangulation<2>::end () const {
};
-
template <int dim>
typename TriaDimensionInfo<dim>::raw_line_iterator
Triangulation<dim>::end_line () const {
+template <int dim>
+typename TriaDimensionInfo<dim>::raw_cell_iterator
+Triangulation<dim>::end_raw (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ end() :
+ begin_raw (level+1));
+};
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::cell_iterator
+Triangulation<dim>::end (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ cell_iterator(end()) :
+ begin (level+1));
+};
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::active_cell_iterator
+Triangulation<dim>::end_active (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ active_cell_iterator(end()) :
+ begin_active (level+1));
+};
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::raw_face_iterator
+Triangulation<dim>::end_raw_face (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ end_face() :
+ begin_raw_face (level+1));
+};
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::face_iterator
+Triangulation<dim>::end_face (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ face_iterator(end_face()) :
+ begin_face (level+1));
+};
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::active_face_iterator
+Triangulation<dim>::end_active_face (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ active_face_iterator(end_face()) :
+ begin_active_face (level+1));
+};
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::raw_line_iterator
+Triangulation<dim>::end_raw_line (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ end_line() :
+ begin_raw_line (level+1));
+};
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::line_iterator
+Triangulation<dim>::end_line (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ line_iterator(end_line()) :
+ begin_line (level+1));
+};
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::active_line_iterator
+Triangulation<dim>::end_active_line (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ active_line_iterator(end_line()) :
+ begin_active_line (level+1));
+};
+
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::raw_quad_iterator
+Triangulation<dim>::end_raw_quad (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ end_quad() :
+ begin_raw_quad (level+1));
+};
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::quad_iterator
+Triangulation<dim>::end_quad (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ quad_iterator(end_quad()) :
+ begin_quad (level+1));
+};
+
+
+
+template <int dim>
+typename TriaDimensionInfo<dim>::active_quad_iterator
+Triangulation<dim>::end_active_quad (const unsigned int level) const {
+ return (level == levels.size()-1 ?
+ active_quad_iterator(end_quad()) :
+ begin_active_quad (level+1));
+};
+
+
+
+