]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move some parts of accessor implementations into namespace internal. Shouldn't be...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 14 Feb 2003 16:35:26 +0000 (16:35 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 14 Feb 2003 16:35:26 +0000 (16:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@7084 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/table.h
deal.II/doc/news/2002/c-3-4.html
deal.II/lac/include/lac/block_vector.h
deal.II/lac/include/lac/block_vector.templates.h
deal.II/lac/source/block_vector.cc

index 977213dc362b0e2558879e8ecd3074462af183bf..144c404d6956cf4a099c33c6d64c0bdbf1d13ab8 100644 (file)
@@ -33,7 +33,6 @@ template <typename T> class Table<6,T>;
 
 
 
-
 /**
  * Base class for an array of indices of fixed size used for the
  * @ref{TableBase} class. Actually, this class serves a dual purpose,
@@ -42,22 +41,22 @@ template <typename T> class Table<6,T>;
  *
  * @author Wolfgang Bangerth, 2002
  */
-template <int N>
-class TableIndicesBase
-{
-  public:
-                                     /**
-                                      * Access the value of the
-                                      * @p{i}th index.
-                                      */
-    unsigned int operator[] (const unsigned int i) const;
+  template <int N>
+  class TableIndicesBase
+  {
+    public:
+                                       /**
+                                        * Access the value of the
+                                        * @p{i}th index.
+                                        */
+      unsigned int operator[] (const unsigned int i) const;
     
-  protected:
-                                     /**
-                                      * Store the indices in an array.
-                                      */
-    unsigned indices[N];
-};
+    protected:
+                                       /**
+                                        * Store the indices in an array.
+                                        */
+      unsigned indices[N];
+  };
 
 
 /**
@@ -74,9 +73,10 @@ class TableIndicesBase
  *
  * @author Wolfgang Bangerth, 2002
  */
-template <int N>
-class TableIndices
-{};
+  template <int N>
+  class TableIndices
+  {
+  };
 
 
 
@@ -92,22 +92,22 @@ class TableIndices
  *
  * @author Wolfgang Bangerth, 2002
  */
-template <>
-class TableIndices<1> : public TableIndicesBase<1>
-{
-  public:
-                                     /**
-                                      * Default constructor. Set all
-                                      * indices to zero.
-                                      */
-    TableIndices ();
+  template <>
+  class TableIndices<1> : public TableIndicesBase<1>
+  {
+    public:
+                                       /**
+                                        * Default constructor. Set all
+                                        * indices to zero.
+                                        */
+      TableIndices ();
 
-                                     /**
-                                      * Constructor. Set indices to
-                                      * the given values.
-                                      */
-    TableIndices (const unsigned int index1);
-};
+                                       /**
+                                        * Constructor. Set indices to
+                                        * the given values.
+                                        */
+      TableIndices (const unsigned int index1);
+  };
 
 
 
@@ -122,23 +122,23 @@ class TableIndices<1> : public TableIndicesBase<1>
  *
  * @author Wolfgang Bangerth, 2002
  */
-template <>
-class TableIndices<2> : public TableIndicesBase<2>
-{
-  public:
-                                     /**
-                                      * Default constructor. Set all
-                                      * indices to zero.
-                                      */
-    TableIndices ();
+  template <>
+  class TableIndices<2> : public TableIndicesBase<2>
+  {
+    public:
+                                       /**
+                                        * Default constructor. Set all
+                                        * indices to zero.
+                                        */
+      TableIndices ();
 
-                                     /**
-                                      * Constructor. Set indices to
-                                      * the given values.
-                                      */
-    TableIndices (const unsigned int index1,
-                  const unsigned int index2);
-};
+                                       /**
+                                        * Constructor. Set indices to
+                                        * the given values.
+                                        */
+      TableIndices (const unsigned int index1,
+                    const unsigned int index2);
+  };
 
 
 
@@ -153,24 +153,24 @@ class TableIndices<2> : public TableIndicesBase<2>
  *
  * @author Wolfgang Bangerth, 2002
  */
-template <>
-class TableIndices<3> : public TableIndicesBase<3>
-{
-  public:
-                                     /**
-                                      * Default constructor. Set all
-                                      * indices to zero.
-                                      */
-    TableIndices ();
+  template <>
+  class TableIndices<3> : public TableIndicesBase<3>
+  {
+    public:
+                                       /**
+                                        * Default constructor. Set all
+                                        * indices to zero.
+                                        */
+      TableIndices ();
 
-                                     /**
-                                      * Constructor. Set indices to
-                                      * the given values.
-                                      */
-    TableIndices (const unsigned int index1,
-                  const unsigned int index2,
-                  const unsigned int index3);
-};
+                                       /**
+                                        * Constructor. Set indices to
+                                        * the given values.
+                                        */
+      TableIndices (const unsigned int index1,
+                    const unsigned int index2,
+                    const unsigned int index3);
+  };
 
 
 /**
@@ -184,25 +184,25 @@ class TableIndices<3> : public TableIndicesBase<3>
  *
  * @author Wolfgang Bangerth, Ralf Hartmann 2002
  */
-template <>
-class TableIndices<4> : public TableIndicesBase<4>
-{
-  public:
-                                     /**
-                                      * Default constructor. Set all
-                                      * indices to zero.
-                                      */
-    TableIndices ();
+  template <>
+  class TableIndices<4> : public TableIndicesBase<4>
+  {
+    public:
+                                       /**
+                                        * Default constructor. Set all
+                                        * indices to zero.
+                                        */
+      TableIndices ();
 
-                                     /**
-                                      * Constructor. Set indices to
-                                      * the given values.
-                                      */
-    TableIndices (const unsigned int index1,
-                  const unsigned int index2,
-                  const unsigned int index3,
-                 const unsigned int index4);
-};
+                                       /**
+                                        * Constructor. Set indices to
+                                        * the given values.
+                                        */
+      TableIndices (const unsigned int index1,
+                    const unsigned int index2,
+                    const unsigned int index3,
+                    const unsigned int index4);
+  };
 
 
 /**
@@ -216,26 +216,26 @@ class TableIndices<4> : public TableIndicesBase<4>
  *
  * @author Wolfgang Bangerth, Ralf Hartmann 2002
  */
-template <>
-class TableIndices<5> : public TableIndicesBase<5>
-{
-  public:
-                                     /**
-                                      * Default constructor. Set all
-                                      * indices to zero.
-                                      */
-    TableIndices ();
+  template <>
+  class TableIndices<5> : public TableIndicesBase<5>
+  {
+    public:
+                                       /**
+                                        * Default constructor. Set all
+                                        * indices to zero.
+                                        */
+      TableIndices ();
 
-                                     /**
-                                      * Constructor. Set indices to
-                                      * the given values.
-                                      */
-    TableIndices (const unsigned int index1,
-                  const unsigned int index2,
-                  const unsigned int index3,
-                 const unsigned int index4,
-                 const unsigned int index5);
-};
+                                       /**
+                                        * Constructor. Set indices to
+                                        * the given values.
+                                        */
+      TableIndices (const unsigned int index1,
+                    const unsigned int index2,
+                    const unsigned int index3,
+                    const unsigned int index4,
+                    const unsigned int index5);
+  };
 
 
 /**
@@ -249,28 +249,31 @@ class TableIndices<5> : public TableIndicesBase<5>
  *
  * @author Wolfgang Bangerth, Ralf Hartmann 2002
  */
-template <>
-class TableIndices<6> : public TableIndicesBase<6>
-{
-  public:
-                                     /**
-                                      * Default constructor. Set all
-                                      * indices to zero.
-                                      */
-    TableIndices ();
+  template <>
+  class TableIndices<6> : public TableIndicesBase<6>
+  {
+    public:
+                                       /**
+                                        * Default constructor. Set all
+                                        * indices to zero.
+                                        */
+      TableIndices ();
+
+                                       /**
+                                        * Constructor. Set indices to
+                                        * the given values.
+                                        */
+      TableIndices (const unsigned int index1,
+                    const unsigned int index2,
+                    const unsigned int index3,
+                    const unsigned int index4,
+                    const unsigned int index5,
+                    const unsigned int index6);
+  };
 
-                                     /**
-                                      * Constructor. Set indices to
-                                      * the given values.
-                                      */
-    TableIndices (const unsigned int index1,
-                  const unsigned int index2,
-                  const unsigned int index3,
-                 const unsigned int index4,
-                 const unsigned int index5,
-                 const unsigned int index6);
-};
 
+namespace internal
+{
 
 /**
  * Have a namespace in which we declare some classes that are used to
@@ -289,8 +292,8 @@ class TableIndices<6> : public TableIndicesBase<6>
  *
  * @author Wolfgang Bangerth, 2002
  */
-namespace TableBaseAccessors
-{
+  namespace TableBaseAccessors
+  {
 /**
  * Have a class which declares some nested typedefs, depending on its
  * template parameters. The general template declares nothing, but
@@ -298,31 +301,31 @@ namespace TableBaseAccessors
  * indicating constness of the table for which accessor objects are to
  * be generated in this namespace.
  */
-  template <int N, typename T, bool Constness>
-  class Types
-  {};
+    template <int N, typename T, bool Constness>
+    class Types
+    {};
 
 /**
  * Have a class which declares some nested typedefs, depending on its
  * template parameters. Specialization for accessors to constant
  * objects.
  */
-  template <int N, typename T> struct Types<N,T,true> 
-  {
-      typedef const T value_type;
-      typedef const TableBase<N,T> TableType;
-  };
+    template <int N, typename T> struct Types<N,T,true> 
+    {
+        typedef const T value_type;
+        typedef const TableBase<N,T> TableType;
+    };
 
 /**
  * Have a class which declares some nested typedefs, depending on its
  * template parameters. Specialization for accessors to non-constant
  * objects.
  */
-  template <int N, typename T> struct Types<N,T,false> 
-  {
-      typedef T value_type;
-      typedef TableBase<N,T> TableType;
-  };
+    template <int N, typename T> struct Types<N,T,false> 
+    {
+        typedef T value_type;
+        typedef TableBase<N,T> TableType;
+    };
   
 
 /**
@@ -363,104 +366,104 @@ namespace TableBaseAccessors
  * 
  * @author Wolfgang Bangerth, 2002
  */
-  template <int N, typename T, bool C, unsigned int P>
-  class Accessor
-  {
-    public:
-                                       /**
-                                        * Import two typedefs from the
-                                        * switch class above.
-                                        */
-      typedef typename Types<N,T,C>::value_type * pointer;      
-      typedef typename Types<N,T,C>::TableType    TableType;
-
-    private:
-                                       /**
-                                        * Constructor. Take a pointer
-                                        * to the table object to know
-                                        * about the sizes of the
-                                        * various dimensions, and a
-                                        * pointer to the subset of
-                                        * data we may access.
-                                        *
-                                        * The constructor is made
-                                        * private in order to prevent
-                                        * you having such objects
-                                        * around. The only way to
-                                        * create such objects is via
-                                        * the @p{Table} class, which
-                                        * only generates them as
-                                        * temporary objects. This
-                                        * guarantees that the accessor
-                                        * objects go out of scope
-                                        * earlier than the mother
-                                        * object, avoid problems with
-                                        * data consistency.
-                                        */
-      Accessor (const TableType &table,
-                const pointer    data);
-
-                                       /**
-                                        * Default constructor. Not
-                                        * needed, and invisible, so
-                                        * private.
-                                        */
-      Accessor ();
-                                       /**
-                                        * Copy constructor. Not
-                                        * needed, and invisible, so
-                                        * private.
-                                        */
-      Accessor (const Accessor &a);
-
-    public:
+    template <int N, typename T, bool C, unsigned int P>
+    class Accessor
+    {
+      public:
+                                         /**
+                                          * Import two typedefs from the
+                                          * switch class above.
+                                          */
+        typedef typename Types<N,T,C>::value_type * pointer;      
+        typedef typename Types<N,T,C>::TableType    TableType;
+
+      private:
+                                         /**
+                                          * Constructor. Take a pointer
+                                          * to the table object to know
+                                          * about the sizes of the
+                                          * various dimensions, and a
+                                          * pointer to the subset of
+                                          * data we may access.
+                                          *
+                                          * The constructor is made
+                                          * private in order to prevent
+                                          * you having such objects
+                                          * around. The only way to
+                                          * create such objects is via
+                                          * the @p{Table} class, which
+                                          * only generates them as
+                                          * temporary objects. This
+                                          * guarantees that the accessor
+                                          * objects go out of scope
+                                          * earlier than the mother
+                                          * object, avoid problems with
+                                          * data consistency.
+                                          */
+        Accessor (const TableType &table,
+                  const pointer    data);
+
+                                         /**
+                                          * Default constructor. Not
+                                          * needed, and invisible, so
+                                          * private.
+                                          */
+        Accessor ();
+                                         /**
+                                          * Copy constructor. Not
+                                          * needed, and invisible, so
+                                          * private.
+                                          */
+        Accessor (const Accessor &a);
+
+      public:
       
-                                       /**
-                                        * Index operator. Performs a
-                                        * range check.
-                                        */
-      Accessor<N,T,C,P-1> operator [] (const unsigned int i) const;
-
-                                       /**
-                                        * Exception for range
-                                        * check. Do not use global
-                                        * exception since this way we
-                                        * can output which index is
-                                        * the wrong one.
-                                        */
-      DeclException3 (ExcIndexRange, int, int, int,
-                      << "The " << N-P+1 << "th index has a value of "
-                      << arg1 << " but needs to be in the range ["
-                      << arg2 << "," << arg3 << "[");
-    private:
-                                       /**
-                                        * Store the data given to the
-                                        * constructor. There are no
-                                        * non-const member functions
-                                        * of this class, so there is
-                                        * no reason not to make these
-                                        * elements constant.
-                                        */
-      const TableType &table;
-      const pointer   data;
-
-                                       // declare some other classes
-                                       // as friends. make sure to
-                                       // work around bugs in some
-                                       // compilers
+                                         /**
+                                          * Index operator. Performs a
+                                          * range check.
+                                          */
+        Accessor<N,T,C,P-1> operator [] (const unsigned int i) const;
+
+                                         /**
+                                          * Exception for range
+                                          * check. Do not use global
+                                          * exception since this way we
+                                          * can output which index is
+                                          * the wrong one.
+                                          */
+        DeclException3 (ExcIndexRange, int, int, int,
+                        << "The " << N-P+1 << "th index has a value of "
+                        << arg1 << " but needs to be in the range ["
+                        << arg2 << "," << arg3 << "[");
+      private:
+                                         /**
+                                          * Store the data given to the
+                                          * constructor. There are no
+                                          * non-const member functions
+                                          * of this class, so there is
+                                          * no reason not to make these
+                                          * elements constant.
+                                          */
+        const TableType &table;
+        const pointer   data;
+
+                                         // declare some other classes
+                                         // as friends. make sure to
+                                         // work around bugs in some
+                                         // compilers
 #ifndef DEAL_II_NAMESP_TEMPL_FRIEND_BUG      
-      template <int N1, typename T1> friend class Table;
-      template <int N1, typename T1, bool C1, unsigned int P1>
-      friend class Accessor;
+        template <int N1, typename T1> friend class Table;
+        template <int N1, typename T1, bool C1, unsigned int P1>
+        friend class Accessor;
 #  ifndef DEAL_II_TEMPL_SPEC_FRIEND_BUG
-      friend class Table<N,T>;
-      friend class Accessor<N,T,C,P+1>;
+        friend class Table<N,T>;
+        friend class Accessor<N,T,C,P+1>;
 #  endif
 #else
-      friend class Table<N,T>;
-      friend class Accessor<N,T,C,P+1>;
+        friend class Table<N,T>;
+        friend class Accessor<N,T,C,P+1>;
 #endif
-  };
+    };
 
 
   
@@ -473,150 +476,151 @@ namespace TableBaseAccessors
  *
  * @author Wolfgang Bangerth, 2002
  */
-  template <int N, typename T, bool C>
-  class Accessor<N,T,C,1>
-  {
-    public:
-                                       /**
-                                        * Typedef constant and
-                                        * non-constant iterator
-                                        * types to the elements of
-                                        * this row, as well as all
-                                        * the other types usually
-                                        * required for the standard
-                                        * library algorithms.
-                                        */
-      typedef typename Types<N,T,C>::value_type value_type;
-      typedef value_type* pointer;
-      typedef const value_type* const_pointer;
-      typedef value_type* iterator;
-      typedef const value_type* const_iterator;
-      typedef value_type& reference;
-      typedef const value_type& const_reference;
-      typedef size_t size_type;
-      typedef ptrdiff_t difference_type;
-
-                                       /**
-                                        * Import a typedef from the
-                                        * switch class above.
-                                        */
-      typedef typename Types<N,T,C>::TableType    TableType;
-
-    private:
+    template <int N, typename T, bool C>
+    class Accessor<N,T,C,1>
+    {
+      public:
+                                         /**
+                                          * Typedef constant and
+                                          * non-constant iterator
+                                          * types to the elements of
+                                          * this row, as well as all
+                                          * the other types usually
+                                          * required for the standard
+                                          * library algorithms.
+                                          */
+        typedef typename Types<N,T,C>::value_type value_type;
+        typedef value_type* pointer;
+        typedef const value_type* const_pointer;
+        typedef value_type* iterator;
+        typedef const value_type* const_iterator;
+        typedef value_type& reference;
+        typedef const value_type& const_reference;
+        typedef size_t size_type;
+        typedef ptrdiff_t difference_type;
+
+                                         /**
+                                          * Import a typedef from the
+                                          * switch class above.
+                                          */
+        typedef typename Types<N,T,C>::TableType    TableType;
+
+      private:
       
-                                       /**
-                                        * Constructor. Take a pointer
-                                        * to the table object to know
-                                        * about the sizes of the
-                                        * various dimensions, and a
-                                        * pointer to the subset of
-                                        * data we may access (which in
-                                        * this particular case is only
-                                        * one row).
-                                        *
-                                        * The constructor is made
-                                        * private in order to prevent
-                                        * you having such objects
-                                        * around. The only way to
-                                        * create such objects is via
-                                        * the @p{Table} class, which
-                                        * only generates them as
-                                        * temporary objects. This
-                                        * guarantees that the accessor
-                                        * objects go out of scope
-                                        * earlier than the mother
-                                        * object, avoid problems with
-                                        * data consistency.
-                                        */
-      Accessor (const TableType &table,
-                const pointer    data);
-
-                                       /**
-                                        * Default constructor. Not
-                                        * needed, and invisible, so
-                                        * private.
-                                        */
-      Accessor ();
-
-                                       /**
-                                        * Copy constructor. Not
-                                        * needed, and invisible, so
-                                        * private.
-                                        */
-      Accessor (const Accessor &a);
-
-    public:
+                                         /**
+                                          * Constructor. Take a pointer
+                                          * to the table object to know
+                                          * about the sizes of the
+                                          * various dimensions, and a
+                                          * pointer to the subset of
+                                          * data we may access (which in
+                                          * this particular case is only
+                                          * one row).
+                                          *
+                                          * The constructor is made
+                                          * private in order to prevent
+                                          * you having such objects
+                                          * around. The only way to
+                                          * create such objects is via
+                                          * the @p{Table} class, which
+                                          * only generates them as
+                                          * temporary objects. This
+                                          * guarantees that the accessor
+                                          * objects go out of scope
+                                          * earlier than the mother
+                                          * object, avoid problems with
+                                          * data consistency.
+                                          */
+        Accessor (const TableType &table,
+                  const pointer    data);
+
+                                         /**
+                                          * Default constructor. Not
+                                          * needed, and invisible, so
+                                          * private.
+                                          */
+        Accessor ();
+
+                                         /**
+                                          * Copy constructor. Not
+                                          * needed, and invisible, so
+                                          * private.
+                                          */
+        Accessor (const Accessor &a);
+
+      public:
       
-                                       /**
-                                        * Index operator. Performs a
-                                        * range check.
-                                        */
-      reference operator [] (const unsigned int) const;
+                                         /**
+                                          * Index operator. Performs a
+                                          * range check.
+                                          */
+        reference operator [] (const unsigned int) const;
       
-                                       /**
-                                        * Return the length of one row,
-                                        * i.e. the number of elements
-                                        * corresponding to the last
-                                        * index of the table object.
-                                        */
-      unsigned int size () const;
+                                         /**
+                                          * Return the length of one row,
+                                          * i.e. the number of elements
+                                          * corresponding to the last
+                                          * index of the table object.
+                                          */
+        unsigned int size () const;
         
-                                       /**
-                                        * Return an iterator to the
-                                        * first element of this
-                                        * row.
-                                        */
-      iterator begin () const;
+                                         /**
+                                          * Return an iterator to the
+                                          * first element of this
+                                          * row.
+                                          */
+        iterator begin () const;
       
-                                       /**
-                                        * Return an interator to the
-                                        * element past the end of
-                                        * this row.
-                                        */
-      iterator end () const;
+                                         /**
+                                          * Return an interator to the
+                                          * element past the end of
+                                          * this row.
+                                          */
+        iterator end () const;
       
-                                       /**
-                                        * Exception for range
-                                        * check. Do not use global
-                                        * exception since this way we
-                                        * can output which index is
-                                        * the wrong one.
-                                        */
-      DeclException3 (ExcIndexRange, int, int, int,
-                      << "The " << N << "th index has a value of "
-                      << arg1 << " but needs to be in the range ["
-                      << arg2 << "," << arg3 << "[");
-    private:
-                                       /**
-                                        * Store the data given to the
-                                        * constructor. There are no
-                                        * non-const member functions
-                                        * of this class, so there is
-                                        * no reason not to make these
-                                        * elements constant.
-                                        */
-      const TableType &table;
-      const pointer   data;
-
-                                       // declare some other classes
-                                       // as friends. make sure to
-                                       // work around bugs in some
-                                       // compilers
+                                         /**
+                                          * Exception for range
+                                          * check. Do not use global
+                                          * exception since this way we
+                                          * can output which index is
+                                          * the wrong one.
+                                          */
+        DeclException3 (ExcIndexRange, int, int, int,
+                        << "The " << N << "th index has a value of "
+                        << arg1 << " but needs to be in the range ["
+                        << arg2 << "," << arg3 << "[");
+      private:
+                                         /**
+                                          * Store the data given to the
+                                          * constructor. There are no
+                                          * non-const member functions
+                                          * of this class, so there is
+                                          * no reason not to make these
+                                          * elements constant.
+                                          */
+        const TableType &table;
+        const pointer   data;
+
+                                         // declare some other classes
+                                         // as friends. make sure to
+                                         // work around bugs in some
+                                         // compilers
 #ifndef DEAL_II_NAMESP_TEMPL_FRIEND_BUG
-      template <int N1, typename T1> friend class Table;
-      template <int N1, typename T1, bool C1, unsigned int P1>
-      friend class Accessor;
+        template <int N1, typename T1> friend class Table;
+        template <int N1, typename T1, bool C1, unsigned int P1>
+        friend class Accessor;
 #  ifndef DEAL_II_TEMPL_SPEC_FRIEND_BUG
-      friend class Table<2,T>;
-      friend class Accessor<N,T,C,2>;
+        friend class Table<2,T>;
+        friend class Accessor<N,T,C,2>;
 #  endif
 #else
-      friend class Table<2,T>;
-      friend class Accessor<N,T,C,2>;
+        friend class Table<2,T>;
+        friend class Accessor<N,T,C,2>;
 #endif
-  };
-}
+    };
+  }
   
+} // namespace internal
 
 
 
@@ -1071,7 +1075,7 @@ class Table<2,T> : public TableBase<2,T>
                                       * This version of the function
                                       * only allows read access.
                                       */
-    TableBaseAccessors::Accessor<2,T,true,1>
+    internal::TableBaseAccessors::Accessor<2,T,true,1>
     operator [] (const unsigned int i) const;
 
                                      /**
@@ -1084,7 +1088,7 @@ class Table<2,T> : public TableBase<2,T>
                                       * This version of the function
                                       * allows read-write access.
                                       */
-    TableBaseAccessors::Accessor<2,T,false,1>
+    internal::TableBaseAccessors::Accessor<2,T,false,1>
     operator [] (const unsigned int i);
 
                                      /**
@@ -1217,7 +1221,7 @@ class Table<3,T> : public TableBase<3,T>
                                       * This version of the function
                                       * only allows read access.
                                       */
-    TableBaseAccessors::Accessor<3,T,true,2>
+    internal::TableBaseAccessors::Accessor<3,T,true,2>
     operator [] (const unsigned int i) const;
 
                                      /**
@@ -1231,7 +1235,7 @@ class Table<3,T> : public TableBase<3,T>
                                       * This version of the function
                                       * allows read-write access.
                                       */
-    TableBaseAccessors::Accessor<3,T,false,2>
+    internal::TableBaseAccessors::Accessor<3,T,false,2>
     operator [] (const unsigned int i);
 
                                      /**
@@ -1304,7 +1308,7 @@ class Table<4,T> : public TableBase<4,T>
                                       * This version of the function
                                       * only allows read access.
                                       */
-    TableBaseAccessors::Accessor<4,T,true,3>
+    internal::TableBaseAccessors::Accessor<4,T,true,3>
     operator [] (const unsigned int i) const;
 
                                      /**
@@ -1318,7 +1322,7 @@ class Table<4,T> : public TableBase<4,T>
                                       * This version of the function
                                       * allows read-write access.
                                       */
-    TableBaseAccessors::Accessor<4,T,false,3>
+    internal::TableBaseAccessors::Accessor<4,T,false,3>
     operator [] (const unsigned int i);
 
                                      /**
@@ -1394,7 +1398,7 @@ class Table<5,T> : public TableBase<5,T>
                                       * This version of the function
                                       * only allows read access.
                                       */
-    TableBaseAccessors::Accessor<5,T,true,4>
+    internal::TableBaseAccessors::Accessor<5,T,true,4>
     operator [] (const unsigned int i) const;
 
                                      /**
@@ -1408,7 +1412,7 @@ class Table<5,T> : public TableBase<5,T>
                                       * This version of the function
                                       * allows read-write access.
                                       */
-    TableBaseAccessors::Accessor<5,T,false,4>
+    internal::TableBaseAccessors::Accessor<5,T,false,4>
     operator [] (const unsigned int i);
 
                                      /**
@@ -1487,7 +1491,7 @@ class Table<6,T> : public TableBase<6,T>
                                       * This version of the function
                                       * only allows read access.
                                       */
-    TableBaseAccessors::Accessor<6,T,true,5>
+    internal::TableBaseAccessors::Accessor<6,T,true,5>
     operator [] (const unsigned int i) const;
 
                                      /**
@@ -1501,7 +1505,7 @@ class Table<6,T> : public TableBase<6,T>
                                       * This version of the function
                                       * allows read-write access.
                                       */
-    TableBaseAccessors::Accessor<6,T,false,5>
+    internal::TableBaseAccessors::Accessor<6,T,false,5>
     operator [] (const unsigned int i);
 
                                      /**
@@ -1730,156 +1734,159 @@ TableBase<N,T>::TableBase (const TableBase<N,T2> &src)
 
 
 
-namespace TableBaseAccessors 
+namespace internal
 {
-  template <int N, typename T, bool C, unsigned int P>
-  inline
-  Accessor<N,T,C,P>::Accessor (const TableType &table,
-                               const pointer    data)
-                  :
-                  table (table),
-                  data (data)
-  {}
-
-
-
-  template <int N, typename T, bool C, unsigned int P>
-  inline
-  Accessor<N,T,C,P>::Accessor (const Accessor &)
-                  :
-                  table (*static_cast<const TableType*>(0)),
-                  data (0)
+  namespace TableBaseAccessors 
   {
-                                     // accessor objects are only
-                                     // temporary objects, so should
-                                     // not need to be copied around
-    Assert (false, ExcInternalError());
-  }
+    template <int N, typename T, bool C, unsigned int P>
+    inline
+    Accessor<N,T,C,P>::Accessor (const TableType &table,
+                                 const pointer    data)
+                    :
+                    table (table),
+                    data (data)
+    {}
+
+
+
+    template <int N, typename T, bool C, unsigned int P>
+    inline
+    Accessor<N,T,C,P>::Accessor (const Accessor &)
+                    :
+                    table (*static_cast<const TableType*>(0)),
+                    data (0)
+    {
+                                       // accessor objects are only
+                                       // temporary objects, so should
+                                       // not need to be copied around
+      Assert (false, ExcInternalError());
+    }
   
 
   
-  template <int N, typename T, bool C, unsigned int P>
-  inline
-  Accessor<N,T,C,P>::Accessor ()
-                  :
-                  table (*static_cast<const TableType*>(0)),
-                  data (0)
-  {
-                                     // accessor objects are only
-                                     // temporary objects, so should
-                                     // not need to be copied around
-    Assert (false, ExcInternalError());
-  }
+    template <int N, typename T, bool C, unsigned int P>
+    inline
+    Accessor<N,T,C,P>::Accessor ()
+                    :
+                    table (*static_cast<const TableType*>(0)),
+                    data (0)
+    {
+                                       // accessor objects are only
+                                       // temporary objects, so should
+                                       // not need to be copied around
+      Assert (false, ExcInternalError());
+    }
   
 
   
-  template <int N, typename T, bool C, unsigned int P>
-  inline
-  Accessor<N,T,C,P-1>
-  Accessor<N,T,C,P>::operator [] (const unsigned int i) const 
-  {
-    Assert (i < table.size()[N-P],
-            ExcIndexRange (i, 0, table.size()[N-P]));
-
-                                     // access i-th
-                                     // subobject. optimize on the
-                                     // case i==0
-    if (i==0)
-      return Accessor<N,T,C,P-1> (table, data);
-    else 
-      {
-                                         // note: P>1, otherwise the
-                                         // specialization would have
-                                         // been taken!
-        unsigned int subobject_size = table.size()[N-1];
-        for (int p=P-1; p>1; --p)
-          subobject_size *= table.size()[N-p];
-        const pointer new_data = data + i*subobject_size;
-        return Accessor<N,T,C,P-1> (table, new_data);
-      };
-  }
-
-
-
-  template <int N, typename T, bool C>
-  inline
-  Accessor<N,T,C,1>::Accessor (const TableType &table,
-                               const pointer    data)
-                  :
-                  table (table),
-                  data (data)
-  {}
-
-
-
-  template <int N, typename T, bool C>
-  inline
-  Accessor<N,T,C,1>::Accessor ()
-                  :
-                  table (*static_cast<const TableType*>(0)),
-                  data (0)
-  {
-                                     // accessor objects are only
-                                     // temporary objects, so should
-                                     // not need to be copied around
-    Assert (false, ExcInternalError());
-  }
+    template <int N, typename T, bool C, unsigned int P>
+    inline
+    Accessor<N,T,C,P-1>
+    Accessor<N,T,C,P>::operator [] (const unsigned int i) const 
+    {
+      Assert (i < table.size()[N-P],
+              ExcIndexRange (i, 0, table.size()[N-P]));
+
+                                       // access i-th
+                                       // subobject. optimize on the
+                                       // case i==0
+      if (i==0)
+        return Accessor<N,T,C,P-1> (table, data);
+      else 
+        {
+                                           // note: P>1, otherwise the
+                                           // specialization would have
+                                           // been taken!
+          unsigned int subobject_size = table.size()[N-1];
+          for (int p=P-1; p>1; --p)
+            subobject_size *= table.size()[N-p];
+          const pointer new_data = data + i*subobject_size;
+          return Accessor<N,T,C,P-1> (table, new_data);
+        };
+    }
+
+
+
+    template <int N, typename T, bool C>
+    inline
+    Accessor<N,T,C,1>::Accessor (const TableType &table,
+                                 const pointer    data)
+                    :
+                    table (table),
+                    data (data)
+    {}
+
+
+
+    template <int N, typename T, bool C>
+    inline
+    Accessor<N,T,C,1>::Accessor ()
+                    :
+                    table (*static_cast<const TableType*>(0)),
+                    data (0)
+    {
+                                       // accessor objects are only
+                                       // temporary objects, so should
+                                       // not need to be copied around
+      Assert (false, ExcInternalError());
+    }
   
 
 
-  template <int N, typename T, bool C>
-  inline
-  Accessor<N,T,C,1>::Accessor (const Accessor &)
-                  :
-                  table (*static_cast<const TableType*>(0)),
-                  data (0)
-  {
-                                     // accessor objects are only
-                                     // temporary objects, so should
-                                     // not need to be copied around
-    Assert (false, ExcInternalError());
-  }
+    template <int N, typename T, bool C>
+    inline
+    Accessor<N,T,C,1>::Accessor (const Accessor &)
+                    :
+                    table (*static_cast<const TableType*>(0)),
+                    data (0)
+    {
+                                       // accessor objects are only
+                                       // temporary objects, so should
+                                       // not need to be copied around
+      Assert (false, ExcInternalError());
+    }
 
 
   
-  template <int N, typename T, bool C>
-  inline
-  typename Accessor<N,T,C,1>::reference
-  Accessor<N,T,C,1>::operator [] (const unsigned int i) const 
-  {
-    Assert (i < table.size()[N-1],
-            ExcIndexRange (i, 0, table.size()[N-1]));
-    return data[i];
-  }
+    template <int N, typename T, bool C>
+    inline
+    typename Accessor<N,T,C,1>::reference
+    Accessor<N,T,C,1>::operator [] (const unsigned int i) const 
+    {
+      Assert (i < table.size()[N-1],
+              ExcIndexRange (i, 0, table.size()[N-1]));
+      return data[i];
+    }
 
 
   
-  template <int N, typename T, bool C>
-  inline
-  unsigned int
-  Accessor<N,T,C,1>::size () const
-  {
-    return table.size()[N-1];
-  }
+    template <int N, typename T, bool C>
+    inline
+    unsigned int
+    Accessor<N,T,C,1>::size () const
+    {
+      return table.size()[N-1];
+    }
 
 
 
-  template <int N, typename T, bool C>
-  inline
-  typename Accessor<N,T,C,1>::iterator
-  Accessor<N,T,C,1>::begin () const
-  {
-    return data;
-  }
+    template <int N, typename T, bool C>
+    inline
+    typename Accessor<N,T,C,1>::iterator
+    Accessor<N,T,C,1>::begin () const
+    {
+      return data;
+    }
 
 
 
-  template <int N, typename T, bool C>
-  inline
-  typename Accessor<N,T,C,1>::iterator
-  Accessor<N,T,C,1>::end () const
-  {
-    return data+table.size()[N-1];
+    template <int N, typename T, bool C>
+    inline
+    typename Accessor<N,T,C,1>::iterator
+    Accessor<N,T,C,1>::end () const
+    {
+      return data+table.size()[N-1];
+    }
   }
 }
 
@@ -2204,26 +2211,26 @@ Table<2,T>::reinit (const unsigned int size1,
 
 template <typename T>
 inline
-TableBaseAccessors::Accessor<2,T,true,1>
+internal::TableBaseAccessors::Accessor<2,T,true,1>
 Table<2,T>::operator [] (const unsigned int i) const
 {
   Assert (i < this->table_size[0],
           ExcIndexRange (i, 0, this->table_size[0]));
-  return TableBaseAccessors::Accessor<2,T,true,1>(*this,
-                                                  this->val+i*n_cols());
+  return internal::TableBaseAccessors::Accessor<2,T,true,1>(*this,
+                                                            this->val+i*n_cols());
 }
 
 
 
 template <typename T>
 inline
-TableBaseAccessors::Accessor<2,T,false,1>
+internal::TableBaseAccessors::Accessor<2,T,false,1>
 Table<2,T>::operator [] (const unsigned int i)
 {
   Assert (i < this->table_size[0],
           ExcIndexRange (i, 0, this->table_size[0]));
-  return TableBaseAccessors::Accessor<2,T,false,1>(*this,
-                                                   this->val+i*n_cols());
+  return internal::TableBaseAccessors::Accessor<2,T,false,1>(*this,
+                                                             this->val+i*n_cols());
 }
 
 
@@ -2320,14 +2327,14 @@ Table<3,T>::Table (const unsigned int size1,
 
 template <typename T>
 inline
-TableBaseAccessors::Accessor<3,T,true,2>
+internal::TableBaseAccessors::Accessor<3,T,true,2>
 Table<3,T>::operator [] (const unsigned int i) const
 {
   Assert (i < this->table_size[0],
           ExcIndexRange (i, 0, this->table_size[0]));
   const unsigned int subobject_size = this->table_size[1] *
                                       this->table_size[2];
-  return (TableBaseAccessors::Accessor<3,T,true,2>
+  return (internal::TableBaseAccessors::Accessor<3,T,true,2>
           (*this,
            this->val+i*subobject_size));
 }
@@ -2336,14 +2343,14 @@ Table<3,T>::operator [] (const unsigned int i) const
 
 template <typename T>
 inline
-TableBaseAccessors::Accessor<3,T,false,2>
+internal::TableBaseAccessors::Accessor<3,T,false,2>
 Table<3,T>::operator [] (const unsigned int i)
 {
   Assert (i < this->table_size[0],
           ExcIndexRange (i, 0, this->table_size[0]));
   const unsigned int subobject_size = this->table_size[1] *
                                       this->table_size[2];
-  return (TableBaseAccessors::Accessor<3,T,false,2>
+  return (internal::TableBaseAccessors::Accessor<3,T,false,2>
           (*this,
            this->val+i*subobject_size));
 }
@@ -2364,7 +2371,7 @@ Table<3,T>::operator () (const unsigned int i,
   Assert (k < this->table_size[2],
           ExcIndexRange (k, 0, this->table_size[2]));
   return this->val[(i*this->table_size[1]+j)
-                 *this->table_size[2] + k];
+                   *this->table_size[2] + k];
 }
 
 
@@ -2383,7 +2390,7 @@ Table<3,T>::operator () (const unsigned int i,
   Assert (k < this->table_size[2],
           ExcIndexRange (k, 0, this->table_size[2]));
   return this->val[(i*this->table_size[1]+j)
-                 *this->table_size[2] + k];
+                   *this->table_size[2] + k];
 }
 
 
@@ -2407,7 +2414,7 @@ Table<4,T>::Table (const unsigned int size1,
 
 template <typename T>
 inline
-TableBaseAccessors::Accessor<4,T,true,3>
+internal::TableBaseAccessors::Accessor<4,T,true,3>
 Table<4,T>::operator [] (const unsigned int i) const
 {
   Assert (i < this->table_size[0],
@@ -2415,7 +2422,7 @@ Table<4,T>::operator [] (const unsigned int i) const
   const unsigned int subobject_size = this->table_size[1] *
                                       this->table_size[2] *
                                      this->table_size[3];
-  return (TableBaseAccessors::Accessor<4,T,true,3>
+  return (internal::TableBaseAccessors::Accessor<4,T,true,3>
           (*this,
            this->val+i*subobject_size));
 }
@@ -2424,7 +2431,7 @@ Table<4,T>::operator [] (const unsigned int i) const
 
 template <typename T>
 inline
-TableBaseAccessors::Accessor<4,T,false,3>
+internal::TableBaseAccessors::Accessor<4,T,false,3>
 Table<4,T>::operator [] (const unsigned int i)
 {
   Assert (i < this->table_size[0],
@@ -2432,7 +2439,7 @@ Table<4,T>::operator [] (const unsigned int i)
   const unsigned int subobject_size = this->table_size[1] *
                                       this->table_size[2] *
                                      this->table_size[3];
-  return (TableBaseAccessors::Accessor<4,T,false,3>
+  return (internal::TableBaseAccessors::Accessor<4,T,false,3>
           (*this,
            this->val+i*subobject_size));
 }
@@ -2457,7 +2464,7 @@ Table<4,T>::operator () (const unsigned int i,
           ExcIndexRange (l, 0, this->table_size[3]));
   return this->val[((i*this->table_size[1]+j)
                    *this->table_size[2] + k)
-                 *this->table_size[3] + l];
+                   *this->table_size[3] + l];
 }
 
 
@@ -2480,7 +2487,7 @@ Table<4,T>::operator () (const unsigned int i,
           ExcIndexRange (l, 0, this->table_size[3]));
   return this->val[((i*this->table_size[1]+j)
                    *this->table_size[2] + k)
-                 *this->table_size[3] + l];
+                   *this->table_size[3] + l];
 }
 
 
@@ -2506,7 +2513,7 @@ Table<5,T>::Table (const unsigned int size1,
 
 template <typename T>
 inline
-TableBaseAccessors::Accessor<5,T,true,4>
+internal::TableBaseAccessors::Accessor<5,T,true,4>
 Table<5,T>::operator [] (const unsigned int i) const
 {
   Assert (i < this->table_size[0],
@@ -2515,7 +2522,7 @@ Table<5,T>::operator [] (const unsigned int i) const
                                       this->table_size[2] *
                                      this->table_size[3] *
                                      this->table_size[4];
-  return (TableBaseAccessors::Accessor<5,T,true,4>
+  return (internal::TableBaseAccessors::Accessor<5,T,true,4>
           (*this,
            this->val+i*subobject_size));
 }
@@ -2524,7 +2531,7 @@ Table<5,T>::operator [] (const unsigned int i) const
 
 template <typename T>
 inline
-TableBaseAccessors::Accessor<5,T,false,4>
+internal::TableBaseAccessors::Accessor<5,T,false,4>
 Table<5,T>::operator [] (const unsigned int i)
 {
   Assert (i < this->table_size[0],
@@ -2533,7 +2540,7 @@ Table<5,T>::operator [] (const unsigned int i)
                                       this->table_size[2] *
                                      this->table_size[3] *
                                      this->table_size[4];
-  return (TableBaseAccessors::Accessor<5,T,false,4>
+  return (internal::TableBaseAccessors::Accessor<5,T,false,4>
           (*this,
            this->val+i*subobject_size));
 }
@@ -2562,7 +2569,7 @@ Table<5,T>::operator () (const unsigned int i,
   return this->val[(((i*this->table_size[1]+j)
                     *this->table_size[2] + k)
                    *this->table_size[3] + l)
-                 *this->table_size[4] + m];
+                   *this->table_size[4] + m];
 }
 
 
@@ -2589,7 +2596,7 @@ Table<5,T>::operator () (const unsigned int i,
   return this->val[(((i*this->table_size[1]+j)
                     *this->table_size[2] + k)
                    *this->table_size[3] + l)
-                 *this->table_size[4] + m];
+                   *this->table_size[4] + m];
 }
 
 
@@ -2615,7 +2622,7 @@ Table<6,T>::Table (const unsigned int size1,
 
 template <typename T>
 inline
-TableBaseAccessors::Accessor<6,T,true,5>
+internal::TableBaseAccessors::Accessor<6,T,true,5>
 Table<6,T>::operator [] (const unsigned int i) const
 {
   Assert (i < this->table_size[0],
@@ -2625,7 +2632,7 @@ Table<6,T>::operator [] (const unsigned int i) const
                                      this->table_size[3] *
                                      this->table_size[4] *
                                      this->table_size[5];
-  return (TableBaseAccessors::Accessor<6,T,true,5>
+  return (internal::TableBaseAccessors::Accessor<6,T,true,5>
           (*this,
            this->val+i*subobject_size));
 }
@@ -2634,7 +2641,7 @@ Table<6,T>::operator [] (const unsigned int i) const
 
 template <typename T>
 inline
-TableBaseAccessors::Accessor<6,T,false,5>
+internal::TableBaseAccessors::Accessor<6,T,false,5>
 Table<6,T>::operator [] (const unsigned int i)
 {
   Assert (i < this->table_size[0],
@@ -2644,7 +2651,7 @@ Table<6,T>::operator [] (const unsigned int i)
                                      this->table_size[3] *
                                      this->table_size[4] *
                                      this->table_size[5];
-  return (TableBaseAccessors::Accessor<6,T,false,5>
+  return (internal::TableBaseAccessors::Accessor<6,T,false,5>
           (*this,
            this->val+i*subobject_size));
 }
@@ -2677,7 +2684,7 @@ Table<6,T>::operator () (const unsigned int i,
                      *this->table_size[2] + k)
                     *this->table_size[3] + l)
                    *this->table_size[4] + m)
-                 *this->table_size[5] + n];
+                   *this->table_size[5] + n];
 }
 
 
@@ -2708,7 +2715,7 @@ Table<6,T>::operator () (const unsigned int i,
                      *this->table_size[2] + k)
                     *this->table_size[3] + l)
                    *this->table_size[4] + m)
-                 *this->table_size[5] + n];
+                   *this->table_size[5] + n];
 }
 
 
index 1fd850330951346e09cbbedcb4ddafb53c1b9147..1a1bcb4e73467957b97b7a4d22dede408fca249c 100644 (file)
@@ -300,6 +300,17 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>base</h3>
 
 <ol>
+  <li> <p>
+       Changed: The <code class="class">Table</code> accessor classes
+       have been moved to a namespace <code
+       class="class">internal</code>. Since these classes are not (or should
+       not be) used directly in applications, this should not change
+       compatibility. However, they will now no longer show up in the class
+       overview of the documentation, which they were cluttering up.
+       <br>
+       (WB 2003/02/13)
+       </p>
+
   <li> <p> 
        New: The <code class="class">Function</code> class now has an assignment
        operator. This way, you can put function objects into
@@ -543,6 +554,16 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>lac</h3>
 
 <ol>
+  <li> <p>
+       Changed: The <code class="class">BlockVector</code> accessor classes
+       have been moved to a namespace <code
+       class="class">internal</code>. Since these classes are not (or should
+       not be) used directly in applications, this should not change
+       compatibility. However, they will now no longer show up in the class
+       overview of the documentation, which they were cluttering up.
+       <br>
+       (WB 2003/02/13)
+       </p>
 
   <li> <p> New: The <code class="class">SolverGMRES</code> now accepts
   an <code class="class">AdditionalData</code> parameter
index 5c9cab6be6efc01538b7bd6c4d90d53a7f4efd82..4d162d58397b7beec1476dd6b001391c1be5371e 100644 (file)
@@ -28,567 +28,569 @@ template <typename Number>
 class BlockVector;
 
 
+namespace internal
+{
+
 /**
  * Namespace in which iterators in block vectors are implemented.
  *
  * @author Wolfgang Bangerth, 2001
  */
-namespace BlockVectorIterators
-{
-                                  /**
-                                   * Declaration of the general
-                                   * template of a structure which is
-                                   * used to determine some types
-                                   * based on the template arguments
-                                   * of other classes.
-                                   */
-  template <typename number, bool constness>
-  struct Types
+  namespace BlockVectorIterators
   {
-  };
+                                     /**
+                                      * Declaration of the general
+                                      * template of a structure which is
+                                      * used to determine some types
+                                      * based on the template arguments
+                                      * of other classes.
+                                      */
+    template <typename number, bool constness>
+    struct Types
+    {
+    };
 
 
   
-                                  /**
-                                   * Declaration of a specialized
-                                   * template of a structure which is
-                                   * used to determine some types
-                                   * based on the template arguments
-                                   * of other classes.
-                                   *
-                                   * This is for the use of non-const
-                                   * iterators.
-                                   */
-  template <typename number>
-  struct Types<number,false>
-  {
-                                      /**
-                                       * Type of the vector
-                                       * underlying the block vector
-                                       * used in non-const
-                                       * iterators. There, the
-                                       * vector must not be constant.
-                                       */
-      typedef ::Vector<number>      Vector;
-
-                                      /**
-                                       * Type of the block vector
-                                       * used in non-const
-                                       * iterators. There, the block
-                                       * vector must not be constant.
-                                       */
-      typedef ::BlockVector<number> BlockVector;
-
-                                      /**
-                                       * Type of the numbers we point
-                                       * to. Here, they are not
-                                       * constant.
-                                       */
-      typedef number              NumberType;
-  };
+                                     /**
+                                      * Declaration of a specialized
+                                      * template of a structure which is
+                                      * used to determine some types
+                                      * based on the template arguments
+                                      * of other classes.
+                                      *
+                                      * This is for the use of non-const
+                                      * iterators.
+                                      */
+    template <typename number>
+    struct Types<number,false>
+    {
+                                         /**
+                                          * Type of the vector
+                                          * underlying the block vector
+                                          * used in non-const
+                                          * iterators. There, the
+                                          * vector must not be constant.
+                                          */
+        typedef ::Vector<number>      Vector;
+
+                                         /**
+                                          * Type of the block vector
+                                          * used in non-const
+                                          * iterators. There, the block
+                                          * vector must not be constant.
+                                          */
+        typedef ::BlockVector<number> BlockVector;
+
+                                         /**
+                                          * Type of the numbers we point
+                                          * to. Here, they are not
+                                          * constant.
+                                          */
+        typedef number              NumberType;
+    };
 
 
   
-                                  /**
-                                   * Declaration of a specialized
-                                   * template of a structure which is
-                                   * used to determine some types
-                                   * based on the template arguments
-                                   * of other classes.
-                                   *
-                                   * This is for the use of
-                                   * @p{const_iterator}s.
-                                   */
-  template <typename number>
-  struct Types<number,true>
-  {
-                                      /**
-                                       * Type of the vector
-                                       * underlying the block vector
-                                       * used in
-                                       * @p{const_iterators}. There,
-                                       * the vector must be
-                                       * constant.
-                                       */
-      typedef const ::Vector<number>      Vector;
-
-                                      /**
-                                       * Type of the block vector
-                                       * used in
-                                       * @p{const_iterator}s. There,
-                                       * the block vector must be
-                                       * constant.
-                                       */
-      typedef const ::BlockVector<number> BlockVector;
-
-                                      /**
-                                       * Type of the numbers we point
-                                       * to. Here, they are constant
-                                       * since the block vector we
-                                       * use is constant.
-                                       */
-      typedef const number              NumberType;
-  };
-
-
-                                  /**
-                                   * General random-access iterator
-                                   * class for block vectors. Since
-                                   * we do not want to have two
-                                   * classes for non-const
-                                   * @p{iterator}s and
-                                   * @p{const_iterator}s, we take a
-                                   * second template argument which
-                                   * denotes whether the vector we
-                                   * point into is a constant object
-                                   * or not. The first template
-                                   * argument is always the number
-                                   * type of the block vector in use.
-                                   *
-                                   * This class satisfies all
-                                   * requirements of random access
-                                   * iterators defined in the C++
-                                   * standard. Operations on these
-                                   * iterators are constant in the
-                                   * number of elements in the block
-                                   * vector. However, they are
-                                   * sometimes linear in the number
-                                   * of blocks in the vector, but
-                                   * since that does rarely change
-                                   * dynamically within an
-                                   * application, this is a constant
-                                   * and we again have that the
-                                   * iterator satisfies the
-                                   * requirements of a random access
-                                   * iterator.
-                                   *
-                                   * The implementation of this class
-                                   * has to work around some problems
-                                   * in compilers and standard
-                                   * libraries. One of these requires
-                                   * us to write all comparison
-                                   * operators twice, once comparison
-                                   * with iterators of the same type
-                                   * and once with iterators pointing
-                                   * to numbers of opposite constness
-                                   * specification. The reason is
-                                   * that if we would have written
-                                   * the comparison operators as a
-                                   * template on the constness of the
-                                   * right hand side, then gcc2.95
-                                   * signals an error that these
-                                   * operators ambiguate operators
-                                   * declared somewhere within the
-                                   * standard library. Likewise, we
-                                   * have to work around some
-                                   * problems with granting other
-                                   * iterators friendship. This makes
-                                   * the implementation somewhat
-                                   * non-optimal at places, but at
-                                   * least everything works.
-                                   *
-                                   * @author Wolfgang Bangerth, 2001
-                                   */
-  template <typename number, bool constness>
-  class Iterator :
+                                     /**
+                                      * Declaration of a specialized
+                                      * template of a structure which is
+                                      * used to determine some types
+                                      * based on the template arguments
+                                      * of other classes.
+                                      *
+                                      * This is for the use of
+                                      * @p{const_iterator}s.
+                                      */
+    template <typename number>
+    struct Types<number,true>
+    {
+                                         /**
+                                          * Type of the vector
+                                          * underlying the block vector
+                                          * used in
+                                          * @p{const_iterators}. There,
+                                          * the vector must be
+                                          * constant.
+                                          */
+        typedef const ::Vector<number>      Vector;
+
+                                         /**
+                                          * Type of the block vector
+                                          * used in
+                                          * @p{const_iterator}s. There,
+                                          * the block vector must be
+                                          * constant.
+                                          */
+        typedef const ::BlockVector<number> BlockVector;
+
+                                         /**
+                                          * Type of the numbers we point
+                                          * to. Here, they are constant
+                                          * since the block vector we
+                                          * use is constant.
+                                          */
+        typedef const number              NumberType;
+    };
+
+
+                                     /**
+                                      * General random-access iterator
+                                      * class for block vectors. Since
+                                      * we do not want to have two
+                                      * classes for non-const
+                                      * @p{iterator}s and
+                                      * @p{const_iterator}s, we take a
+                                      * second template argument which
+                                      * denotes whether the vector we
+                                      * point into is a constant object
+                                      * or not. The first template
+                                      * argument is always the number
+                                      * type of the block vector in use.
+                                      *
+                                      * This class satisfies all
+                                      * requirements of random access
+                                      * iterators defined in the C++
+                                      * standard. Operations on these
+                                      * iterators are constant in the
+                                      * number of elements in the block
+                                      * vector. However, they are
+                                      * sometimes linear in the number
+                                      * of blocks in the vector, but
+                                      * since that does rarely change
+                                      * dynamically within an
+                                      * application, this is a constant
+                                      * and we again have that the
+                                      * iterator satisfies the
+                                      * requirements of a random access
+                                      * iterator.
+                                      *
+                                      * The implementation of this class
+                                      * has to work around some problems
+                                      * in compilers and standard
+                                      * libraries. One of these requires
+                                      * us to write all comparison
+                                      * operators twice, once comparison
+                                      * with iterators of the same type
+                                      * and once with iterators pointing
+                                      * to numbers of opposite constness
+                                      * specification. The reason is
+                                      * that if we would have written
+                                      * the comparison operators as a
+                                      * template on the constness of the
+                                      * right hand side, then gcc2.95
+                                      * signals an error that these
+                                      * operators ambiguate operators
+                                      * declared somewhere within the
+                                      * standard library. Likewise, we
+                                      * have to work around some
+                                      * problems with granting other
+                                      * iterators friendship. This makes
+                                      * the implementation somewhat
+                                      * non-optimal at places, but at
+                                      * least everything works.
+                                      *
+                                      * @author Wolfgang Bangerth, 2001
+                                      */
+    template <typename number, bool constness>
+    class Iterator :
 #ifdef HAVE_STD_ITERATOR_CLASS  
-               public std::iterator<std::random_access_iterator_tag,
-                                   typename Types<number,constness>::NumberType>
+        public std::iterator<std::random_access_iterator_tag,
+                             typename Types<number,constness>::NumberType>
 #else
-               random_access_iterator<typename Types<number,constness>::NumberType,int>
+    random_access_iterator<typename Types<number,constness>::NumberType,int>
 #endif      
-  {
-    private:
-                                      /**
-                                       * Typedef an iterator with
-                                       * opposite constness
-                                       * requirements on the elements
-                                       * it points to.
-                                       */
-      typedef Iterator<number,!constness> InverseConstnessIterator;
-
-    public:
-                                      /**
-                                       * Declare some typedefs which
-                                       * are standard for iterators
-                                       * and are used by algorithms
-                                       * to enquire about the
-                                       * specifics of the iterators
-                                       * they work on.
-                                       */
-      typedef std::random_access_iterator_tag               iterator_type;
-      typedef typename Types<number,constness>::NumberType  value_type;
-      typedef ptrdiff_t                                     difference_type;
-      typedef value_type                                   &reference;
-      typedef value_type                                   *pointer;
+    {
+      private:
+                                         /**
+                                          * Typedef an iterator with
+                                          * opposite constness
+                                          * requirements on the elements
+                                          * it points to.
+                                          */
+        typedef Iterator<number,!constness> InverseConstnessIterator;
+
+      public:
+                                         /**
+                                          * Declare some typedefs which
+                                          * are standard for iterators
+                                          * and are used by algorithms
+                                          * to enquire about the
+                                          * specifics of the iterators
+                                          * they work on.
+                                          */
+        typedef std::random_access_iterator_tag               iterator_type;
+        typedef typename Types<number,constness>::NumberType  value_type;
+        typedef ptrdiff_t                                     difference_type;
+        typedef value_type                                   &reference;
+        typedef value_type                                   *pointer;
       
-                                      /**
-                                       * Typedef the type of the
-                                       * block vector (which differs
-                                       * in constness, depending on
-                                       * the second template
-                                       * parameter).
-                                       */
-      typedef typename Types<number,constness>::BlockVector BlockVectorType;
-
-                                      /**
-                                       * Type of the number this
-                                       * iterator points
-                                       * to. Depending on the value
-                                       * of the second template
-                                       * parameter, this is either a
-                                       * constant or non-const
-                                       * number.
-                                       */
-      typedef typename Types<number,constness>::NumberType NumberType;
+                                         /**
+                                          * Typedef the type of the
+                                          * block vector (which differs
+                                          * in constness, depending on
+                                          * the second template
+                                          * parameter).
+                                          */
+        typedef typename Types<number,constness>::BlockVector BlockVectorType;
+
+                                         /**
+                                          * Type of the number this
+                                          * iterator points
+                                          * to. Depending on the value
+                                          * of the second template
+                                          * parameter, this is either a
+                                          * constant or non-const
+                                          * number.
+                                          */
+        typedef typename Types<number,constness>::NumberType NumberType;
        
-                                      /**
-                                       * Construct an iterator from
-                                       * a vector to which we point
-                                       * and the global index of
-                                       * the element pointed to.
-                                       *
-                                       * Depending on the value of
-                                       * the @p{constness} template
-                                       * argument of this class,
-                                       * the first argument of this
-                                       * constructor is either is a
-                                       * @p{const} or non-@p{const}
-                                       * reference.
-                                       */
-      Iterator (BlockVectorType    &parent,
-               const unsigned int  global_index);
+                                         /**
+                                          * Construct an iterator from
+                                          * a vector to which we point
+                                          * and the global index of
+                                          * the element pointed to.
+                                          *
+                                          * Depending on the value of
+                                          * the @p{constness} template
+                                          * argument of this class,
+                                          * the first argument of this
+                                          * constructor is either is a
+                                          * @p{const} or non-@p{const}
+                                          * reference.
+                                          */
+        Iterator (BlockVectorType    &parent,
+                  const unsigned int  global_index);
        
-                                      /**
-                                       * Copy constructor.
-                                       */
-      Iterator (const Iterator<number,constness> &c);
-
-                                      /**
-                                       * Copy constructor for
-                                       * conversion between iterators
-                                       * with different constness
-                                       * requirements. This
-                                       * constructor throws an error
-                                       * if an attempt is made at
-                                       * converting a constant to a
-                                       * non-constant iterator.
-                                       */
-      Iterator (const InverseConstnessIterator &c);
-
-    private:
-                                      /**
-                                       * Constructor used internally
-                                       * in this class. The arguments
-                                       * match exactly the values of
-                                       * the respective member
-                                       * variables.
-                                       */
-      Iterator (BlockVectorType    &parent,
-               const unsigned int  global_index,
-               const unsigned int  current_block,
-               const unsigned int  index_within_block,
-               const unsigned int  next_break_forward,
-               const unsigned int  next_break_backward);
+                                         /**
+                                          * Copy constructor.
+                                          */
+        Iterator (const Iterator<number,constness> &c);
+
+                                         /**
+                                          * Copy constructor for
+                                          * conversion between iterators
+                                          * with different constness
+                                          * requirements. This
+                                          * constructor throws an error
+                                          * if an attempt is made at
+                                          * converting a constant to a
+                                          * non-constant iterator.
+                                          */
+        Iterator (const InverseConstnessIterator &c);
+
+      private:
+                                         /**
+                                          * Constructor used internally
+                                          * in this class. The arguments
+                                          * match exactly the values of
+                                          * the respective member
+                                          * variables.
+                                          */
+        Iterator (BlockVectorType    &parent,
+                  const unsigned int  global_index,
+                  const unsigned int  current_block,
+                  const unsigned int  index_within_block,
+                  const unsigned int  next_break_forward,
+                  const unsigned int  next_break_backward);
       
-    public:
+      public:
       
-                                      /**
-                                       * Copy operator.
-                                       */
-      Iterator & operator = (const Iterator &c);
-
-                                      /**
-                                       * Dereferencing operator. If
-                                       * the template argument
-                                       * @p{constness} is @p{true},
-                                       * then no writing to the
-                                       * result is possible, making
-                                       * this a @p{const_iterator}.
-                                       */
-      reference operator * () const;
-
-                                      /**
-                                       * Dereferencing operator. If
-                                       * the template argument
-                                       * @p{constness} is @p{true},
-                                       * then no writing to the
-                                       * result is possible, making
-                                       * this a @p{const_iterator}.
-                                       */ 
-      pointer operator -> () const;
-
-                                      /**
-                                       * Random access operator,
-                                       * grant access to arbitrary
-                                       * elements relative to the one
-                                       * presently pointed to.
-                                       */
-      reference operator [] (const difference_type d) const;
+                                         /**
+                                          * Copy operator.
+                                          */
+        Iterator & operator = (const Iterator &c);
+
+                                         /**
+                                          * Dereferencing operator. If
+                                          * the template argument
+                                          * @p{constness} is @p{true},
+                                          * then no writing to the
+                                          * result is possible, making
+                                          * this a @p{const_iterator}.
+                                          */
+        reference operator * () const;
+
+                                         /**
+                                          * Dereferencing operator. If
+                                          * the template argument
+                                          * @p{constness} is @p{true},
+                                          * then no writing to the
+                                          * result is possible, making
+                                          * this a @p{const_iterator}.
+                                          */ 
+        pointer operator -> () const;
+
+                                         /**
+                                          * Random access operator,
+                                          * grant access to arbitrary
+                                          * elements relative to the one
+                                          * presently pointed to.
+                                          */
+        reference operator [] (const difference_type d) const;
       
-                                      /**
-                                       * Prefix @p{++} operator:
-                                       * @p{++i}. This operator
-                                       * advances the iterator to
-                                       * the next element and
-                                       * returns a reference to
-                                       * @p{*this}.
-                                       */
-      Iterator & operator ++ ();
-
-                                      /**
-                                       * Postfix @p{++} operator:
-                                       * @p{i++}. This operator
-                                       * advances the iterator to
-                                       * the next element and
-                                       * returns a copy of the old
-                                       * value of this iterator.
-                                       */
-      Iterator operator ++ (int);
-
-                                      /**
-                                       * Prefix @p{--} operator:
-                                       * @p{--i}. This operator
-                                       * retracts the iterator to
-                                       * the previous element and
-                                       * returns a reference to
-                                       * @p{*this}.
-                                       */
-      Iterator & operator -- ();
-
-                                      /**
-                                       * Postfix @p{--} operator:
-                                       * @p{i--}. This operator
-                                       * retracts the iterator to
-                                       * the previous element and
-                                       * returns a copy of the old
-                                       * value of this iterator.
-                                       */
-      Iterator operator -- (int);
-
-                                      /**
-                                       * Compare for equality of
-                                       * iterators. This operator
-                                       * checks whether the vectors
-                                       * pointed to are the same,
-                                       * and if not it throws an
-                                       * exception.                                     
-                                       */
-      bool operator == (const Iterator &i) const;
+                                         /**
+                                          * Prefix @p{++} operator:
+                                          * @p{++i}. This operator
+                                          * advances the iterator to
+                                          * the next element and
+                                          * returns a reference to
+                                          * @p{*this}.
+                                          */
+        Iterator & operator ++ ();
+
+                                         /**
+                                          * Postfix @p{++} operator:
+                                          * @p{i++}. This operator
+                                          * advances the iterator to
+                                          * the next element and
+                                          * returns a copy of the old
+                                          * value of this iterator.
+                                          */
+        Iterator operator ++ (int);
+
+                                         /**
+                                          * Prefix @p{--} operator:
+                                          * @p{--i}. This operator
+                                          * retracts the iterator to
+                                          * the previous element and
+                                          * returns a reference to
+                                          * @p{*this}.
+                                          */
+        Iterator & operator -- ();
+
+                                         /**
+                                          * Postfix @p{--} operator:
+                                          * @p{i--}. This operator
+                                          * retracts the iterator to
+                                          * the previous element and
+                                          * returns a copy of the old
+                                          * value of this iterator.
+                                          */
+        Iterator operator -- (int);
+
+                                         /**
+                                          * Compare for equality of
+                                          * iterators. This operator
+                                          * checks whether the vectors
+                                          * pointed to are the same,
+                                          * and if not it throws an
+                                          * exception.                                  
+                                          */
+        bool operator == (const Iterator &i) const;
       
-                                      /**
-                                       * Same, but compare with an
-                                       * iterator of different
-                                       * constness.
-                                       */
-      bool operator == (const InverseConstnessIterator &i) const;
-
-                                      /**
-                                       * Compare for inequality of
-                                       * iterators. This operator
-                                       * checks whether the vectors
-                                       * pointed to are the same,
-                                       * and if not it throws an
-                                       * exception.                                     
-                                       */
-      bool operator != (const Iterator &i) const;
-
-                                      /**
-                                       * Same, but compare with an
-                                       * iterator of different
-                                       * constness.
-                                       */
-      bool operator != (const InverseConstnessIterator &i) const;      
-
-                                      /**
-                                       * Check whether this
-                                       * iterators points to an
-                                       * element previous to the
-                                       * one pointed to by the
-                                       * given argument. This
-                                       * operator checks whether
-                                       * the vectors pointed to are
-                                       * the same, and if not it
-                                       * throws an exception.
-                                       */
-      bool operator < (const Iterator &i) const;
-
-                                      /**
-                                       * Same, but compare with an
-                                       * iterator of different
-                                       * constness.
-                                       */
-      bool operator < (const InverseConstnessIterator &i) const;      
-
-                                      /**
-                                       * Comparison operator alike
-                                       * to the one above.
-                                       */
-      bool operator <= (const Iterator &i) const;
-
-                                      /**
-                                       * Same, but compare with an
-                                       * iterator of different
-                                       * constness.
-                                       */
-      bool operator <= (const InverseConstnessIterator &i) const;      
-
-                                      /**
-                                       * Comparison operator alike
-                                       * to the one above.
-                                       */
-      bool operator > (const Iterator &i) const;
-
-                                      /**
-                                       * Same, but compare with an
-                                       * iterator of different
-                                       * constness.
-                                       */
-      bool operator > (const InverseConstnessIterator &i) const;      
-
-                                      /**
-                                       * Comparison operator alike
-                                       * to the one above.
-                                       */
-      bool operator >= (const Iterator &i) const;
-
-                                      /**
-                                       * Same, but compare with an
-                                       * iterator of different
-                                       * constness.
-                                       */
-      bool operator >= (const InverseConstnessIterator &i) const;
-
-                                      /**
-                                       * Return the distance between
-                                       * the two iterators, in
-                                       * elements.
-                                       */
-      difference_type operator - (const Iterator &i) const;
-
-                                      /**
-                                       * Same, but for iterators of
-                                       * opposite constness.
-                                       */
-      difference_type operator - (const InverseConstnessIterator &i) const;
-
-                                      /**
-                                       * Return an iterator which is
-                                       * the given number of elements
-                                       * in front of the present one.
-                                       */
-      Iterator operator + (const difference_type &d) const;
+                                         /**
+                                          * Same, but compare with an
+                                          * iterator of different
+                                          * constness.
+                                          */
+        bool operator == (const InverseConstnessIterator &i) const;
+
+                                         /**
+                                          * Compare for inequality of
+                                          * iterators. This operator
+                                          * checks whether the vectors
+                                          * pointed to are the same,
+                                          * and if not it throws an
+                                          * exception.                                  
+                                          */
+        bool operator != (const Iterator &i) const;
+
+                                         /**
+                                          * Same, but compare with an
+                                          * iterator of different
+                                          * constness.
+                                          */
+        bool operator != (const InverseConstnessIterator &i) const;      
+
+                                         /**
+                                          * Check whether this
+                                          * iterators points to an
+                                          * element previous to the
+                                          * one pointed to by the
+                                          * given argument. This
+                                          * operator checks whether
+                                          * the vectors pointed to are
+                                          * the same, and if not it
+                                          * throws an exception.
+                                          */
+        bool operator < (const Iterator &i) const;
+
+                                         /**
+                                          * Same, but compare with an
+                                          * iterator of different
+                                          * constness.
+                                          */
+        bool operator < (const InverseConstnessIterator &i) const;      
+
+                                         /**
+                                          * Comparison operator alike
+                                          * to the one above.
+                                          */
+        bool operator <= (const Iterator &i) const;
+
+                                         /**
+                                          * Same, but compare with an
+                                          * iterator of different
+                                          * constness.
+                                          */
+        bool operator <= (const InverseConstnessIterator &i) const;      
+
+                                         /**
+                                          * Comparison operator alike
+                                          * to the one above.
+                                          */
+        bool operator > (const Iterator &i) const;
+
+                                         /**
+                                          * Same, but compare with an
+                                          * iterator of different
+                                          * constness.
+                                          */
+        bool operator > (const InverseConstnessIterator &i) const;      
+
+                                         /**
+                                          * Comparison operator alike
+                                          * to the one above.
+                                          */
+        bool operator >= (const Iterator &i) const;
+
+                                         /**
+                                          * Same, but compare with an
+                                          * iterator of different
+                                          * constness.
+                                          */
+        bool operator >= (const InverseConstnessIterator &i) const;
+
+                                         /**
+                                          * Return the distance between
+                                          * the two iterators, in
+                                          * elements.
+                                          */
+        difference_type operator - (const Iterator &i) const;
+
+                                         /**
+                                          * Same, but for iterators of
+                                          * opposite constness.
+                                          */
+        difference_type operator - (const InverseConstnessIterator &i) const;
+
+                                         /**
+                                          * Return an iterator which is
+                                          * the given number of elements
+                                          * in front of the present one.
+                                          */
+        Iterator operator + (const difference_type &d) const;
       
-                                      /**
-                                       * Return an iterator which is
-                                       * the given number of elements
-                                       * behind the present one.
-                                       */
-      Iterator operator - (const difference_type &d) const;
-
-                                      /**
-                                       * Move the iterator @p{d}
-                                       * elements forward at once,
-                                       * and return the result.
-                                       */
-      Iterator & operator += (const difference_type &d);
-
-                                      /**
-                                       * Move the iterator @p{d}
-                                       * elements backward at once,
-                                       * and return the result.
-                                       */
-      Iterator & operator -= (const difference_type &d);
+                                         /**
+                                          * Return an iterator which is
+                                          * the given number of elements
+                                          * behind the present one.
+                                          */
+        Iterator operator - (const difference_type &d) const;
+
+                                         /**
+                                          * Move the iterator @p{d}
+                                          * elements forward at once,
+                                          * and return the result.
+                                          */
+        Iterator & operator += (const difference_type &d);
+
+                                         /**
+                                          * Move the iterator @p{d}
+                                          * elements backward at once,
+                                          * and return the result.
+                                          */
+        Iterator & operator -= (const difference_type &d);
       
-                                      /**
-                                       * Exception.
-                                       */
-      DeclException0 (ExcPointerToDifferentVectors);
-                                      /**
-                                       * Exception.
-                                       */
-      DeclException0 (ExcCastingAwayConstness);
+                                         /**
+                                          * Exception.
+                                          */
+        DeclException0 (ExcPointerToDifferentVectors);
+                                         /**
+                                          * Exception.
+                                          */
+        DeclException0 (ExcCastingAwayConstness);
        
-    private:
-                                      /**
-                                       * Pointer to the block
-                                       * vector object to which
-                                       * this iterator
-                                       * points. Depending on the
-                                       * value of the @p{constness}
-                                       * template argument of this
-                                       * class, this is a @p{const}
-                                       * or non-@p{const} pointer.
-                                       */
-      BlockVectorType *parent;
-
-                                      /**
-                                       * Global index of the
-                                       * element to which we
-                                       * presently point.
-                                       */
-      unsigned int     global_index;
-
-                                      /**
-                                       * Current block and index
-                                       * within this block of the
-                                       * element presently pointed
-                                       * to.
-                                       */
-      unsigned int current_block;
-      unsigned int index_within_block;
-
-                                      /**
-                                       * Indices of the global
-                                       * element address at which
-                                       * we have to move on to
-                                       * another block when moving
-                                       * forward and
-                                       * backward. These indices
-                                       * are kept as a cache since
-                                       * this is much more
-                                       * efficient than always
-                                       * asking the parent object.
-                                       */
-      unsigned int next_break_forward;
-      unsigned int next_break_backward;
-
-                                      /**
-                                       * Move forward one element.
-                                       */
-      void move_forward ();
-
-                                      /**
-                                       * Move backward one element.
-                                       */
-      void move_backward ();
+      private:
+                                         /**
+                                          * Pointer to the block
+                                          * vector object to which
+                                          * this iterator
+                                          * points. Depending on the
+                                          * value of the @p{constness}
+                                          * template argument of this
+                                          * class, this is a @p{const}
+                                          * or non-@p{const} pointer.
+                                          */
+        BlockVectorType *parent;
+
+                                         /**
+                                          * Global index of the
+                                          * element to which we
+                                          * presently point.
+                                          */
+        unsigned int     global_index;
+
+                                         /**
+                                          * Current block and index
+                                          * within this block of the
+                                          * element presently pointed
+                                          * to.
+                                          */
+        unsigned int current_block;
+        unsigned int index_within_block;
+
+                                         /**
+                                          * Indices of the global
+                                          * element address at which
+                                          * we have to move on to
+                                          * another block when moving
+                                          * forward and
+                                          * backward. These indices
+                                          * are kept as a cache since
+                                          * this is much more
+                                          * efficient than always
+                                          * asking the parent object.
+                                          */
+        unsigned int next_break_forward;
+        unsigned int next_break_backward;
+
+                                         /**
+                                          * Move forward one element.
+                                          */
+        void move_forward ();
+
+                                         /**
+                                          * Move backward one element.
+                                          */
+        void move_backward ();
 
       
 #ifndef DEAL_II_NAMESP_TEMPL_FRIEND_BUG
-                                      /**
-                                       * Mark all other instances of
-                                       * this template as friends. In
-                                       * fact, we only need the
-                                       * inverse constness iterator
-                                       * as friend, but this is
-                                       * something that ISO C++ does
-                                       * not allow to specify. If we
-                                       * have detected a compiler bug
-                                       * during configuration of the
-                                       * library, use a workaround
-                                       * that works for this
-                                       * particular compiler, but is
-                                       * not ISO C++ conforming.
-                                       */
-      template <typename N, bool C>
-      friend class Iterator;
+                                         /**
+                                          * Mark all other instances of
+                                          * this template as friends. In
+                                          * fact, we only need the
+                                          * inverse constness iterator
+                                          * as friend, but this is
+                                          * something that ISO C++ does
+                                          * not allow to specify. If we
+                                          * have detected a compiler bug
+                                          * during configuration of the
+                                          * library, use a workaround
+                                          * that works for this
+                                          * particular compiler, but is
+                                          * not ISO C++ conforming.
+                                          */
+        template <typename N, bool C>
+        friend class Iterator;
 #else
-      friend class InverseConstnessIterator;
+        friend class InverseConstnessIterator;
 #endif
-  };
-}
-
-
+    };
+  }  // namespace BlockVectorIterators
+}  // namespace internal
 
 /**
  * A vector composed of several blocks each representing a vector of
@@ -647,8 +649,8 @@ class BlockVector
     typedef Number                  value_type;
     typedef value_type             *pointer;
     typedef const value_type       *const_pointer;
-    typedef BlockVectorIterators::Iterator<Number,false> iterator;
-    typedef BlockVectorIterators::Iterator<Number,true>  const_iterator;
+    typedef internal::BlockVectorIterators::Iterator<Number,false> iterator;
+    typedef internal::BlockVectorIterators::Iterator<Number,true>  const_iterator;
     typedef value_type             &reference;
     typedef const value_type       &const_reference;
     typedef size_t                  size_type;
@@ -1218,7 +1220,7 @@ class BlockVector
                                      */
 #ifndef DEAL_II_NAMESP_TEMPL_FRIEND_BUG
     template <typename N, bool C>
-    friend class BlockVectorIterators::Iterator;
+    friend class internal::BlockVectorIterators::Iterator;
 #else
     friend class iterator;
     friend class const_iterator;
@@ -1337,465 +1339,469 @@ BlockVector<Number>::get_block_indices () const
 }
 
 
-namespace BlockVectorIterators
+namespace internal
 {
-
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness>::
-  Iterator (const Iterator<number,constness> &c)
-                 :
-                 parent (c.parent),
-                 global_index (c.global_index),
-                 current_block (c.current_block),
-                 index_within_block (c.index_within_block),
-                 next_break_forward (c.next_break_forward),
-                 next_break_backward (c.next_break_backward)
-  {}
-
-
-
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness>::
-  Iterator (const InverseConstnessIterator &c)
-                 :
-                 parent (const_cast<BlockVectorType*>(c.parent)),
-                 global_index (c.global_index),
-                 current_block (c.current_block),
-                 index_within_block (c.index_within_block),
-                 next_break_forward (c.next_break_forward),
-                 next_break_backward (c.next_break_backward)
+  namespace BlockVectorIterators
   {
-                                    // if constness==false, then the
-                                    // constness of the iterator we
-                                    // got is true and we are trying
-                                    // to cast away the
-                                    // constness. disallow this
-    Assert (constness==true, ExcCastingAwayConstness());
-  }
+
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness>::
+    Iterator (const Iterator<number,constness> &c)
+                    :
+                    parent (c.parent),
+                    global_index (c.global_index),
+                    current_block (c.current_block),
+                    index_within_block (c.index_within_block),
+                    next_break_forward (c.next_break_forward),
+                    next_break_backward (c.next_break_backward)
+    {}
+
+
+
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness>::
+    Iterator (const InverseConstnessIterator &c)
+                    :
+                    parent (const_cast<BlockVectorType*>(c.parent)),
+                    global_index (c.global_index),
+                    current_block (c.current_block),
+                    index_within_block (c.index_within_block),
+                    next_break_forward (c.next_break_forward),
+                    next_break_backward (c.next_break_backward)
+    {
+                                       // if constness==false, then the
+                                       // constness of the iterator we
+                                       // got is true and we are trying
+                                       // to cast away the
+                                       // constness. disallow this
+      Assert (constness==true, ExcCastingAwayConstness());
+    }
   
 
 
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness>::
-  Iterator (BlockVectorType    &parent,
-           const unsigned int  global_index,
-           const unsigned int  current_block,
-           const unsigned int  index_within_block,
-           const unsigned int  next_break_forward,
-           const unsigned int  next_break_backward)
-                 :
-                 parent (&parent),
-                 global_index (global_index),
-                 current_block (current_block),
-                 index_within_block (index_within_block),
-                 next_break_forward (next_break_forward),
-                 next_break_backward (next_break_backward)
-  {
-  }
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness>::
+    Iterator (BlockVectorType    &parent,
+              const unsigned int  global_index,
+              const unsigned int  current_block,
+              const unsigned int  index_within_block,
+              const unsigned int  next_break_forward,
+              const unsigned int  next_break_backward)
+                    :
+                    parent (&parent),
+                    global_index (global_index),
+                    current_block (current_block),
+                    index_within_block (index_within_block),
+                    next_break_forward (next_break_forward),
+                    next_break_backward (next_break_backward)
+    {
+    }
   
 
 
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness> &
-  Iterator<number,constness>::
-  operator = (const Iterator &c)
-  {
-    parent              = c.parent;
-    global_index        = c.global_index;
-    index_within_block  = c.index_within_block;
-    current_block       = c.current_block;
-    next_break_forward  = c.next_break_forward;
-    next_break_backward = c.next_break_backward;
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness> &
+    Iterator<number,constness>::
+    operator = (const Iterator &c)
+    {
+      parent              = c.parent;
+      global_index        = c.global_index;
+      index_within_block  = c.index_within_block;
+      current_block       = c.current_block;
+      next_break_forward  = c.next_break_forward;
+      next_break_backward = c.next_break_backward;
 
-    return *this;
-  }
+      return *this;
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  typename Iterator<number,constness>::reference
-  Iterator<number,constness>::operator * () const
-  {
-                                    // we might want to return the
-                                    // following directly, but if we do
-                                    // that we run into a gcc bug where
-                                    // it complains that we return a
-                                    // reference to a temporary
-    reference p = parent->block(current_block)(index_within_block);
-    return p;
-  }
+    template <typename number, bool constness>
+    inline
+    typename Iterator<number,constness>::reference
+    Iterator<number,constness>::operator * () const
+    {
+                                       // we might want to return the
+                                       // following directly, but if we do
+                                       // that we run into a gcc bug where
+                                       // it complains that we return a
+                                       // reference to a temporary
+      reference p = parent->block(current_block)(index_within_block);
+      return p;
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  typename Iterator<number,constness>::pointer
-  Iterator<number,constness>::operator -> () const
-  {
-                                    // we might want to return the
-                                    // following directly, but if we do
-                                    // that we run into a gcc bug where
-                                    // it complains that we return a
-                                    // reference to a temporary
-    reference p = parent->block(current_block)(index_within_block);
-    return &p;
-  }
+    template <typename number, bool constness>
+    inline
+    typename Iterator<number,constness>::pointer
+    Iterator<number,constness>::operator -> () const
+    {
+                                       // we might want to return the
+                                       // following directly, but if we do
+                                       // that we run into a gcc bug where
+                                       // it complains that we return a
+                                       // reference to a temporary
+      reference p = parent->block(current_block)(index_within_block);
+      return &p;
+    }
   
 
 
-  template <typename number, bool constness>
-  inline
-  typename Iterator<number,constness>::reference
-  Iterator<number,constness>::operator [] (const difference_type d) const
-  {
-                                    // if the index pointed to is
-                                    // still within the block we
-                                    // currently point into, then we
-                                    // can save the computation of
-                                    // the block
-    if ((global_index+d >= next_break_backward) &&
-       (global_index+d <= next_break_forward))
-      {
-       reference p = parent->block(current_block)(index_within_block + d);
-       return p;
-      };
+    template <typename number, bool constness>
+    inline
+    typename Iterator<number,constness>::reference
+    Iterator<number,constness>::operator [] (const difference_type d) const
+    {
+                                       // if the index pointed to is
+                                       // still within the block we
+                                       // currently point into, then we
+                                       // can save the computation of
+                                       // the block
+      if ((global_index+d >= next_break_backward) &&
+          (global_index+d <= next_break_forward))
+        {
+          reference p = parent->block(current_block)(index_within_block + d);
+          return p;
+        };
     
     
-                                    // if the index is not within the
-                                    // block of the block vector into
-                                    // which we presently point, then
-                                    // there is no way: we have to
-                                    // search for the block. this can
-                                    // be done through the parent
-                                    // class as well.
-    reference p = (*parent)(global_index+d);
-    return p;
-  }
-
-
-
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness> &
-  Iterator<number,constness>::operator ++ ()
-  {
-    move_forward ();
-    return *this;
-  }
+                                       // if the index is not within the
+                                       // block of the block vector into
+                                       // which we presently point, then
+                                       // there is no way: we have to
+                                       // search for the block. this can
+                                       // be done through the parent
+                                       // class as well.
+      reference p = (*parent)(global_index+d);
+      return p;
+    }
+
+
+
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness> &
+    Iterator<number,constness>::operator ++ ()
+    {
+      move_forward ();
+      return *this;
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness>
-  Iterator<number,constness>::operator ++ (int)
-  {
-    const Iterator old_value = *this;
-    move_forward ();
-    return old_value;
-  }
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness>
+    Iterator<number,constness>::operator ++ (int)
+    {
+      const Iterator old_value = *this;
+      move_forward ();
+      return old_value;
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness> &
-  Iterator<number,constness>::operator -- ()
-  {
-    move_backward ();
-    return *this;
-  }
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness> &
+    Iterator<number,constness>::operator -- ()
+    {
+      move_backward ();
+      return *this;
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness>
-  Iterator<number,constness>::operator -- (int)
-  {
-    const Iterator old_value = *this;
-    move_backward ();
-    return old_value;
-  }
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness>
+    Iterator<number,constness>::operator -- (int)
+    {
+      const Iterator old_value = *this;
+      move_backward ();
+      return old_value;
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator == (const Iterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator == (const Iterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index == i.global_index);
-  }
+      return (global_index == i.global_index);
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator == (const InverseConstnessIterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator == (const InverseConstnessIterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index == i.global_index);
-  }
+      return (global_index == i.global_index);
+    }
   
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator != (const Iterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator != (const Iterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index != i.global_index);
-  }
+      return (global_index != i.global_index);
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator != (const InverseConstnessIterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator != (const InverseConstnessIterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index != i.global_index);
-  }
+      return (global_index != i.global_index);
+    }
   
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator < (const Iterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator < (const Iterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index < i.global_index);
-  }
+      return (global_index < i.global_index);
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator < (const InverseConstnessIterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator < (const InverseConstnessIterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index < i.global_index);
-  }
+      return (global_index < i.global_index);
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator <= (const Iterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator <= (const Iterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index <= i.global_index);
-  }
+      return (global_index <= i.global_index);
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator <= (const InverseConstnessIterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator <= (const InverseConstnessIterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index <= i.global_index);
-  }
+      return (global_index <= i.global_index);
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator > (const Iterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator > (const Iterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index > i.global_index);
-  }
+      return (global_index > i.global_index);
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator > (const InverseConstnessIterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator > (const InverseConstnessIterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index > i.global_index);
-  }
+      return (global_index > i.global_index);
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator >= (const Iterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator >= (const Iterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index >= i.global_index);
-  }
+      return (global_index >= i.global_index);
+    }
   
 
 
-  template <typename number, bool constness>
-  inline
-  bool
-  Iterator<number,constness>::operator >= (const InverseConstnessIterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    bool
+    Iterator<number,constness>::operator >= (const InverseConstnessIterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (global_index >= i.global_index);
-  }
+      return (global_index >= i.global_index);
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  typename Iterator<number,constness>::difference_type
-  Iterator<number,constness>::operator - (const Iterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    typename Iterator<number,constness>::difference_type
+    Iterator<number,constness>::operator - (const Iterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (static_cast<signed int>(global_index) -
-           static_cast<signed int>(i.global_index));
-  }
+      return (static_cast<signed int>(global_index) -
+              static_cast<signed int>(i.global_index));
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  typename Iterator<number,constness>::difference_type
-  Iterator<number,constness>::operator - (const InverseConstnessIterator &i) const
-  {
-    Assert (parent == i.parent, ExcPointerToDifferentVectors());
+    template <typename number, bool constness>
+    inline
+    typename Iterator<number,constness>::difference_type
+    Iterator<number,constness>::operator - (const InverseConstnessIterator &i) const
+    {
+      Assert (parent == i.parent, ExcPointerToDifferentVectors());
 
-    return (static_cast<signed int>(global_index) -
-           static_cast<signed int>(i.global_index));
-  }
+      return (static_cast<signed int>(global_index) -
+              static_cast<signed int>(i.global_index));
+    }
 
 
 
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness>
-  Iterator<number,constness>::operator + (const difference_type &d) const
-  {
-                                    // if the index pointed to is
-                                    // still within the block we
-                                    // currently point into, then we
-                                    // can save the computation of
-                                    // the block
-    if ((global_index+d >= next_break_backward) &&
-       (global_index+d <= next_break_forward))
-      return Iterator (*parent, global_index+d, current_block,
-                      index_within_block+d,
-                      next_break_forward, next_break_backward);
-    else
-                                      // outside present block, so
-                                      // have to seek new block
-                                      // anyway
-      return Iterator (*parent, global_index+d);
-  }
-
-
-
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness>
-  Iterator<number,constness>::operator - (const difference_type &d) const
-  {
-                                    // if the index pointed to is
-                                    // still within the block we
-                                    // currently point into, then we
-                                    // can save the computation of
-                                    // the block
-    if ((global_index-d >= next_break_backward) &&
-       (global_index-d <= next_break_forward))
-      return Iterator (*parent, global_index-d, current_block,
-                      index_within_block-d,
-                      next_break_forward, next_break_backward);
-    else
-                                      // outside present block, so
-                                      // have to seek new block
-                                      // anyway
-      return Iterator (*parent, global_index-d);
-  }
-
-
-
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness> &
-  Iterator<number,constness>::operator += (const difference_type &d)
-  {
-                                    // if the index pointed to is
-                                    // still within the block we
-                                    // currently point into, then we
-                                    // can save the computation of
-                                    // the block
-    if ((global_index+d >= next_break_backward) &&
-       (global_index+d <= next_break_forward))
-      {
-       global_index       += d;
-       index_within_block += d;
-      }
-    else
-                                      // outside present block, so
-                                      // have to seek new block
-                                      // anyway
-      *this = Iterator (*parent, global_index+d);
-
-    return *this;
-  }
-
-
-
-  template <typename number, bool constness>
-  inline
-  Iterator<number,constness> &
-  Iterator<number,constness>::operator -= (const difference_type &d)
-  {
-                                    // if the index pointed to is
-                                    // still within the block we
-                                    // currently point into, then we
-                                    // can save the computation of
-                                    // the block
-    if ((global_index-d >= next_break_backward) &&
-       (global_index-d <= next_break_forward))
-      {
-       global_index       -= d;
-       index_within_block -= d;
-      }
-    else
-                                      // outside present block, so
-                                      // have to seek new block
-                                      // anyway
-      *this = Iterator (*parent, global_index-d);
-
-    return *this;
-  }
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness>
+    Iterator<number,constness>::operator + (const difference_type &d) const
+    {
+                                       // if the index pointed to is
+                                       // still within the block we
+                                       // currently point into, then we
+                                       // can save the computation of
+                                       // the block
+      if ((global_index+d >= next_break_backward) &&
+          (global_index+d <= next_break_forward))
+        return Iterator (*parent, global_index+d, current_block,
+                         index_within_block+d,
+                         next_break_forward, next_break_backward);
+      else
+                                         // outside present block, so
+                                         // have to seek new block
+                                         // anyway
+        return Iterator (*parent, global_index+d);
+    }
+
+
+
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness>
+    Iterator<number,constness>::operator - (const difference_type &d) const
+    {
+                                       // if the index pointed to is
+                                       // still within the block we
+                                       // currently point into, then we
+                                       // can save the computation of
+                                       // the block
+      if ((global_index-d >= next_break_backward) &&
+          (global_index-d <= next_break_forward))
+        return Iterator (*parent, global_index-d, current_block,
+                         index_within_block-d,
+                         next_break_forward, next_break_backward);
+      else
+                                         // outside present block, so
+                                         // have to seek new block
+                                         // anyway
+        return Iterator (*parent, global_index-d);
+    }
+
+
+
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness> &
+    Iterator<number,constness>::operator += (const difference_type &d)
+    {
+                                       // if the index pointed to is
+                                       // still within the block we
+                                       // currently point into, then we
+                                       // can save the computation of
+                                       // the block
+      if ((global_index+d >= next_break_backward) &&
+          (global_index+d <= next_break_forward))
+        {
+          global_index       += d;
+          index_within_block += d;
+        }
+      else
+                                         // outside present block, so
+                                         // have to seek new block
+                                         // anyway
+        *this = Iterator (*parent, global_index+d);
+
+      return *this;
+    }
+
+
+
+    template <typename number, bool constness>
+    inline
+    Iterator<number,constness> &
+    Iterator<number,constness>::operator -= (const difference_type &d)
+    {
+                                       // if the index pointed to is
+                                       // still within the block we
+                                       // currently point into, then we
+                                       // can save the computation of
+                                       // the block
+      if ((global_index-d >= next_break_backward) &&
+          (global_index-d <= next_break_forward))
+        {
+          global_index       -= d;
+          index_within_block -= d;
+        }
+      else
+                                         // outside present block, so
+                                         // have to seek new block
+                                         // anyway
+        *this = Iterator (*parent, global_index-d);
+
+      return *this;
+    }
   
-}
+  } // namespace BlockVectorIterators
+
+} //namespace internal
 
 
 /**
index 8e256d307ce2bc7c118706c3b17a2aaeba48804d..66061cf4a82b4cb9eee12b1f13db8bc12569101a 100644 (file)
@@ -582,118 +582,120 @@ BlockVector<Number>::memory_consumption () const
 
 
 
-namespace BlockVectorIterators
+namespace internal
 {
-  
-
-  template <typename number, bool constness>
-  Iterator<number,constness>::
-  Iterator (BlockVectorType &parent,
-           const unsigned   global_index)
-                 :
-                 parent (&parent),
-                 global_index (global_index)
+  namespace BlockVectorIterators
   {
-                                    // find which block we are
-                                    // in. for this, take into
-                                    // account that it happens at
-                                    // times that people want to
-                                    // initialize iterators
-                                    // past-the-end
-    if (global_index < parent.size())
-      {
-       const std::pair<unsigned int, unsigned int>
-         indices = parent.block_indices.global_to_local(global_index);
-       current_block      = indices.first;
-       index_within_block = indices.second;
+
+    template <typename number, bool constness>
+    Iterator<number,constness>::
+    Iterator (BlockVectorType &parent,
+              const unsigned   global_index)
+                    :
+                    parent (&parent),
+                    global_index (global_index)
+    {
+                                       // find which block we are
+                                       // in. for this, take into
+                                       // account that it happens at
+                                       // times that people want to
+                                       // initialize iterators
+                                       // past-the-end
+      if (global_index < parent.size())
+        {
+          const std::pair<unsigned int, unsigned int>
+            indices = parent.block_indices.global_to_local(global_index);
+          current_block      = indices.first;
+          index_within_block = indices.second;
        
-       next_break_backward
-         = parent.block_indices.local_to_global (current_block, 0);
-       next_break_forward
-         = (parent.block_indices.local_to_global (current_block, 0)
-            +parent.block_indices.block_size(current_block)-1);
-      }
-    else
-                                      // past the end. only have one
-                                      // value for this
-      {
-       this->global_index  = parent.size ();
-       current_block       = parent.n_blocks();
-       index_within_block  = 0;
-       next_break_backward = global_index;
-       next_break_forward  = static_cast<unsigned int>(-1);
-      };
-  }
+          next_break_backward
+            = parent.block_indices.local_to_global (current_block, 0);
+          next_break_forward
+            = (parent.block_indices.local_to_global (current_block, 0)
+               +parent.block_indices.block_size(current_block)-1);
+        }
+      else
+                                         // past the end. only have one
+                                         // value for this
+        {
+          this->global_index  = parent.size ();
+          current_block       = parent.n_blocks();
+          index_within_block  = 0;
+          next_break_backward = global_index;
+          next_break_forward  = static_cast<unsigned int>(-1);
+        };
+    }
 
   
 
-  template <typename number, bool constness>
-  void
-  Iterator<number,constness>::move_forward ()
-  {
-    if (global_index != next_break_forward)
-      ++index_within_block;
-    else
-      {
-                                        // ok, we traverse a boundary
-                                        // between blocks:
-       index_within_block = 0;
-       ++current_block;
-
-                                        // break backwards is now old
-                                        // break forward
-       next_break_backward = next_break_forward+1;
-
-                                        // compute new break forward
-       if (current_block < parent->block_indices.size())
-         next_break_forward
-           += parent->block_indices.block_size(current_block);
-       else
-                                          // if we are beyond the end,
-                                          // then move the next
-                                          // boundary arbitrarily far
-                                          // away
-         next_break_forward = static_cast<unsigned int>(-1);
-      };
+    template <typename number, bool constness>
+    void
+    Iterator<number,constness>::move_forward ()
+    {
+      if (global_index != next_break_forward)
+        ++index_within_block;
+      else
+        {
+                                           // ok, we traverse a boundary
+                                           // between blocks:
+          index_within_block = 0;
+          ++current_block;
+
+                                           // break backwards is now old
+                                           // break forward
+          next_break_backward = next_break_forward+1;
+
+                                           // compute new break forward
+          if (current_block < parent->block_indices.size())
+            next_break_forward
+              += parent->block_indices.block_size(current_block);
+          else
+                                             // if we are beyond the end,
+                                             // then move the next
+                                             // boundary arbitrarily far
+                                             // away
+            next_break_forward = static_cast<unsigned int>(-1);
+        };
   
-    ++global_index;
-  }
+      ++global_index;
+    }
 
 
 
-  template <typename number, bool constness>
-  void
-  Iterator<number,constness>::move_backward ()
-  {
-    if (global_index != next_break_backward)
-      --index_within_block;
-    else
-      if (current_block != 0)
-       {
-                                          // ok, we traverse a boundary
-                                          // between blocks:
-         --current_block;
-         index_within_block = parent->block_indices.block_size(current_block)-1;
+    template <typename number, bool constness>
+    void
+    Iterator<number,constness>::move_backward ()
+    {
+      if (global_index != next_break_backward)
+        --index_within_block;
+      else
+        if (current_block != 0)
+          {
+                                             // ok, we traverse a boundary
+                                             // between blocks:
+            --current_block;
+            index_within_block = parent->block_indices.block_size(current_block)-1;
        
-                                          // break forwards is now old
-                                          // break backward
-         next_break_forward = next_break_backward-1;
+                                             // break forwards is now old
+                                             // break backward
+            next_break_forward = next_break_backward-1;
        
-                                          // compute new break forward
-         next_break_backward
-           -= parent->block_indices.block_size (current_block);
-       }
-      else
-                                        // current block was 0, we now
-                                        // get into unspecified terrain
-       {
-         --current_block;
-         index_within_block = static_cast<unsigned int>(-1);
-         next_break_forward = 0;
-         next_break_backward = 0;
-       };
+                                             // compute new break forward
+            next_break_backward
+              -= parent->block_indices.block_size (current_block);
+          }
+        else
+                                           // current block was 0, we now
+                                           // get into unspecified terrain
+          {
+            --current_block;
+            index_within_block = static_cast<unsigned int>(-1);
+            next_break_forward = 0;
+            next_break_backward = 0;
+          };
   
-    --global_index;
+      --global_index;
+    }
   }
 }
 
index 4ba71f08979bd4da210e2c2187b742d8084d6e59..54ae82e39b2209583aa1c06ae1985f2d37f8dbac 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2002 by the deal authors
+//    Copyright (C) 2000, 2001, 2002, 2003 by the deal authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -42,11 +42,15 @@ template void BlockVector<float>::equ<float>(const float,
 template void BlockVector<float>::scale<double>(const BlockVector<double>&);
 template void BlockVector<float>::scale<float>(const BlockVector<float>&);
 
-namespace BlockVectorIterators
+namespace internal
 {
-  template class Iterator<double,false>;
-  template class Iterator<double,true>;
+  namespace BlockVectorIterators
+  {
+    template class Iterator<double,false>;
+    template class Iterator<double,true>;
 
-  template class Iterator<float,false>;
-  template class Iterator<float,true>;
+    template class Iterator<float,false>;
+    template class Iterator<float,true>;
+  }
 }
+

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.