-//---------------------------- dof_iterator_selector.h ---------------------------
+//----------------------------------------------------------------------
// $Id$
// Version: $Name$
//
// to the file deal.II/doc/license.html for the text and
// further information on this license.
//
-//---------------------------- dof_iterator_selector.h ---------------------------
+//----------------------------------------------------------------------
#ifndef __deal2__dof_iterators_h
#define __deal2__dof_iterators_h
template <int dim> class DoFHandler;
+namespace internal
+{
/**
* A pseudo class defining the iterator types used by DoFHandler and
* hp::DoFHandler. The typedefs in this class are synonymous with
* @ingroup Accessors
* @author W. Bangerth, G. Kanschat, O. Kayser-Herold, 1998, 2003, 2006
*/
-template <class DH>
-struct DoFIterators
-{
- /// The dof handler class.
- typedef DH DoFHandler_type;
- /// The topological dimension of the dof handler.
- static const unsigned int dim = DH::dimension;
+ template <class DH>
+ struct DoFIterators
+ {
+ /// The dof handler class.
+ typedef DH DoFHandler_type;
+ /// The topological dimension of the dof handler.
+ static const unsigned int dim = DH::dimension;
- /// Iterator for raw lines.
- typedef TriaRawIterator<dim, DoFObjectAccessor<1, DH> > raw_line_iterator;
- /// Iterator for usual lines.
- typedef TriaIterator<dim, DoFObjectAccessor<1, DH> > line_iterator;
- /// Iterator for active lines.
- typedef TriaActiveIterator<dim, DoFObjectAccessor<1, DH> > active_line_iterator;
- /// Iterator for raw quadrilaterals
- typedef TriaRawIterator<dim, DoFObjectAccessor<2, DH> > raw_quad_iterator;
- /// Iterator for quadrilaterals
- typedef TriaIterator<dim ,DoFObjectAccessor<2, DH> > quad_iterator;
- /// Iterator for active quadrilaterals
- typedef TriaActiveIterator<dim ,DoFObjectAccessor<2, DH> > active_quad_iterator;
- /// Iterator for raw hexahedra
- typedef TriaRawIterator<dim ,DoFObjectAccessor<3, DH> > raw_hex_iterator;
- /// Iterator for hexahedra
- typedef TriaIterator<dim ,DoFObjectAccessor<3, DH> > hex_iterator;
- /// Iterator for active hexahedra
- typedef TriaActiveIterator<dim ,DoFObjectAccessor<3, DH> > active_hex_iterator;
- /// Iterator for raw cells
- typedef TriaRawIterator<dim, DoFCellAccessor<DH> > raw_cell_iterator;
- /// Iterator for cells
- typedef TriaIterator<dim, DoFCellAccessor<DH> > cell_iterator;
- /// Iterator for active cells
- typedef TriaActiveIterator<dim, DoFCellAccessor<DH> > active_cell_iterator;
- /// Iterator for raw faces
- typedef TriaRawIterator<dim ,DoFObjectAccessor<dim-1, DH> > raw_face_iterator;
- /// Iterator for faces
- typedef TriaIterator<dim ,DoFObjectAccessor<dim-1, DH> > face_iterator;
- /// Iterator for active faces
- typedef TriaActiveIterator<dim ,DoFObjectAccessor<dim-1, DH> > active_face_iterator;
-};
+ /// Iterator for raw lines.
+ typedef TriaRawIterator<dim, DoFObjectAccessor<1, DH> > raw_line_iterator;
+ /// Iterator for usual lines.
+ typedef TriaIterator<dim, DoFObjectAccessor<1, DH> > line_iterator;
+ /// Iterator for active lines.
+ typedef TriaActiveIterator<dim, DoFObjectAccessor<1, DH> > active_line_iterator;
+ /// Iterator for raw quadrilaterals
+ typedef TriaRawIterator<dim, DoFObjectAccessor<2, DH> > raw_quad_iterator;
+ /// Iterator for quadrilaterals
+ typedef TriaIterator<dim ,DoFObjectAccessor<2, DH> > quad_iterator;
+ /// Iterator for active quadrilaterals
+ typedef TriaActiveIterator<dim ,DoFObjectAccessor<2, DH> > active_quad_iterator;
+ /// Iterator for raw hexahedra
+ typedef TriaRawIterator<dim ,DoFObjectAccessor<3, DH> > raw_hex_iterator;
+ /// Iterator for hexahedra
+ typedef TriaIterator<dim ,DoFObjectAccessor<3, DH> > hex_iterator;
+ /// Iterator for active hexahedra
+ typedef TriaActiveIterator<dim ,DoFObjectAccessor<3, DH> > active_hex_iterator;
+ /// Iterator for raw cells
+ typedef TriaRawIterator<dim, DoFCellAccessor<DH> > raw_cell_iterator;
+ /// Iterator for cells
+ typedef TriaIterator<dim, DoFCellAccessor<DH> > cell_iterator;
+ /// Iterator for active cells
+ typedef TriaActiveIterator<dim, DoFCellAccessor<DH> > active_cell_iterator;
+ /// Iterator for raw faces
+ typedef TriaRawIterator<dim ,DoFObjectAccessor<dim-1, DH> > raw_face_iterator;
+ /// Iterator for faces
+ typedef TriaIterator<dim ,DoFObjectAccessor<dim-1, DH> > face_iterator;
+ /// Iterator for active faces
+ typedef TriaActiveIterator<dim ,DoFObjectAccessor<dim-1, DH> > active_face_iterator;
+ };
*
* @author Wolfgang Bangerth, Oliver Kayser-Herold, 1998, 2003
*/
-template <template <int> class DH>
-struct DoFIterators<DH<1> >
-{
- typedef DH<1> DoFHandler_type;
+ template <template <int> class DH>
+ struct DoFIterators<DH<1> >
+ {
+ typedef DH<1> DoFHandler_type;
- typedef TriaRawIterator<1,DoFCellAccessor<DoFHandler_type> > raw_line_iterator;
- typedef TriaIterator<1,DoFCellAccessor<DoFHandler_type> > line_iterator;
- typedef TriaActiveIterator<1,DoFCellAccessor<DoFHandler_type> > active_line_iterator;
+ typedef TriaRawIterator<1,DoFCellAccessor<DoFHandler_type> > raw_line_iterator;
+ typedef TriaIterator<1,DoFCellAccessor<DoFHandler_type> > line_iterator;
+ typedef TriaActiveIterator<1,DoFCellAccessor<DoFHandler_type> > active_line_iterator;
- typedef void * raw_quad_iterator;
- typedef void * quad_iterator;
- typedef void * active_quad_iterator;
+ typedef void * raw_quad_iterator;
+ typedef void * quad_iterator;
+ typedef void * active_quad_iterator;
- typedef void * raw_hex_iterator;
- typedef void * hex_iterator;
- typedef void * active_hex_iterator;
+ typedef void * raw_hex_iterator;
+ typedef void * hex_iterator;
+ typedef void * active_hex_iterator;
- typedef raw_line_iterator raw_cell_iterator;
- typedef line_iterator cell_iterator;
- typedef active_line_iterator active_cell_iterator;
+ typedef raw_line_iterator raw_cell_iterator;
+ typedef line_iterator cell_iterator;
+ typedef active_line_iterator active_cell_iterator;
- typedef void * raw_face_iterator;
- typedef void * face_iterator;
- typedef void * active_face_iterator;
-};
+ typedef void * raw_face_iterator;
+ typedef void * face_iterator;
+ typedef void * active_face_iterator;
+ };
*
* @author Wolfgang Bangerth, Oliver Kayser-Herold, 1998, 2003
*/
-template <template <int> class DH>
-struct DoFIterators<DH<2> >
-{
- typedef DH<2> DoFHandler_type;
+ template <template <int> class DH>
+ struct DoFIterators<DH<2> >
+ {
+ typedef DH<2> DoFHandler_type;
- typedef TriaRawIterator<2,DoFObjectAccessor<1, DoFHandler_type> > raw_line_iterator;
- typedef TriaIterator<2,DoFObjectAccessor<1, DoFHandler_type> > line_iterator;
- typedef TriaActiveIterator<2,DoFObjectAccessor<1, DoFHandler_type> > active_line_iterator;
+ typedef TriaRawIterator<2,DoFObjectAccessor<1, DoFHandler_type> > raw_line_iterator;
+ typedef TriaIterator<2,DoFObjectAccessor<1, DoFHandler_type> > line_iterator;
+ typedef TriaActiveIterator<2,DoFObjectAccessor<1, DoFHandler_type> > active_line_iterator;
- typedef TriaRawIterator<2,DoFCellAccessor<DoFHandler_type> > raw_quad_iterator;
- typedef TriaIterator<2,DoFCellAccessor<DoFHandler_type> > quad_iterator;
- typedef TriaActiveIterator<2,DoFCellAccessor<DoFHandler_type> > active_quad_iterator;
+ typedef TriaRawIterator<2,DoFCellAccessor<DoFHandler_type> > raw_quad_iterator;
+ typedef TriaIterator<2,DoFCellAccessor<DoFHandler_type> > quad_iterator;
+ typedef TriaActiveIterator<2,DoFCellAccessor<DoFHandler_type> > active_quad_iterator;
- typedef void * raw_hex_iterator;
- typedef void * hex_iterator;
- typedef void * active_hex_iterator;
+ typedef void * raw_hex_iterator;
+ typedef void * hex_iterator;
+ typedef void * active_hex_iterator;
- typedef raw_quad_iterator raw_cell_iterator;
- typedef quad_iterator cell_iterator;
- typedef active_quad_iterator active_cell_iterator;
+ typedef raw_quad_iterator raw_cell_iterator;
+ typedef quad_iterator cell_iterator;
+ typedef active_quad_iterator active_cell_iterator;
- typedef raw_line_iterator raw_face_iterator;
- typedef line_iterator face_iterator;
- typedef active_line_iterator active_face_iterator;
-};
+ typedef raw_line_iterator raw_face_iterator;
+ typedef line_iterator face_iterator;
+ typedef active_line_iterator active_face_iterator;
+ };
typedef quad_iterator face_iterator;
typedef active_quad_iterator active_face_iterator;
};
+}
#endif // __deal2__dof_iterator_selector_h
// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 2003, 2004, 2005, 2006 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
{
/**
- * This class implements some types which differ between the
- * dimensions. Declare it to have a template parameter, but do not
- * actually declare anything concrete apart from the other classes
- * which are explicitly instantiated ones with the same name.
+ * Definition of the iterator types of the Triangulation.
*
- * @author Wolfgang Bangerth, 1998
+ * @note The actual definitions used are defined in specializations of
+ * this class. The template is just here for documentation and shows a
+ * generic case, while it is clear that for instance #quad_iterator is
+ * of no use in one dimension.
+ *
+ * @author Wolfgang Bangerth, Guido Kanschat, 1998, 2006
*/
template <int dim>
- struct TriaIteratorSelector
+ struct TriaIterators
{
+ /// Iterate on raw lines
+ typedef TriaRawIterator<dim,TriaObjectAccessor<1, dim> > raw_line_iterator;
+ /// Iterate on raw lines
+ typedef TriaIterator<dim,TriaObjectAccessor<1, dim> > line_iterator;
+ /// Iterate on raw lines
+ typedef TriaActiveIterator<dim,TriaObjectAccessor<1, dim> > active_line_iterator;
+
+ /// Iterate on raw quadrilaterals
+ typedef TriaRawIterator<dim,TriaObjectAccessor<2, dim> > raw_quad_iterator;
+ /// Iterate on quadrilaterals
+ typedef TriaIterator<dim,TriaObjectAccessor<2, dim> > quad_iterator;
+ /// Iterate on active quadrilaterals
+ typedef TriaActiveIterator<dim,TriaObjectAccessor<2, dim> > active_quad_iterator;
+
+ /// Iterate on raw hexahedra
+ typedef TriaRawIterator<dim,TriaObjectAccessor<3, dim> > raw_hex_iterator;
+ /// Iterate on hexahedra
+ typedef TriaIterator<dim,TriaObjectAccessor<3, dim> > hex_iterator;
+ /// Iterate on active hexahedra
+ typedef TriaActiveIterator<dim,TriaObjectAccessor<3, dim> > active_hex_iterator;
+
+ /// Iterate on raw cells
+ typedef TriaRawIterator<dim,CellAccessor<dim> > raw_cell_iterator;
+ /// Iterate on cells
+ typedef TriaIterator<dim,CellAccessor<dim> > cell_iterator;
+ /// Iterate on active cells
+ typedef TriaActiveIterator<dim,CellAccessor<dim> > active_cell_iterator;
+
+ /// Iterate on raw faces
+ typedef TriaRawIterator<dim,TriaObjectAccessor<dim-1, dim> > raw_face_iterator;
+ /// Iterate on faces
+ typedef TriaIterator<dim,TriaObjectAccessor<dim-1, dim> > face_iterator;
+ /// Iterate on active faces
+ typedef TriaActiveIterator<dim,TriaObjectAccessor<dim-1, dim> > active_face_iterator;
};
* @author Wolfgang Bangerth, 1998
*/
template <>
- struct TriaIteratorSelector<1>
+ struct TriaIterators<1>
{
typedef TriaRawIterator<1,CellAccessor<1> > raw_line_iterator;
typedef TriaIterator<1,CellAccessor<1> > line_iterator;
* @author Wolfgang Bangerth, 1998
*/
template <>
- struct TriaIteratorSelector<2>
+ struct TriaIterators<2>
{
typedef TriaRawIterator<2,TriaObjectAccessor<1, 2> > raw_line_iterator;
typedef TriaIterator<2,TriaObjectAccessor<1, 2> > line_iterator;
* These are the declararions for the 3D case only.
*
* For the declarations of the data types, more or less the same holds
- * as for lower dimensions (see <tt>TriaIteratorSelector<[12]></tt>). The
+ * as for lower dimensions (see <tt>TriaIterators<[12]></tt>). The
* dimension specific data types are here, since we are in three dimensions:
* @verbatim
* typedef raw_hex_iterator raw_cell_iterator;
* @author Wolfgang Bangerth, 1998
*/
template <>
- struct TriaIteratorSelector<3>
+ struct TriaIterators<3>
{
typedef TriaRawIterator<3,TriaObjectAccessor<1, 3> > raw_line_iterator;
typedef TriaIterator<3,TriaObjectAccessor<1, 3> > line_iterator;