]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Change types::global_dof_index to size_type in lac directory.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 18 Feb 2013 16:01:20 +0000 (16:01 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 18 Feb 2013 16:01:20 +0000 (16:01 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@28454 0785d39b-7218-0410-832d-ea1e28bc413d

40 files changed:
deal.II/files
deal.II/include/deal.II/base/types.h
deal.II/include/deal.II/lac/arpack_solver.h
deal.II/include/deal.II/lac/block_indices.h
deal.II/include/deal.II/lac/block_list.h
deal.II/include/deal.II/lac/block_matrix_array.h
deal.II/include/deal.II/lac/block_matrix_base.h
deal.II/include/deal.II/lac/block_sparse_matrix.h
deal.II/include/deal.II/lac/block_sparse_matrix.templates.h
deal.II/include/deal.II/lac/block_sparse_matrix_ez.h
deal.II/include/deal.II/lac/block_sparse_matrix_ez.templates.h
deal.II/include/deal.II/lac/block_sparsity_pattern.h
deal.II/include/deal.II/lac/block_vector.h
deal.II/include/deal.II/lac/block_vector.templates.h
deal.II/include/deal.II/lac/block_vector_base.h
deal.II/include/deal.II/lac/chunk_sparse_matrix.h
deal.II/include/deal.II/lac/chunk_sparse_matrix.templates.h
deal.II/include/deal.II/lac/chunk_sparsity_pattern.h
deal.II/include/deal.II/lac/compressed_set_sparsity_pattern.h
deal.II/include/deal.II/lac/compressed_simple_sparsity_pattern.h
deal.II/include/deal.II/lac/compressed_sparsity_pattern.h
deal.II/include/deal.II/lac/constraint_matrix.h
deal.II/include/deal.II/lac/constraint_matrix.templates.h
deal.II/include/deal.II/lac/parallel_block_vector.h
deal.II/include/deal.II/lac/parallel_vector.h
deal.II/include/deal.II/lac/parallel_vector.templates.h
deal.II/include/deal.II/lac/trilinos_block_sparse_matrix.h
deal.II/include/deal.II/lac/trilinos_precondition.h
deal.II/include/deal.II/lac/trilinos_sparse_matrix.h
deal.II/include/deal.II/lac/trilinos_sparsity_pattern.h
deal.II/include/deal.II/lac/trilinos_vector.h
deal.II/include/deal.II/lac/trilinos_vector_base.h
deal.II/include/deal.II/lac/vector.h
deal.II/source/lac/block_matrix_array.cc
deal.II/source/lac/block_sparsity_pattern.cc
deal.II/source/lac/chunk_sparsity_pattern.cc
deal.II/source/lac/compressed_set_sparsity_pattern.cc
deal.II/source/lac/compressed_simple_sparsity_pattern.cc
deal.II/source/lac/compressed_sparsity_pattern.cc
deal.II/source/lac/constraint_matrix.cc

index 4c1472e0610132552ffb94461f60f44fb9f86a90..dddf84496343d7af029ea273fd4a8b172488ae55 100644 (file)
@@ -112,7 +112,7 @@ NATASHA source/hp/dof_objects.cc
 BRUNO source/hp/fe_collection.cc
 MARKUS source/hp/fe_values.cc
 BRUNO source/hp/mapping_collection.cc
-source/lac/block_matrix_array.cc
+BRUNO source/lac/block_matrix_array.cc
 MARKUS source/lac/block_sparse_matrix.cc
 MARKUS source/lac/block_sparse_matrix_ez.cc
 MARKUS source/lac/block_sparsity_pattern.cc
@@ -356,11 +356,11 @@ BRUNO include/deal.II/integrators/laplace.h
 BRUNO include/deal.II/integrators/local_integrators.h
 BRUNO include/deal.II/integrators/maxwell.h
 BRUNO include/deal.II/integrators/patches.h
-include/deal.II/lac/arpack_solver.h
-include/deal.II/lac/block_indices.h
-include/deal.II/lac/block_list.h
-include/deal.II/lac/block_matrix_array.h
-include/deal.II/lac/block_matrix_base.h
+BRUNO include/deal.II/lac/arpack_solver.h
+BRUNO include/deal.II/lac/block_indices.h
+BRUNO include/deal.II/lac/block_list.h
+BRUNO include/deal.II/lac/block_matrix_array.h
+BRUNO include/deal.II/lac/block_matrix_base.h
 include/deal.II/lac/block_matrix.h
 MARKUS include/deal.II/lac/block_sparse_matrix_ez.h
 MARKUS include/deal.II/lac/block_sparse_matrix_ez.templates.h
index 3e762a1276a6cc572eee8de05e9dab61ea6b63a9..cfa6313ccff6ee3239c7dc277b7f330001a0519a 100644 (file)
@@ -164,6 +164,24 @@ namespace numbers
   static const unsigned int
   invalid_unsigned_int = static_cast<unsigned int> (-1);
 
+  /**
+   * Representation of the
+   * largest number that
+   * can be put into a
+   * size_type. This value 
+   * is used throughout 
+   * the library as a 
+   * marker for an
+   * invalid size_type
+   * value, such as
+   * an invalid array
+   * index, an invalid
+   * array size, and the
+   * like.
+   */
+  static const size_type
+  invalid_size_type = static_cast<size_type> (-1);
+
   /**
                            * An invalid value for indices of degrees
                            * of freedom.
index b569834e21825f1885bf5f8b424ef56ee9ab4319..f89bd00fb021ede0f00e94df3df0c494ba5f76c1 100644 (file)
@@ -76,6 +76,12 @@ extern "C" void dneupd_(int *rvec, char *howmany, int *select, double *d,
 class ArpackSolver : public Subscriptor
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std::size_t size_type;
+
+
   /**
    * An enum that lists the possible
    * choices for which eigenvalues to
@@ -365,7 +371,7 @@ void ArpackSolver::solve (
               tmp.reinit(src);
 
 
-              for (unsigned int i=0; i<src.size(); ++i)
+              for (size_type i=0; i<src.size(); ++i)
                 src(i) = *(workd+ipntr[0]-1+i);
 
               // multiplication with mass matrix M
@@ -373,7 +379,7 @@ void ArpackSolver::solve (
               // solving linear system
               inverse.vmult(dst,tmp);
 
-              for (unsigned int i=0; i<dst.size(); ++i)
+              for (size_type i=0; i<dst.size(); ++i)
                 *(workd+ipntr[1]-1+i) = dst(i);
             }
             break;
@@ -387,7 +393,7 @@ void ArpackSolver::solve (
               tmp.reinit(src);
               tmp2.reinit(src);
 
-              for (unsigned int i=0; i<src.size(); ++i)
+              for (size_type i=0; i<src.size(); ++i)
                 {
                   src(i) = *(workd+ipntr[2]-1+i);
                   tmp(i) = *(workd+ipntr[0]-1+i);
@@ -395,7 +401,7 @@ void ArpackSolver::solve (
               // solving linear system
               inverse.vmult(dst,src);
 
-              for (unsigned int i=0; i<dst.size(); ++i)
+              for (size_type i=0; i<dst.size(); ++i)
                 *(workd+ipntr[1]-1+i) = dst(i);
             }
             break;
@@ -407,13 +413,13 @@ void ArpackSolver::solve (
               src.reinit(eigenvectors[0]);
               dst.reinit(src);
 
-              for (unsigned int i=0; i<src.size(); ++i)
+              for (size_type i=0; i<src.size(); ++i)
                 src(i) = *(workd+ipntr[0]-1+i);
 
               // Multiplication with mass matrix M
               mass_matrix.vmult(dst, src);
 
-              for (unsigned int i=0; i<dst.size(); ++i)
+              for (size_type i=0; i<dst.size(); ++i)
                 *(workd+ipntr[1]-1+i) = dst(i);
 
             }
@@ -480,7 +486,7 @@ void ArpackSolver::solve (
           Assert (false, ExcArpackInfodneupd(info));
         }
 
-      for (unsigned int i=0; i<eigenvectors.size(); ++i)
+      for (size_type i=0; i<eigenvectors.size(); ++i)
         for (unsigned int j=0; j<n; ++j)
           eigenvectors[i](j) = v[i*n+j];
 
@@ -489,7 +495,7 @@ void ArpackSolver::solve (
       AssertDimension (eigenvalues.size(), eigenvalues_real.size());
       AssertDimension (eigenvalues.size(), eigenvalues_im.size());
 
-      for (unsigned int i=0; i<eigenvalues.size(); ++i)
+      for (size_type i=0; i<eigenvalues.size(); ++i)
         {
           eigenvalues[i].real() = eigenvalues_real[i];
           eigenvalues[i].imag() = eigenvalues_im[i];
index a05d6492f53e3979e5ea93518057ef1bedf5e9c3..2cd2dac063040f7752f139e5b2a3a8932b27a031 100644 (file)
@@ -49,6 +49,10 @@ DEAL_II_NAMESPACE_OPEN
 class BlockIndices : public Subscriptor
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std::size_t size_type;
 
   /**
    * Default
@@ -64,21 +68,21 @@ public:
    * number of blocks will be the
    * size of the vector
    */
-  BlockIndices (const std::vector<unsigned int> &n);
+  BlockIndices (const std::vector<size_type> &n);
 
   /**
    * Specialized constructor for a
    * structure with blocks of equal size.
    */
-  explicit BlockIndices(const unsigned int n_blocks, const unsigned int block_size = 0);
+  explicit BlockIndices(const size_type n_blocks, const size_type block_size = 0);
 
   /**
    * Reinitialize the number of
    * blocks and assign each block
    * the same number of elements.
    */
-  void reinit (const unsigned int n_blocks,
-               const unsigned int n_elements_per_block);
+  void reinit (const size_type n_blocks,
+               const size_type n_elements_per_block);
 
   /**
    * Reinitialize the number of
@@ -89,14 +93,14 @@ public:
    * of block @p i is set to
    * <tt>n[i]</tt>.
    */
-  void reinit (const std::vector<unsigned int> &n);
+  void reinit (const std::vector<size_type> &n);
 
   /**
    * Add another block of given
    * size to the end of the block
    * structure.
    */
-  void push_back(const unsigned int size);
+  void push_back(const size_type size);
 
   /**
    * @name Size information
@@ -106,7 +110,7 @@ public:
   /**
    * Number of blocks in index field.
    */
-  unsigned int size () const;
+  size_type size () const;
 
   /**
    * Return the total number of
@@ -115,12 +119,12 @@ public:
    * of the vector space of the
    * block vector.
    */
-  unsigned int total_size () const;
+  size_type total_size () const;
 
   /**
    * The size of the @p ith block.
    */
-  unsigned int block_size (const unsigned int i) const;
+  size_type block_size (const size_type i) const;
 
   //@}
 
@@ -147,20 +151,20 @@ public:
    * the block, the second the
    * index within it.
    */
-  std::pair<unsigned int,unsigned int>
-  global_to_local (const unsigned int i) const;
+  std::pair<size_type,size_type>
+  global_to_local (const size_type i) const;
 
   /**
    * Return the global index of
    * @p index in block @p block.
    */
-  unsigned int local_to_global (const unsigned int block,
-                                const unsigned int index) const;
+  size_type local_to_global (const size_type block,
+                             const size_type index) const;
 
   /**
    * The start index of the ith block.
    */
-  unsigned int block_start (const unsigned int i) const;
+  size_type block_start (const size_type i) const;
   //@}
 
   /**
@@ -198,7 +202,7 @@ private:
    * we cache this value for faster
    * access.
    */
-  unsigned int n_blocks;
+  size_type n_blocks;
 
   /**
    * Global starting index of each
@@ -206,7 +210,7 @@ private:
    * value is the total number of
    * entries.
    */
-  std::vector<unsigned int> start_indices;
+  std::vector<size_type> start_indices;
 };
 
 
@@ -222,13 +226,13 @@ inline
 LogStream &
 operator << (LogStream &s, const BlockIndices &bi)
 {
-  const unsigned int n = bi.size();
+  const size_type n = bi.size();
   s << n << ":[";
   // Write first size without leading space
   if (n>0)
     s << bi.block_size(0);
   // Write all other sizes
-  for (unsigned int i=1; i<n; ++i)
+  for (size_type i=1; i<n; ++i)
     s << ' ' << bi.block_size(i);
   s << "]->" << bi.total_size();
   return s;
@@ -328,12 +332,12 @@ const bool IsBlockMatrix<MatrixType>::value;
 
 inline
 void
-BlockIndices::reinit (const unsigned int nb,
-                      const unsigned int block_size)
+BlockIndices::reinit (const size_type nb,
+                      const size_type block_size)
 {
   n_blocks = nb;
   start_indices.resize(n_blocks+1);
-  for (unsigned int i=0; i<=n_blocks; ++i)
+  for (size_type i=0; i<=n_blocks; ++i)
     start_indices[i] = i * block_size;
 }
 
@@ -341,7 +345,7 @@ BlockIndices::reinit (const unsigned int nb,
 
 inline
 void
-BlockIndices::reinit (const std::vector<unsigned int> &n)
+BlockIndices::reinit (const std::vector<size_type> &n)
 {
   if (start_indices.size() != n.size()+1)
     {
@@ -349,7 +353,7 @@ BlockIndices::reinit (const std::vector<unsigned int> &n)
       start_indices.resize(n_blocks+1);
     }
   start_indices[0] = 0;
-  for (unsigned int i=1; i<=n_blocks; ++i)
+  for (size_type i=1; i<=n_blocks; ++i)
     start_indices[i] = start_indices[i-1] + n[i-1];
 }
 
@@ -365,20 +369,20 @@ BlockIndices::BlockIndices ()
 
 inline
 BlockIndices::BlockIndices (
-  const unsigned int n_blocks,
-  const unsigned int block_size)
+  const size_type n_blocks,
+  const size_type block_size)
   :
   n_blocks(n_blocks),
   start_indices(n_blocks+1)
 {
-  for (unsigned int i=0; i<=n_blocks; ++i)
+  for (size_type i=0; i<=n_blocks; ++i)
     start_indices[i] = i * block_size;
 }
 
 
 
 inline
-BlockIndices::BlockIndices (const std::vector<unsigned int> &n)
+BlockIndices::BlockIndices (const std::vector<size_type> &n)
   :
   n_blocks(n.size()),
   start_indices(n.size()+1)
@@ -389,7 +393,7 @@ BlockIndices::BlockIndices (const std::vector<unsigned int> &n)
 
 inline
 void
-BlockIndices::push_back(const unsigned int sz)
+BlockIndices::push_back(const size_type sz)
 {
   start_indices.push_back(start_indices[n_blocks]+sz);
   ++n_blocks;
@@ -398,8 +402,8 @@ BlockIndices::push_back(const unsigned int sz)
 
 
 inline
-std::pair<unsigned int,unsigned int>
-BlockIndices::global_to_local (const unsigned int i) const
+std::pair<size_type,size_type>
+BlockIndices::global_to_local (const size_type i) const
 {
   Assert (i<total_size(), ExcIndexRange(i, 0, total_size()));
 
@@ -407,15 +411,15 @@ BlockIndices::global_to_local (const unsigned int i) const
   while (i < start_indices[block])
     --block;
 
-  return std::pair<unsigned int,unsigned int>(block,
+  return std::pair<size_type,size_type>(block,
                                               i-start_indices[block]);
 }
 
 
 inline
-unsigned int
-BlockIndices::local_to_global (const unsigned int block,
-                               const unsigned int index) const
+size_type
+BlockIndices::local_to_global (const size_type block,
+                               const size_type index) const
 {
   Assert (block < n_blocks, ExcIndexRange(block, 0, n_blocks));
   Assert (index < start_indices[block+1]-start_indices[block],
@@ -426,7 +430,7 @@ BlockIndices::local_to_global (const unsigned int block,
 
 
 inline
-unsigned int
+size_type 
 BlockIndices::size () const
 {
   return n_blocks;
@@ -435,7 +439,7 @@ BlockIndices::size () const
 
 
 inline
-unsigned int
+size_type
 BlockIndices::total_size () const
 {
   if (n_blocks == 0) return 0;
@@ -445,8 +449,8 @@ BlockIndices::total_size () const
 
 
 inline
-unsigned int
-BlockIndices::block_size (const unsigned int block) const
+size_type 
+BlockIndices::block_size (const size_type block) const
 {
   Assert (block < n_blocks, ExcIndexRange(block, 0, n_blocks));
   return start_indices[block+1]-start_indices[block];
@@ -455,8 +459,8 @@ BlockIndices::block_size (const unsigned int block) const
 
 
 inline
-unsigned int
-BlockIndices::block_start (const unsigned int block) const
+size_type
+BlockIndices::block_start (const size_type block) const
 {
   Assert (block < n_blocks, ExcIndexRange(block, 0, n_blocks));
   return start_indices[block];
@@ -482,7 +486,7 @@ BlockIndices::operator == (const BlockIndices &b) const
   if (n_blocks != b.n_blocks)
     return false;
 
-  for (unsigned int i=0; i<=n_blocks; ++i)
+  for (size_type i=0; i<=n_blocks; ++i)
     if (start_indices[i] != b.start_indices[i])
       return false;
 
@@ -498,7 +502,7 @@ BlockIndices::swap (BlockIndices &b)
   Assert (n_blocks == b.n_blocks,
           ExcDimensionMismatch(n_blocks, b.n_blocks));
 
-  for (unsigned int i=0; i<=n_blocks; ++i)
+  for (size_type i=0; i<=n_blocks; ++i)
     std::swap (start_indices[i], b.start_indices[i]);
 }
 
index 04c312d8065782e63e8ffd0422c0b55c7ef9242c..ef083063539705b71f22cb16f3aa9c899b2ddc89 100644 (file)
@@ -48,8 +48,13 @@ class BlockList :
   public Subscriptor
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std::size_t size_type;
+
   /// The container for each index set
-  typedef std::vector<unsigned int> block_container;
+  typedef std::vector<size_type> block_container;
   /// The iterator for individual indices
   typedef block_container::const_iterator const_iterator;
 
@@ -65,7 +70,7 @@ public:
    * argument is the dimension of
    * the vector space.
    */
-  void create_sparsity_pattern(SparsityPattern &sparsity, unsigned int n) const;
+  void create_sparsity_pattern(SparsityPattern &sparsity, size_type n) const;
 
   /**
    * Add the indices in
@@ -73,7 +78,7 @@ public:
    * <tt>block</tt>, eliminating
    * repeated indices.
    */
-  void add(unsigned int block, const std::vector<unsigned int> &indices);
+  void add(size_type block, const std::vector<size_type> &indices);
 
   /**
    * Add the indices in
@@ -83,16 +88,16 @@ public:
    * those indices for which
    * <tt>selected_indices</tt> is true.
    */
-  void add(unsigned int block,
-           const std::vector<unsigned int> &indices,
+  void add(size_type block,
+           const std::vector<size_type> &indices,
            const std::vector<bool> &selected_indices,
-           unsigned int offset = 0);
+           size_type offset = 0);
 
   /**
    * Just set up the correct size
    * and assign indices to blocks later.
    */
-  void initialize(unsigned int n_blocks);
+  void initialize(size_type n_blocks);
 
   /**
    * Set up all index sets using an
@@ -110,7 +115,7 @@ public:
    * blocks as its first argument.
    */
   template <typename ITERATOR>
-  void initialize(unsigned int n_blocks,
+  void initialize(size_type n_blocks,
                   const ITERATOR begin,
                   const typename identity<ITERATOR>::type end);
 
@@ -133,7 +138,7 @@ public:
    * blocks as its first argument.
    */
   template <typename ITERATOR>
-  void initialize_mg(unsigned int n_blocks,
+  void initialize_mg(size_type n_blocks,
                      const ITERATOR begin,
                      const typename identity<ITERATOR>::type end) DEAL_II_DEPRECATED;
 
@@ -169,11 +174,11 @@ public:
    * blocks as its first argument.
    */
   template <typename ITERATOR>
-  void initialize(unsigned int n_blocks,
+  void initialize(size_type n_blocks,
                   const ITERATOR begin,
                   const typename identity<ITERATOR>::type end,
                   const std::vector<bool> &selected_dofs,
-                  unsigned int offset = 0) DEAL_II_DEPRECATED;
+                  size_type offset = 0) DEAL_II_DEPRECATED;
   /**
    * @deprecated This function will
    * move to DoFTools.
@@ -206,11 +211,11 @@ public:
    * blocks as its first argument.
    */
   template <typename ITERATOR>
-  void initialize_mg(unsigned int n_blocks,
+  void initialize_mg(size_type n_blocks,
                      const ITERATOR begin,
                      const typename identity<ITERATOR>::type end,
                      const std::vector<bool> &selected_dofs,
-                     unsigned int offset = 0) DEAL_II_DEPRECATED;
+                     size_type offset = 0) DEAL_II_DEPRECATED;
 
   /**
    * @deprecated This function will
@@ -224,11 +229,11 @@ public:
    * around a vertex.
    */
   template <int dim, typename ITERATOR>
-  void initialize_vertex_patches_mg(unsigned int n_blocks,
+  void initialize_vertex_patches_mg(size_type n_blocks,
                                     const ITERATOR begin,
                                     const typename identity<ITERATOR>::type end,
                                     const std::vector<bool> &selected_dofs = std::vector<bool>(),
-                                    unsigned int offset = 0) DEAL_II_DEPRECATED;
+                                    size_type offset = 0) DEAL_II_DEPRECATED;
 
   /**
    * @deprecated This function will
@@ -255,29 +260,29 @@ public:
   /**
    * The number of blocks.
    */
-  unsigned int size() const;
+  size_type size() const;
 
   /**
    * The size of a single block.
    */
-  unsigned int block_size(unsigned int block) const;
+  size_type block_size(size_type block) const;
 
   /**
    * Iterator to the first index in block.
    */
-  const_iterator begin(unsigned int block) const;
+  const_iterator begin(size_type block) const;
   /**
    * End iterator for a single block.
    */
-  const_iterator end(unsigned int block) const;
+  const_iterator end(size_type block) const;
   /**
    * Return the position of
    * <tt>index</tt> in
    * <tt>block</tt>, or
-   * numbers::invalid_unsigned_int,
+   * numbers::invalid_size_type,
    * if the index is not in the block.
    */
-  unsigned int local_index(unsigned int block, unsigned int index) const;
+  size_type local_index(size_type block, size_type index) const;
 
 private:
   /**
@@ -289,14 +294,14 @@ private:
 
 inline
 void
-BlockList::create_sparsity_pattern(SparsityPattern &sparsity, unsigned int n) const
+BlockList::create_sparsity_pattern(SparsityPattern &sparsity, size_type n) const
 {
-  std::vector<unsigned int> sizes(size());
-  for (unsigned int b=0; b<size(); ++b)
+  std::vector<size_type> sizes(size());
+  for (size_type b=0; b<size(); ++b)
     sizes[b] = block_size(b);
 
   sparsity.reinit(size(), n, sizes);
-  for (unsigned int b=0; b<size(); ++b)
+  for (size_type b=0; b<size(); ++b)
     {
       for (const_iterator i = begin(b); i != end(b); ++i)
         sparsity.add(b,*i);
@@ -307,14 +312,14 @@ BlockList::create_sparsity_pattern(SparsityPattern &sparsity, unsigned int n) co
 
 inline
 void
-BlockList::add(const unsigned int block, const std::vector<unsigned int> &indices)
+BlockList::add(const size_type block, const std::vector<size_type> &indices)
 {
   AssertIndexRange(block, index_sets.size());
 
-  for (unsigned int i=0; i<indices.size(); ++i)
+  for (size_type i=0; i<indices.size(); ++i)
     {
-      const unsigned int k = indices[i];
-      if (k==numbers::invalid_unsigned_int)
+      const size_type k = indices[i];
+      if (k==numbers::invalid_size_type)
         continue;
       if (std::find(index_sets[block].begin(), index_sets[block].end(), k)
           == index_sets[block].end())
@@ -326,18 +331,18 @@ BlockList::add(const unsigned int block, const std::vector<unsigned int> &indice
 inline
 void
 BlockList::add(
-  const unsigned int block,
-  const std::vector<unsigned int> &indices,
+  const size_type block,
+  const std::vector<size_type> &indices,
   const std::vector<bool> &selected,
-  unsigned int offset)
+  size_type offset)
 {
   AssertIndexRange(block, index_sets.size());
   AssertDimension(indices.size(), selected.size());
 
-  for (unsigned int i=0; i<indices.size(); ++i)
+  for (size_type i=0; i<indices.size(); ++i)
     {
-      const unsigned int k = indices[i];
-      if (k==numbers::invalid_unsigned_int)
+      const types_global_dof_indices k = indices[i];
+      if (k==numbers::invalid_size_type)
         continue;
       if (selected[i] && std::find(index_sets[block].begin(), index_sets[block].end(), k-offset)
           == index_sets[block].end())
@@ -348,7 +353,7 @@ BlockList::add(
 
 inline
 void
-BlockList::initialize(unsigned int n_blocks)
+BlockList::initialize(size_type n_blocks)
 {
   index_sets.resize(n_blocks);
 }
@@ -357,11 +362,11 @@ BlockList::initialize(unsigned int n_blocks)
 template <typename ITERATOR>
 inline
 void
-BlockList::initialize(unsigned int n_blocks, const ITERATOR begin, const typename identity<ITERATOR>::type end)
+BlockList::initialize(size_type n_blocks, const ITERATOR begin, const typename identity<ITERATOR>::type end)
 {
   index_sets.resize(n_blocks);
-  std::vector<unsigned int> indices;
-  unsigned int k = 0;
+  std::vector<size_type> indices;
+  size_type k = 0;
   for (ITERATOR cell = begin; cell != end; ++cell, ++k)
     {
       indices.resize(cell->get_fe().dofs_per_cell);
@@ -374,11 +379,11 @@ BlockList::initialize(unsigned int n_blocks, const ITERATOR begin, const typenam
 template <typename ITERATOR>
 inline
 void
-BlockList::initialize_mg(unsigned int n_blocks, const ITERATOR begin, const typename identity<ITERATOR>::type end)
+BlockList::initialize_mg(size_type n_blocks, const ITERATOR begin, const typename identity<ITERATOR>::type end)
 {
   index_sets.resize(n_blocks);
-  std::vector<unsigned int> indices;
-  unsigned int k = 0;
+  std::vector<size_type> indices;
+  size_type k = 0;
   for (ITERATOR cell = begin; cell != end; ++cell, ++k)
     {
       indices.resize(cell->get_fe().dofs_per_cell);
@@ -392,15 +397,15 @@ template <typename ITERATOR>
 inline
 void
 BlockList::initialize(
-  unsigned int n_blocks,
+  size_type n_blocks,
   const ITERATOR begin,
   const typename identity<ITERATOR>::type end,
   const std::vector<bool> &selected_dofs,
-  unsigned int offset)
+  size_type offset)
 {
   index_sets.resize(n_blocks);
-  std::vector<unsigned int> indices;
-  unsigned int k = 0;
+  std::vector<size_type> indices;
+  size_type k = 0;
   for (ITERATOR cell = begin; cell != end; ++cell, ++k)
     {
       indices.resize(cell->get_fe().dofs_per_cell);
@@ -416,15 +421,15 @@ template <typename ITERATOR>
 inline
 void
 BlockList::initialize_mg(
-  unsigned int n_blocks,
+  size_type n_blocks,
   const ITERATOR begin,
   const typename identity<ITERATOR>::type end,
   const std::vector<bool> &selected_dofs,
-  unsigned int offset)
+  size_type offset)
 {
   index_sets.resize(n_blocks);
-  std::vector<unsigned int> indices;
-  unsigned int k = 0;
+  std::vector<size_type> indices;
+  size_type k = 0;
   for (ITERATOR cell = begin; cell != end; ++cell, ++k)
     {
       indices.resize(cell->get_fe().dofs_per_cell);
@@ -494,11 +499,11 @@ template <int dim, typename ITERATOR>
 inline
 void
 BlockList::initialize_vertex_patches_mg(
-  unsigned int n_blocks,
+  size_type n_blocks,
   const ITERATOR begin,
   const typename identity<ITERATOR>::type end,
   const std::vector<bool> &selected_dofs,
-  unsigned int offset)
+  size_type offset)
 {
   Assert(selected_dofs.size() == 0, ExcNotImplemented());
   Assert(offset==0, ExcNotImplemented());
@@ -506,8 +511,8 @@ BlockList::initialize_vertex_patches_mg(
   Assert(fe.dofs_per_vertex == 0, ExcNotImplemented());
 
   index_sets.resize(n_blocks);
-  std::vector<unsigned int> indices;
-  unsigned int k = 0;
+  std::vector<size_type> indices;
+  size_type k = 0;
   for (ITERATOR cell = begin; cell != end; ++cell)
     {
       if (cell_generates_vertex_patch<dim>(cell, true))
@@ -520,52 +525,52 @@ BlockList::initialize_vertex_patches_mg(
               cell->neighbor(4)->get_mg_dof_indices(indices);
               for (unsigned int i=0; i<fe.dofs_per_face; ++i)
                 {
-                  indices[fe.face_to_cell_index(i,1)] = numbers::invalid_unsigned_int;
-                  indices[fe.face_to_cell_index(i,3)] = numbers::invalid_unsigned_int;
-                  indices[fe.face_to_cell_index(i,4)] = numbers::invalid_unsigned_int;
+                  indices[fe.face_to_cell_index(i,1)] = numbers::invalid_dof_index;
+                  indices[fe.face_to_cell_index(i,3)] = numbers::invalid_dof_index;
+                  indices[fe.face_to_cell_index(i,4)] = numbers::invalid_dof_index;
                 }
               add(k, indices);
               cell->neighbor(4)->neighbor(0)->get_mg_dof_indices(indices);
               for (unsigned int i=0; i<fe.dofs_per_face; ++i)
                 {
-                  indices[fe.face_to_cell_index(i,0)] = numbers::invalid_unsigned_int;
-                  indices[fe.face_to_cell_index(i,3)] = numbers::invalid_unsigned_int;
-                  indices[fe.face_to_cell_index(i,4)] = numbers::invalid_unsigned_int;
+                  indices[fe.face_to_cell_index(i,0)] = numbers::invalid_dof_index;
+                  indices[fe.face_to_cell_index(i,3)] = numbers::invalid_dof_index;
+                  indices[fe.face_to_cell_index(i,4)] = numbers::invalid_dof_index;
                 }
               add(k, indices);
               cell->neighbor(4)->neighbor(2)->get_mg_dof_indices(indices);
               for (unsigned int i=0; i<fe.dofs_per_face; ++i)
                 {
-                  indices[fe.face_to_cell_index(i,1)] = numbers::invalid_unsigned_int;
-                  indices[fe.face_to_cell_index(i,2)] = numbers::invalid_unsigned_int;
-                  indices[fe.face_to_cell_index(i,4)] = numbers::invalid_unsigned_int;
+                  indices[fe.face_to_cell_index(i,1)] = numbers::invalid_dof_index;
+                  indices[fe.face_to_cell_index(i,2)] = numbers::invalid_dof_index;
+                  indices[fe.face_to_cell_index(i,4)] = numbers::invalid_dof_index;
                 }
               add(k, indices);
               cell->neighbor(4)->neighbor(2)->neighbor(0)->get_mg_dof_indices(indices);
               for (unsigned int i=0; i<fe.dofs_per_face; ++i)
                 {
-                  indices[fe.face_to_cell_index(i,0)] = numbers::invalid_unsigned_int;
-                  indices[fe.face_to_cell_index(i,2)] = numbers::invalid_unsigned_int;
-                  indices[fe.face_to_cell_index(i,4)] = numbers::invalid_unsigned_int;
+                  indices[fe.face_to_cell_index(i,0)] = numbers::invalid_dof_index;
+                  indices[fe.face_to_cell_index(i,2)] = numbers::invalid_dof_index;
+                  indices[fe.face_to_cell_index(i,4)] = numbers::invalid_dof_index;
                 }
               add(k, indices);
             case 2:
               cell->neighbor(2)->get_mg_dof_indices(indices);
               for (unsigned int i=0; i<fe.dofs_per_face; ++i)
                 {
-                  indices[fe.face_to_cell_index(i,1)] = numbers::invalid_unsigned_int;
-                  indices[fe.face_to_cell_index(i,2)] = numbers::invalid_unsigned_int;
+                  indices[fe.face_to_cell_index(i,1)] = numbers::invalid_dof_index;
+                  indices[fe.face_to_cell_index(i,2)] = numbers::invalid_dof_index;
                   if (dim>2)
-                    indices[fe.face_to_cell_index(i,5)] = numbers::invalid_unsigned_int;
+                    indices[fe.face_to_cell_index(i,5)] = numbers::invalid_dof_index;
                 }
               add(k, indices);
               cell->neighbor(2)->neighbor(0)->get_mg_dof_indices(indices);
               for (unsigned int i=0; i<fe.dofs_per_face; ++i)
                 {
-                  indices[fe.face_to_cell_index(i,0)] = numbers::invalid_unsigned_int;
-                  indices[fe.face_to_cell_index(i,2)] = numbers::invalid_unsigned_int;
+                  indices[fe.face_to_cell_index(i,0)] = numbers::invalid_dof_index;
+                  indices[fe.face_to_cell_index(i,2)] = numbers::invalid_dof_index;
                   if (dim>2)
-                    indices[fe.face_to_cell_index(i,5)] = numbers::invalid_unsigned_int;
+                    indices[fe.face_to_cell_index(i,5)] = numbers::invalid_dof_index;
                 }
               add(k, indices);
               // no break here
@@ -573,21 +578,21 @@ BlockList::initialize_vertex_patches_mg(
               cell->get_mg_dof_indices(indices);
               for (unsigned int i=0; i<fe.dofs_per_face; ++i)
                 {
-                  indices[fe.face_to_cell_index(i,1)] = numbers::invalid_unsigned_int;
+                  indices[fe.face_to_cell_index(i,1)] = numbers::invalid_dof_index;
                   if (dim>1)
-                    indices[fe.face_to_cell_index(i,3)] = numbers::invalid_unsigned_int;
+                    indices[fe.face_to_cell_index(i,3)] = numbers::invalid_dof_index;
                   if (dim>2)
-                    indices[fe.face_to_cell_index(i,5)] = numbers::invalid_unsigned_int;
+                    indices[fe.face_to_cell_index(i,5)] = numbers::invalid_dof_index;
                 }
               add(k, indices);
               cell->neighbor(0)->get_mg_dof_indices(indices);
               for (unsigned int i=0; i<fe.dofs_per_face; ++i)
                 {
-                  indices[fe.face_to_cell_index(i,0)] = numbers::invalid_unsigned_int;
+                  indices[fe.face_to_cell_index(i,0)] = numbers::invalid_dof_index;
                   if (dim>1)
-                    indices[fe.face_to_cell_index(i,3)] = numbers::invalid_unsigned_int;
+                    indices[fe.face_to_cell_index(i,3)] = numbers::invalid_dof_index;
                   if (dim>2)
-                    indices[fe.face_to_cell_index(i,5)] = numbers::invalid_unsigned_int;
+                    indices[fe.face_to_cell_index(i,5)] = numbers::invalid_dof_index;
                 }
               add(k, indices);
               break;
@@ -602,7 +607,7 @@ BlockList::initialize_vertex_patches_mg(
 
 
 inline
-unsigned int
+size_type 
 BlockList::size() const
 {
   return index_sets.size();
@@ -610,8 +615,8 @@ BlockList::size() const
 
 
 inline
-unsigned int
-BlockList::block_size(unsigned int block) const
+size_type 
+BlockList::block_size(size_type block) const
 {
   return index_sets[block].size();
 }
@@ -619,7 +624,7 @@ BlockList::block_size(unsigned int block) const
 
 inline
 BlockList::const_iterator
-BlockList::begin(unsigned int block) const
+BlockList::begin(size_type block) const
 {
   AssertIndexRange(block, index_sets.size());
   return index_sets[block].begin();
@@ -628,7 +633,7 @@ BlockList::begin(unsigned int block) const
 
 inline
 BlockList::const_iterator
-BlockList::end(unsigned int block) const
+BlockList::end(size_type block) const
 {
   AssertIndexRange(block, index_sets.size());
   return index_sets[block].end();
@@ -636,15 +641,15 @@ BlockList::end(unsigned int block) const
 
 
 inline
-unsigned int
-BlockList::local_index(unsigned int block, unsigned int index) const
+size_type 
+BlockList::local_index(size_type block, size_type int index) const
 {
   AssertIndexRange(block, index_sets.size());
   const block_container &b = index_sets[block];
-  for (unsigned int i=0; i<b.size(); ++i)
+  for (size_type i=0; i<b.size(); ++i)
     if (b[i] == index)
       return i;
-  return numbers::invalid_unsigned_int;
+  return numbers::invalid_size_type;
 }
 
 
index 73420c5353d2a7bcdf5338b20a1490dd7f65033b..103398e303519212290378cd372f73a952a2bae5 100644 (file)
@@ -123,6 +123,11 @@ template <typename number = double>
 class BlockMatrixArray : public Subscriptor
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std::size_t size_type;
+
   /**
    * Default constructor creating a
    * useless object. initialize()
@@ -135,8 +140,8 @@ public:
    * Constructor fixing the
    * dimensions.
    */
-  BlockMatrixArray (const unsigned int n_block_rows,
-                    const unsigned int n_block_cols);
+  BlockMatrixArray (const size_type n_block_rows,
+                    const size_type n_block_cols);
 
   /**
    * Initialize object
@@ -145,8 +150,8 @@ public:
    * created by the default
    * constructor.
    */
-  void initialize (const unsigned int n_block_rows,
-                   const unsigned int n_block_cols);
+  void initialize (const size_type n_block_rows,
+                   const size_type n_block_cols);
 
   /**
    * Constructor fixing the
@@ -155,8 +160,8 @@ public:
    * @deprecated The last argument is ignored. Use the constructor with only
    * the first two arguments.
    */
-  BlockMatrixArray (const unsigned int n_block_rows,
-                    const unsigned int n_block_cols,
+  BlockMatrixArray (const size_type n_block_rows,
+                    const size_type n_block_cols,
                     VectorMemory<Vector<number> > &mem) DEAL_II_DEPRECATED;
 
   /**
@@ -169,16 +174,16 @@ public:
    * @deprecated The last argument is ignored. Use the function with same name
    * but only the first two arguments.
    */
-  void initialize (const unsigned int n_block_rows,
-                   const unsigned int n_block_cols,
+  void initialize (const size_type n_block_rows,
+                   const size_type n_block_cols,
                    VectorMemory<Vector<number> > &mem) DEAL_II_DEPRECATED;
 
   /**
    * Adjust the matrix to a new
    * size and delete all blocks.
    */
-  void reinit (const unsigned int n_block_rows,
-               const unsigned int n_block_cols);
+  void reinit (const size_type n_block_rows,
+               const size_type n_block_cols);
 
   /**
    * Add a block matrix entry. The
@@ -200,11 +205,11 @@ public:
    * the multiplication functions.
    */
   template <class MATRIX>
-  void enter (const MATRIX      &matrix,
-              const unsigned int row,
-              const unsigned int col,
-              const double       prefix = 1.,
-              const bool         transpose = false);
+  void enter (const MATRIX   &matrix,
+              const size_type row,
+              const size_type col,
+              const double    prefix = 1.,
+              const bool      transpose = false);
 
   /**
    * Add an entry like with enter,
@@ -218,11 +223,11 @@ public:
    */
   template <class MATRIX>
   void enter_aux (VectorMemory<Vector<number> > &mem,
-                  const MATRIX      &matrix,
-                  const unsigned int row,
-                  const unsigned int col,
-                  const double       prefix = 1.,
-                  const bool         transpose = false) DEAL_II_DEPRECATED;
+                  const MATRIX   &matrix,
+                  const size_type row,
+                  const size_type col,
+                  const double    prefix = 1.,
+                  const bool      transpose = false) DEAL_II_DEPRECATED;
 
 
   /**
@@ -235,13 +240,13 @@ public:
    * Number of block-entries per
    * column.
    */
-  unsigned int n_block_rows () const;
+  size_type n_block_rows () const;
 
   /**
    * Number of block-entries per
    * row.
    */
-  unsigned int n_block_cols () const;
+  size_type n_block_cols () const;
 
   /**
    * Matrix-vector multiplication.
@@ -332,7 +337,7 @@ protected:
      */
     template<class MATRIX>
     Entry (const MATRIX &matrix,
-           unsigned row, unsigned int col,
+           size_type row, size_type col,
            double prefix, bool transpose);
 
     /**
@@ -362,13 +367,13 @@ protected:
      * Row number in the block
      * matrix.
      */
-    unsigned int row;
+    size_type row;
 
     /**
      * Column number in the block
      * matrix.
      */
-    unsigned int col;
+    size_type col;
 
     /**
      * Factor in front of the matrix
@@ -399,11 +404,11 @@ private:
   /**
    * Number of blocks per column.
    */
-  unsigned int block_rows;
+  size_type block_rows;
   /**
    * number of blocks per row.
    */
-  unsigned int block_cols;
+  size_type block_cols;
 };
 
 /*@}*/
@@ -485,7 +490,7 @@ public:
    * <tt>n_blocks</tt> is the
    * number of blocks in each direction.
    */
-  BlockTrianglePrecondition (const unsigned int n_blocks);
+  BlockTrianglePrecondition (const size_type n_blocks);
 
   /**
    * Constructor. This matrix must be
@@ -496,7 +501,7 @@ public:
    * @deprecated The second argument is ignored. Use the constructor with only
    * the first and third argument.
    */
-  BlockTrianglePrecondition (const unsigned int n_block_rows,
+  BlockTrianglePrecondition (const size_type n_block_rows,
                              VectorMemory<Vector<number> > &mem,
                              const bool backward = false) DEAL_II_DEPRECATED;
 
@@ -510,7 +515,7 @@ public:
    * @deprecated The second argument
    * is ignored. Use the function without that argument.
    */
-  void initialize (const unsigned int n_block_rows,
+  void initialize (const size_type n_block_rows,
                    VectorMemory<Vector<number> > &mem,
                    const bool backward = false) DEAL_II_DEPRECATED;
 
@@ -518,7 +523,7 @@ public:
    * Resize preconditioner to a new
    * size and clear all blocks.
    */
-  void reinit (const unsigned int n_block_rows);
+  void reinit (const size_type n_block_rows);
 
 
   /**
@@ -529,11 +534,11 @@ public:
    * matrices or preconditioners.
    */
   template <class MATRIX>
-  void enter (const MATRIX      &matrix,
-              const unsigned int row,
-              const unsigned int col,
-              const double       prefix = 1.,
-              const bool         transpose = false);
+  void enter (const MATRIX   &matrix,
+              const size_type row,
+              const size_type col,
+              const double    prefix = 1.,
+              const bool      transpose = false);
 
   /**
    * Enter a block. This calls
@@ -548,11 +553,11 @@ public:
    */
   template <class MATRIX>
   void enter_aux (VectorMemory<Vector<double> > &mem,
-                  const MATRIX      &matrix,
-                  const unsigned int row,
-                  const unsigned int col,
-                  const double       prefix = 1.,
-                  const bool         transpose = false) DEAL_II_DEPRECATED;
+                  const MATRIX   &matrix,
+                  const size_type row,
+                  const size_type col,
+                  const double    prefix = 1.,
+                  const bool      transpose = false) DEAL_II_DEPRECATED;
 
   /**
    * Preconditioning.
@@ -609,7 +614,7 @@ public:
    * matrix here.
    */
   DeclException1(ExcNoDiagonal,
-                 unsigned int,
+                 size_type,
                  << "No diagonal entry was added for block " << arg1);
 
   /**
@@ -620,7 +625,7 @@ public:
    * matrix here.
    */
   DeclException1(ExcMultipleDiagonal,
-                 unsigned int,
+                 size_type,
                  << "Inverse diagonal entries may not be added in block "
                  << arg1);
   //@}
@@ -632,7 +637,7 @@ private:
    * for one row.
    */
   void do_row (BlockVector<number> &dst,
-               unsigned int row_num) const;
+               size_type row_num) const;
 
   /**
    * Flag for backward insertion.
@@ -649,8 +654,8 @@ template <class MATRIX>
 inline
 BlockMatrixArray<number>::Entry::Entry (
   const MATRIX &m,
-  unsigned int row,
-  unsigned int col,
+  size_type row,
+  size_type col,
   double prefix,
   bool transpose)
   :
@@ -669,8 +674,8 @@ inline
 void
 BlockMatrixArray<number>::enter (
   const MATRIX &matrix,
-  unsigned int row,
-  unsigned int col,
+  size_type row,
+  size_type col,
   double prefix,
   bool transpose)
 {
@@ -687,8 +692,8 @@ void
 BlockMatrixArray<number>::enter_aux (
   VectorMemory<Vector<number> > &mem,
   const MATRIX &matrix,
-  unsigned int row,
-  unsigned int col,
+  size_type row,
+  size_type col,
   double prefix,
   bool transpose)
 {
@@ -728,7 +733,7 @@ BlockMatrixArray<number>::print_latex (STREAM &out) const
   typename std::vector<Entry>::const_iterator m = entries.begin();
   typename std::vector<Entry>::const_iterator end = entries.end();
 
-  unsigned int matrix_number = 0;
+  size_type matrix_number = 0;
   for (; m != end ; ++m)
     {
       if (matrix_names.find(m->matrix) == matrix_names.end())
@@ -756,8 +761,8 @@ BlockMatrixArray<number>::print_latex (STREAM &out) const
 
       array(m->row, m->col) += stream.str();
     }
-  for (unsigned int i=0; i<n_block_rows(); ++i)
-    for (unsigned int j=0; j<n_block_cols(); ++j)
+  for (size_type i=0; i<n_block_rows(); ++i)
+    for (size_type j=0; j<n_block_cols(); ++j)
       {
         out << '\t' << array(i,j);
         if (j==n_block_cols()-1)
@@ -773,7 +778,7 @@ template <class MATRIX>
 inline
 void
 BlockTrianglePrecondition<number>::enter (const MATRIX &matrix,
-                                          unsigned row, unsigned int col,
+                                          size_type row, size_type col,
                                           double prefix, bool transpose)
 {
   BlockMatrixArray<number>::enter(matrix, row, col, prefix, transpose);
@@ -788,8 +793,8 @@ void
 BlockTrianglePrecondition<number>::enter_aux (
   VectorMemory<Vector<double> > &mem,
   const MATRIX &matrix,
-  unsigned int row,
-  unsigned int col,
+  size_type row,
+  size_type col,
   double prefix,
   bool transpose)
 {
index c81fabf3ab2100fd55918eb3c99cfce88c5b1a21..c8e7073d71e880593fd8bde07177df0e60475bb8 100644 (file)
@@ -70,27 +70,27 @@ namespace BlockMatrixIterators
      * element represented by
      * this object.
      */
-    unsigned int block_row() const;
+    size_type block_row() const;
 
     /**
      * Block column of the
      * element represented by
      * this object.
      */
-    unsigned int block_column() const;
+    size_type block_column() const;
 
   protected:
     /**
      * Block row into which we presently
      * point.
      */
-    unsigned int row_block;
+    size_type row_block;
 
     /**
      * Block column into which we
      * presently point.
      */
-    unsigned int col_block;
+    size_type col_block;
 
     /**
      * Let the iterator class be a
@@ -145,22 +145,22 @@ namespace BlockMatrixIterators
      * of rows in the matrix.
      */
     Accessor (BlockMatrix *m,
-              const unsigned int row,
-              const unsigned int col);
+              const size_type row,
+              const size_type col);
 
     /**
      * Row number of the element
      * represented by this
      * object.
      */
-    unsigned int row() const;
+    size_type row() const;
 
     /**
      * Column number of the
      * element represented by
      * this object.
      */
-    unsigned int column() const;
+    size_type column() const;
 
     /**
      * Value of the entry at the
@@ -236,8 +236,8 @@ namespace BlockMatrixIterators
      * of rows in the matrix.
      */
     Accessor (const BlockMatrix *m,
-              const unsigned int row,
-              const unsigned int col);
+              const size_type row,
+              const size_type col);
 
     /**
      * Initalize const accessor
@@ -250,14 +250,14 @@ namespace BlockMatrixIterators
      * represented by this
      * object.
      */
-    unsigned int row() const;
+    size_type row() const;
 
     /**
      * Column number of the
      * element represented by
      * this object.
      */
-    unsigned int column() const;
+    size_type column() const;
 
     /**
      * Value of the entry at the
@@ -428,8 +428,8 @@ public:
    * given coordinates.
    */
   BlockType &
-  block (const unsigned int row,
-         const unsigned int column);
+  block (const size_type row,
+         const size_type column);
 
 
   /**
@@ -438,8 +438,8 @@ public:
    * constant objects.
    */
   const BlockType &
-  block (const unsigned int row,
-         const unsigned int column) const;
+  block (const size_type row,
+         const size_type column) const;
 
   /**
    * Return the dimension of the
@@ -447,7 +447,7 @@ public:
    * matrix is of dimension
    * $m \times n$.
    */
-  unsigned int m () const;
+  size_type m () const;
 
   /**
    * Return the dimension of the
@@ -455,7 +455,7 @@ public:
    * matrix is of dimension
    * $m \times n$.
    */
-  unsigned int n () const;
+  size_type n () const;
 
 
   /**
@@ -464,7 +464,7 @@ public:
    * sparsity pattern is presently
    * associated to this matrix.
    */
-  unsigned int n_block_rows () const;
+  size_type n_block_rows () const;
 
   /**
    * Return the number of blocks in
@@ -472,7 +472,7 @@ public:
    * sparsity pattern is presently
    * associated to this matrix.
    */
-  unsigned int n_block_cols () const;
+  size_type n_block_cols () const;
 
   /**
    * Set the element <tt>(i,j)</tt>
@@ -483,8 +483,8 @@ public:
    * is allowed to store zero
    * values in non-existent fields.
    */
-  void set (const unsigned int i,
-            const unsigned int j,
+  void set (const size_type i,
+            const size_type j,
             const value_type value);
 
   /**
@@ -515,9 +515,9 @@ public:
    * values are treated.
    */
   template <typename number>
-  void set (const std::vector<unsigned int> &indices,
-            const FullMatrix<number>        &full_matrix,
-            const bool                       elide_zero_values = false);
+  void set (const std::vector<size_type> &indices,
+            const FullMatrix<number>     &full_matrix,
+            const bool                    elide_zero_values = false);
 
   /**
    * Same function as before, but now
@@ -527,10 +527,10 @@ public:
    * on rows and columns, respectively.
    */
   template <typename number>
-  void set (const std::vector<unsigned int> &row_indices,
-            const std::vector<unsigned int> &col_indices,
-            const FullMatrix<number>        &full_matrix,
-            const bool                       elide_zero_values = false);
+  void set (const std::vector<size_type> &row_indices,
+            const std::vector<size_type> &col_indices,
+            const FullMatrix<number>     &full_matrix,
+            const bool                    elide_zero_values = false);
 
   /**
    * Set several elements in the
@@ -551,10 +551,10 @@ public:
    * values are treated.
    */
   template <typename number>
-  void set (const unsigned int               row,
-            const std::vector<unsigned int> &col_indices,
-            const std::vector<number>       &values,
-            const bool                       elide_zero_values = false);
+  void set (const size_type row,
+            const std::vector<size_type> &col_indices,
+            const std::vector<number>    &values,
+            const bool                    elide_zero_values = false);
 
   /**
    * Set several elements to values
@@ -573,11 +573,11 @@ public:
    * values are inserted/replaced.
    */
   template <typename number>
-  void set (const unsigned int  row,
-            const unsigned int  n_cols,
-            const unsigned int *col_indices,
-            const number       *values,
-            const bool          elide_zero_values = false);
+  void set (const size_type  row,
+            const size_type  n_cols,
+            const size_type *col_indices,
+            const number    *values,
+            const bool       elide_zero_values = false);
 
   /**
    * Add <tt>value</tt> to the
@@ -588,8 +588,8 @@ public:
    * is allowed to store zero
    * values in non-existent fields.
    */
-  void add (const unsigned int i,
-            const unsigned int j,
+  void add (const size_type i,
+            const size_type j,
             const value_type value);
 
   /**
@@ -620,9 +620,9 @@ public:
    * into the matrix.
    */
   template <typename number>
-  void add (const std::vector<unsigned int> &indices,
-            const FullMatrix<number>        &full_matrix,
-            const bool                       elide_zero_values = true);
+  void add (const std::vector<size_type> &indices,
+            const FullMatrix<number>     &full_matrix,
+            const bool                    elide_zero_values = true);
 
   /**
    * Same function as before, but now
@@ -632,10 +632,10 @@ public:
    * on rows and columns, respectively.
    */
   template <typename number>
-  void add (const std::vector<unsigned int> &row_indices,
-            const std::vector<unsigned int> &col_indices,
-            const FullMatrix<number>        &full_matrix,
-            const bool                       elide_zero_values = true);
+  void add (const std::vector<size_type> &row_indices,
+            const std::vector<size_type> &col_indices,
+            const FullMatrix<number>     &full_matrix,
+            const bool                    elide_zero_values = true);
 
   /**
    * Set several elements in the
@@ -655,10 +655,10 @@ public:
    * into the matrix.
    */
   template <typename number>
-  void add (const unsigned int               row,
-            const std::vector<unsigned int> &col_indices,
-            const std::vector<number>       &values,
-            const bool                       elide_zero_values = true);
+  void add (const size_type row,
+            const std::vector<size_type> &col_indices,
+            const std::vector<number>    &values,
+            const bool                    elide_zero_values = true);
 
   /**
    * Add an array of values given by
@@ -678,12 +678,12 @@ public:
    * into the matrix.
    */
   template <typename number>
-  void add (const unsigned int  row,
-            const unsigned int  n_cols,
-            const unsigned int *col_indices,
-            const number       *values,
-            const bool          elide_zero_values = true,
-            const bool          col_indices_are_sorted = false);
+  void add (const size_type  row,
+            const size_type  n_cols,
+            const size_type *col_indices,
+            const number    *values,
+            const bool       elide_zero_values = true,
+            const bool       col_indices_are_sorted = false);
 
   /**
    * Add <tt>matrix</tt> scaled by
@@ -711,8 +711,8 @@ public:
    * if the wanted element does not
    * exist in the matrix.
    */
-  value_type operator () (const unsigned int i,
-                          const unsigned int j) const;
+  value_type operator () (const size_type i,
+                          const size_type j) const;
 
   /**
    * This function is mostly like
@@ -731,8 +731,8 @@ public:
    * solution, since the sparsity
    * of the matrix is not used.
    */
-  value_type el (const unsigned int i,
-                 const unsigned int j) const;
+  value_type el (const size_type i,
+                 const size_type j) const;
 
   /**
    * Return the main diagonal element in
@@ -751,7 +751,7 @@ public:
    * involve searching for the
    * right column number.
    */
-  value_type diag_element (const unsigned int i) const;
+  value_type diag_element (const size_type i) const;
 
   /**
    * Call the compress() function on all
@@ -876,12 +876,12 @@ public:
    * STL-like iterator with the
    * first entry of row <tt>r</tt>.
    */
-  iterator begin (const unsigned int r);
+  iterator begin (const size_type r);
 
   /**
    * Final iterator of row <tt>r</tt>.
    */
-  iterator end (const unsigned int r);
+  iterator end (const size_type r);
   /**
    * STL-like iterator with the
    * first entry.
@@ -897,12 +897,12 @@ public:
    * STL-like iterator with the
    * first entry of row <tt>r</tt>.
    */
-  const_iterator begin (const unsigned int r) const;
+  const_iterator begin (const size_type r) const;
 
   /**
    * Final iterator of row <tt>r</tt>.
    */
-  const_iterator end (const unsigned int r) const;
+  const_iterator end (const size_type r) const;
 
   /**
    * Return a reference to the underlying
@@ -1223,7 +1223,7 @@ private:
    * individual blocks when doing a
    * collective add or set.
    */
-  std::vector<unsigned int> counter_within_block;
+  std::vector<size_type> counter_within_block;
 
   /**
    * Temporary vector for column
@@ -1231,7 +1231,7 @@ private:
    * local to global data on each
    * sparse matrix.
    */
-  std::vector<std::vector<unsigned int> > column_indices;
+  std::vector<std::vector<size_type> > column_indices;
 
   /**
    * Temporary vector for storing the
@@ -1274,10 +1274,10 @@ namespace BlockMatrixIterators
 
   template <class BlockMatrix>
   inline
-  unsigned int
+  size_type 
   AccessorBase<BlockMatrix>::block_row() const
   {
-    Assert (row_block != numbers::invalid_unsigned_int,
+    Assert (row_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     return row_block;
@@ -1286,10 +1286,10 @@ namespace BlockMatrixIterators
 
   template <class BlockMatrix>
   inline
-  unsigned int
+  size_type 
   AccessorBase<BlockMatrix>::block_column() const
   {
-    Assert (col_block != numbers::invalid_unsigned_int,
+    Assert (col_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     return col_block;
@@ -1300,8 +1300,8 @@ namespace BlockMatrixIterators
   inline
   Accessor<BlockMatrix, true>::Accessor (
     const BlockMatrix *matrix,
-    const unsigned int  row,
-    const unsigned int  col)
+    const size_type    row,
+    const size_type    col)
     :
     matrix(matrix),
     base_iterator(matrix->block(0,0).begin())
@@ -1312,12 +1312,12 @@ namespace BlockMatrixIterators
     // the end of the matrix
     if (row < matrix->m())
       {
-        const std::pair<unsigned int,unsigned int> indices
+        const std::pair<size_type,size_type> indices
           = matrix->row_block_indices.global_to_local(row);
 
         // find the first block that does
         // have an entry in this row
-        for (unsigned int bc=0; bc<matrix->n_block_cols(); ++bc)
+        for (size_type bc=0; bc<matrix->n_block_cols(); ++bc)
           {
             base_iterator
               = matrix->block(indices.first, bc).begin(indices.second);
@@ -1342,8 +1342,8 @@ namespace BlockMatrixIterators
       {
         // we were asked to create the end
         // iterator for this matrix
-        this->row_block = numbers::invalid_unsigned_int;
-        this->col_block = numbers::invalid_unsigned_int;
+        this->row_block = numbers::invalid_size_type;
+        this->col_block = numbers::invalid_size_type;
       }
   }
 
@@ -1374,10 +1374,10 @@ namespace BlockMatrixIterators
 
   template <class BlockMatrix>
   inline
-  unsigned int
+  size_type
   Accessor<BlockMatrix, true>::row() const
   {
-    Assert (this->row_block != numbers::invalid_unsigned_int,
+    Assert (this->row_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     return (matrix->row_block_indices.local_to_global(this->row_block, 0) +
@@ -1387,10 +1387,10 @@ namespace BlockMatrixIterators
 
   template <class BlockMatrix>
   inline
-  unsigned int
+  size_type
   Accessor<BlockMatrix, true>::column() const
   {
-    Assert (this->col_block != numbers::invalid_unsigned_int,
+    Assert (this->col_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     return (matrix->column_block_indices.local_to_global(this->col_block,0) +
@@ -1403,9 +1403,9 @@ namespace BlockMatrixIterators
   typename Accessor<BlockMatrix, true>::value_type
   Accessor<BlockMatrix, true>::value () const
   {
-    Assert (this->row_block != numbers::invalid_unsigned_int,
+    Assert (this->row_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
-    Assert (this->col_block != numbers::invalid_unsigned_int,
+    Assert (this->col_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     return base_iterator->value();
@@ -1418,13 +1418,13 @@ namespace BlockMatrixIterators
   void
   Accessor<BlockMatrix, true>::advance ()
   {
-    Assert (this->row_block != numbers::invalid_unsigned_int,
+    Assert (this->row_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
-    Assert (this->col_block != numbers::invalid_unsigned_int,
+    Assert (this->col_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     // Remember current row inside block
-    unsigned int local_row = base_iterator->row();
+    size_type local_row = base_iterator->row();
 
     // Advance one element inside the
     // current block
@@ -1466,8 +1466,8 @@ namespace BlockMatrixIterators
                 ++this->row_block;
                 if (this->row_block == matrix->n_block_rows())
                   {
-                    this->row_block = numbers::invalid_unsigned_int;
-                    this->col_block = numbers::invalid_unsigned_int;
+                    this->row_block = numbers::invalid_size_type;
+                    this->col_block = numbers::invalid_size_type;
                     return;
                   }
               }
@@ -1493,9 +1493,9 @@ namespace BlockMatrixIterators
       // have to have the same
       // base_iterator representation, but
       // valid iterators have to
-      return (((this->row_block == numbers::invalid_unsigned_int)
+      return (((this->row_block == numbers::invalid_size_type)
                &&
-               (this->col_block == numbers::invalid_unsigned_int))
+               (this->col_block == numbers::invalid_size_type))
               ||
               (base_iterator == a.base_iterator));
 
@@ -1509,8 +1509,8 @@ namespace BlockMatrixIterators
   inline
   Accessor<BlockMatrix, false>::Accessor (
     BlockMatrix *matrix,
-    const unsigned int  row,
-    const unsigned int  col)
+    const size_type row,
+    const size_type col)
     :
     matrix(matrix),
     base_iterator(matrix->block(0,0).begin())
@@ -1520,12 +1520,12 @@ namespace BlockMatrixIterators
     // the end of the matrix
     if (row < matrix->m())
       {
-        const std::pair<unsigned int,unsigned int> indices
+        const std::pair<size_type,size_type> indices
           = matrix->row_block_indices.global_to_local(row);
 
         // find the first block that does
         // have an entry in this row
-        for (unsigned int bc=0; bc<matrix->n_block_cols(); ++bc)
+        for (size_type bc=0; bc<matrix->n_block_cols(); ++bc)
           {
             base_iterator
               = matrix->block(indices.first, bc).begin(indices.second);
@@ -1550,18 +1550,18 @@ namespace BlockMatrixIterators
       {
         // we were asked to create the end
         // iterator for this matrix
-        this->row_block = numbers::invalid_unsigned_int;
-        this->col_block = numbers::invalid_unsigned_int;
+        this->row_block = numbers::invalid_size_type;
+        this->col_block = numbers::invalid_size_type;
       }
   }
 
 
   template <class BlockMatrix>
   inline
-  unsigned int
+  size_type
   Accessor<BlockMatrix, false>::row() const
   {
-    Assert (this->row_block != numbers::invalid_unsigned_int,
+    Assert (this->row_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     return (matrix->row_block_indices.local_to_global(this->row_block, 0) +
@@ -1571,10 +1571,10 @@ namespace BlockMatrixIterators
 
   template <class BlockMatrix>
   inline
-  unsigned int
+  size_type
   Accessor<BlockMatrix, false>::column() const
   {
-    Assert (this->col_block != numbers::invalid_unsigned_int,
+    Assert (this->col_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     return (matrix->column_block_indices.local_to_global(this->col_block,0) +
@@ -1587,9 +1587,9 @@ namespace BlockMatrixIterators
   typename Accessor<BlockMatrix, false>::value_type
   Accessor<BlockMatrix, false>::value () const
   {
-    Assert (this->row_block != numbers::invalid_unsigned_int,
+    Assert (this->row_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
-    Assert (this->col_block != numbers::invalid_unsigned_int,
+    Assert (this->col_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     return base_iterator->value();
@@ -1602,9 +1602,9 @@ namespace BlockMatrixIterators
   void
   Accessor<BlockMatrix, false>::set_value (typename Accessor<BlockMatrix, false>::value_type newval) const
   {
-    Assert (this->row_block != numbers::invalid_unsigned_int,
+    Assert (this->row_block != numbers::invalid_size_type
             ExcIteratorPastEnd());
-    Assert (this->col_block != numbers::invalid_unsigned_int,
+    Assert (this->col_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     base_iterator->value() = newval;
@@ -1617,13 +1617,13 @@ namespace BlockMatrixIterators
   void
   Accessor<BlockMatrix, false>::advance ()
   {
-    Assert (this->row_block != numbers::invalid_unsigned_int,
+    Assert (this->row_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
-    Assert (this->col_block != numbers::invalid_unsigned_int,
+    Assert (this->col_block != numbers::invalid_size_type,
             ExcIteratorPastEnd());
 
     // Remember current row inside block
-    unsigned int local_row = base_iterator->row();
+    size_type local_row = base_iterator->row();
 
     // Advance one element inside the
     // current block
@@ -1665,8 +1665,8 @@ namespace BlockMatrixIterators
                 ++this->row_block;
                 if (this->row_block == matrix->n_block_rows())
                   {
-                    this->row_block = numbers::invalid_unsigned_int;
-                    this->col_block = numbers::invalid_unsigned_int;
+                    this->row_block = numbers::invalid_size_type;
+                    this->col_block = numbers::invalid_size_type;
                     return;
                   }
               }
@@ -1693,9 +1693,9 @@ namespace BlockMatrixIterators
       // have to have the same
       // base_iterator representation, but
       // valid iterators have to
-      return (((this->row_block == numbers::invalid_unsigned_int)
+      return (((this->row_block == numbers::invalid_size_type)
                &&
-               (this->col_block == numbers::invalid_unsigned_int))
+               (this->col_block == numbers::invalid_size_type))
               ||
               (base_iterator == a.base_iterator));
 
@@ -1721,8 +1721,8 @@ BlockMatrixBase<MatrixType> &
 BlockMatrixBase<MatrixType>::
 copy_from (const BlockMatrixType &source)
 {
-  for (unsigned int r=0; r<n_block_rows(); ++r)
-    for (unsigned int c=0; c<n_block_cols(); ++c)
+  for (size_type r=0; r<n_block_rows(); ++r)
+    for (size_type c=0; c<n_block_cols(); ++c)
       block(r,c).copy_from (source.block(r,c));
 
   return *this;
@@ -1741,8 +1741,8 @@ BlockMatrixBase<MatrixType>::memory_consumption () const
     MemoryConsumption::memory_consumption(column_indices)+
     MemoryConsumption::memory_consumption(column_values);
 
-  for (unsigned int r=0; r<n_block_rows(); ++r)
-    for (unsigned int c=0; c<n_block_cols(); ++c)
+  for (size_type r=0; r<n_block_rows(); ++r)
+    for (size_type c=0; c<n_block_cols(); ++c)
       {
         MatrixType *p = this->sub_objects[r][c];
         mem += MemoryConsumption::memory_consumption(*p);
@@ -1758,8 +1758,8 @@ inline
 void
 BlockMatrixBase<MatrixType>::clear ()
 {
-  for (unsigned int r=0; r<n_block_rows(); ++r)
-    for (unsigned int c=0; c<n_block_cols(); ++c)
+  for (size_type r=0; r<n_block_rows(); ++r)
+    for (size_type c=0; c<n_block_cols(); ++c)
       {
         MatrixType *p = this->sub_objects[r][c];
         this->sub_objects[r][c] = 0;
@@ -1776,8 +1776,8 @@ BlockMatrixBase<MatrixType>::clear ()
 template <class MatrixType>
 inline
 typename BlockMatrixBase<MatrixType>::BlockType &
-BlockMatrixBase<MatrixType>::block (const unsigned int row,
-                                    const unsigned int column)
+BlockMatrixBase<MatrixType>::block (const size_type row,
+                                    const size_type column)
 {
   Assert (row<n_block_rows(),
           ExcIndexRange (row, 0, n_block_rows()));
@@ -1792,8 +1792,8 @@ BlockMatrixBase<MatrixType>::block (const unsigned int row,
 template <class MatrixType>
 inline
 const typename BlockMatrixBase<MatrixType>::BlockType &
-BlockMatrixBase<MatrixType>::block (const unsigned int row,
-                                    const unsigned int column) const
+BlockMatrixBase<MatrixType>::block (const size_type row,
+                                    const size_type column) const
 {
   Assert (row<n_block_rows(),
           ExcIndexRange (row, 0, n_block_rows()));
@@ -1806,7 +1806,7 @@ BlockMatrixBase<MatrixType>::block (const unsigned int row,
 
 template <class MatrixType>
 inline
-unsigned int
+size_type
 BlockMatrixBase<MatrixType>::m () const
 {
   return row_block_indices.total_size();
@@ -1816,7 +1816,7 @@ BlockMatrixBase<MatrixType>::m () const
 
 template <class MatrixType>
 inline
-unsigned int
+size_type
 BlockMatrixBase<MatrixType>::n () const
 {
   return column_block_indices.total_size();
@@ -1826,7 +1826,7 @@ BlockMatrixBase<MatrixType>::n () const
 
 template <class MatrixType>
 inline
-unsigned int
+size_type 
 BlockMatrixBase<MatrixType>::n_block_cols () const
 {
   return column_block_indices.size();
@@ -1836,7 +1836,7 @@ BlockMatrixBase<MatrixType>::n_block_cols () const
 
 template <class MatrixType>
 inline
-unsigned int
+size_type 
 BlockMatrixBase<MatrixType>::n_block_rows () const
 {
   return row_block_indices.size();
@@ -1850,15 +1850,15 @@ BlockMatrixBase<MatrixType>::n_block_rows () const
 template <class MatrixType>
 inline
 void
-BlockMatrixBase<MatrixType>::set (const unsigned int i,
-                                  const unsigned int j,
+BlockMatrixBase<MatrixType>::set (const size_type i,
+                                  const size_type j,
                                   const value_type value)
 {
   prepare_set_operation();
 
   Assert (numbers::is_finite(value), ExcNumberNotFinite());
 
-  const std::pair<unsigned int,unsigned int>
+  const std::pair<size_type,size_type>
   row_index = row_block_indices.global_to_local (i),
   col_index = column_block_indices.global_to_local (j);
   block(row_index.first,col_index.first).set (row_index.second,
@@ -1872,8 +1872,8 @@ template <class MatrixType>
 template <typename number>
 inline
 void
-BlockMatrixBase<MatrixType>::set (const std::vector<unsigned int> &row_indices,
-                                  const std::vector<unsigned int> &col_indices,
+BlockMatrixBase<MatrixType>::set (const std::vector<size_type> &row_indices,
+                                  const std::vector<size_type> &col_indices,
                                   const FullMatrix<number>        &values,
                                   const bool                       elide_zero_values)
 {
@@ -1882,7 +1882,7 @@ BlockMatrixBase<MatrixType>::set (const std::vector<unsigned int> &row_indices,
   Assert (col_indices.size() == values.n(),
           ExcDimensionMismatch(col_indices.size(), values.n()));
 
-  for (unsigned int i=0; i<row_indices.size(); ++i)
+  for (size_type i=0; i<row_indices.size(); ++i)
     set (row_indices[i], col_indices.size(), &col_indices[0], &values(i,0),
          elide_zero_values);
 }
@@ -1893,7 +1893,7 @@ template <class MatrixType>
 template <typename number>
 inline
 void
-BlockMatrixBase<MatrixType>::set (const std::vector<unsigned int> &indices,
+BlockMatrixBase<MatrixType>::set (const std::vector<size_type> &indices,
                                   const FullMatrix<number>        &values,
                                   const bool                       elide_zero_values)
 {
@@ -1901,7 +1901,7 @@ BlockMatrixBase<MatrixType>::set (const std::vector<unsigned int> &indices,
           ExcDimensionMismatch(indices.size(), values.m()));
   Assert (values.n() == values.m(), ExcNotQuadratic());
 
-  for (unsigned int i=0; i<indices.size(); ++i)
+  for (size_type i=0; i<indices.size(); ++i)
     set (indices[i], indices.size(), &indices[0], &values(i,0),
          elide_zero_values);
 }
@@ -1912,10 +1912,10 @@ template <class MatrixType>
 template <typename number>
 inline
 void
-BlockMatrixBase<MatrixType>::set (const unsigned int               row,
-                                  const std::vector<unsigned int> &col_indices,
-                                  const std::vector<number>       &values,
-                                  const bool                       elide_zero_values)
+BlockMatrixBase<MatrixType>::set (const size_type               row,
+                                  const std::vector<size_type> &col_indices,
+                                  const std::vector<number>    &values,
+                                  const bool                    elide_zero_values)
 {
   Assert (col_indices.size() == values.size(),
           ExcDimensionMismatch(col_indices.size(), values.size()));
@@ -1933,11 +1933,11 @@ template <class MatrixType>
 template <typename number>
 inline
 void
-BlockMatrixBase<MatrixType>::set (const unsigned int  row,
-                                  const unsigned int  n_cols,
-                                  const unsigned int *col_indices,
-                                  const number       *values,
-                                  const bool          elide_zero_values)
+BlockMatrixBase<MatrixType>::set (const size_type  row,
+                                  const size_type  n_cols,
+                                  const size_type *col_indices,
+                                  const number    *values,
+                                  const bool       elide_zero_values)
 {
   prepare_set_operation();
 
@@ -1961,7 +1961,7 @@ BlockMatrixBase<MatrixType>::set (const unsigned int  row,
   // through all of them.
   if (column_indices[0].size() < n_cols)
     {
-      for (unsigned int i=0; i<this->n_block_cols(); ++i)
+      for (size_type i=0; i<this->n_block_cols(); ++i)
         {
           column_indices[i].resize(n_cols);
           column_values[i].resize(n_cols);
@@ -1970,7 +1970,7 @@ BlockMatrixBase<MatrixType>::set (const unsigned int  row,
 
   // Reset the number of added elements
   // in each block to zero.
-  for (unsigned int i=0; i<this->n_block_cols(); ++i)
+  for (size_type i=0; i<this->n_block_cols(); ++i)
     counter_within_block[i] = 0;
 
   // Go through the column indices to
@@ -1982,17 +1982,17 @@ BlockMatrixBase<MatrixType>::set (const unsigned int  row,
   // is stored contiguously (in fact,
   // indices will be intermixed when it
   // comes from an element matrix).
-  for (unsigned int j=0; j<n_cols; ++j)
+  for (size_type j=0; j<n_cols; ++j)
     {
       double value = values[j];
 
       if (value == 0 && elide_zero_values == true)
         continue;
 
-      const std::pair<unsigned int, unsigned int>
+      const std::pair<size_type, size_type>
       col_index = this->column_block_indices.global_to_local(col_indices[j]);
 
-      const unsigned int local_index = counter_within_block[col_index.first]++;
+      const size_type local_index = counter_within_block[col_index.first]++;
 
       column_indices[col_index.first][local_index] = col_index.second;
       column_values[col_index.first][local_index] = value;
@@ -2001,8 +2001,8 @@ BlockMatrixBase<MatrixType>::set (const unsigned int  row,
 #ifdef DEBUG
   // If in debug mode, do a check whether
   // the right length has been obtained.
-  unsigned int length = 0;
-  for (unsigned int i=0; i<this->n_block_cols(); ++i)
+  size_type length = 0;
+  for (size_type i=0; i<this->n_block_cols(); ++i)
     length += counter_within_block[i];
   Assert (length <= n_cols, ExcInternalError());
 #endif
@@ -2012,9 +2012,9 @@ BlockMatrixBase<MatrixType>::set (const unsigned int  row,
   // where we should start reading out
   // data. Now let's write the data into
   // the individual blocks!
-  const std::pair<unsigned int,unsigned int>
+  const std::pair<size_type,size_type>
   row_index = this->row_block_indices.global_to_local (row);
-  for (unsigned int block_col=0; block_col<n_block_cols(); ++block_col)
+  for (size_type block_col=0; block_col<n_block_cols(); ++block_col)
     {
       if (counter_within_block[block_col] == 0)
         continue;
@@ -2033,8 +2033,8 @@ BlockMatrixBase<MatrixType>::set (const unsigned int  row,
 template <class MatrixType>
 inline
 void
-BlockMatrixBase<MatrixType>::add (const unsigned int i,
-                                  const unsigned int j,
+BlockMatrixBase<MatrixType>::add (const size_type  i,
+                                  const size_type  j,
                                   const value_type value)
 {
 
@@ -2051,7 +2051,7 @@ BlockMatrixBase<MatrixType>::add (const unsigned int i,
       (value == value_type()))
     return;
 
-  const std::pair<unsigned int,unsigned int>
+  const std::pair<size_type,size_type>
   row_index = row_block_indices.global_to_local (i),
   col_index = column_block_indices.global_to_local (j);
   block(row_index.first,col_index.first).add (row_index.second,
@@ -2065,17 +2065,17 @@ template <class MatrixType>
 template <typename number>
 inline
 void
-BlockMatrixBase<MatrixType>::add (const std::vector<unsigned int> &row_indices,
-                                  const std::vector<unsigned int> &col_indices,
-                                  const FullMatrix<number>        &values,
-                                  const bool                       elide_zero_values)
+BlockMatrixBase<MatrixType>::add (const std::vector<size_type> &row_indices,
+                                  const std::vector<size_type> &col_indices,
+                                  const FullMatrix<number>     &values,
+                                  const bool                    elide_zero_values)
 {
   Assert (row_indices.size() == values.m(),
           ExcDimensionMismatch(row_indices.size(), values.m()));
   Assert (col_indices.size() == values.n(),
           ExcDimensionMismatch(col_indices.size(), values.n()));
 
-  for (unsigned int i=0; i<row_indices.size(); ++i)
+  for (size_type i=0; i<row_indices.size(); ++i)
     add (row_indices[i], col_indices.size(), &col_indices[0], &values(i,0),
          elide_zero_values);
 }
@@ -2086,15 +2086,15 @@ template <class MatrixType>
 template <typename number>
 inline
 void
-BlockMatrixBase<MatrixType>::add (const std::vector<unsigned int> &indices,
-                                  const FullMatrix<number>        &values,
-                                  const bool                       elide_zero_values)
+BlockMatrixBase<MatrixType>::add (const std::vector<size_type> &indices,
+                                  const FullMatrix<number>     &values,
+                                  const bool                    elide_zero_values)
 {
   Assert (indices.size() == values.m(),
           ExcDimensionMismatch(indices.size(), values.m()));
   Assert (values.n() == values.m(), ExcNotQuadratic());
 
-  for (unsigned int i=0; i<indices.size(); ++i)
+  for (size_type i=0; i<indices.size(); ++i)
     add (indices[i], indices.size(), &indices[0], &values(i,0),
          elide_zero_values);
 }
@@ -2105,10 +2105,10 @@ template <class MatrixType>
 template <typename number>
 inline
 void
-BlockMatrixBase<MatrixType>::add (const unsigned int               row,
-                                  const std::vector<unsigned int> &col_indices,
-                                  const std::vector<number>       &values,
-                                  const bool                       elide_zero_values)
+BlockMatrixBase<MatrixType>::add (const size_type               row,
+                                  const std::vector<size_type> &col_indices,
+                                  const std::vector<number>    &values,
+                                  const bool                    elide_zero_values)
 {
   Assert (col_indices.size() == values.size(),
           ExcDimensionMismatch(col_indices.size(), values.size()));
@@ -2126,12 +2126,12 @@ template <class MatrixType>
 template <typename number>
 inline
 void
-BlockMatrixBase<MatrixType>::add (const unsigned int   row,
-                                  const unsigned int   n_cols,
-                                  const unsigned int *col_indices,
-                                  const number        *values,
-                                  const bool           elide_zero_values,
-                                  const bool           col_indices_are_sorted)
+BlockMatrixBase<MatrixType>::add (const size_type  row,
+                                  const size_type  n_cols,
+                                  const size_type *col_indices,
+                                  const number    *values,
+                                  const bool       elide_zero_values,
+                                  const bool       col_indices_are_sorted)
 {
   prepare_add_operation();
 
@@ -2143,24 +2143,24 @@ BlockMatrixBase<MatrixType>::add (const unsigned int   row,
 #ifdef DEBUG
       // check whether indices really are
       // sorted.
-      unsigned int before = col_indices[0];
-      for (unsigned int i=1; i<n_cols; ++i)
+      size_type before = col_indices[0];
+      for (size_type i=1; i<n_cols; ++i)
         if (col_indices[i] <= before)
           Assert (false, ExcMessage ("Flag col_indices_are_sorted is set, but "
                                      "indices appear to not be sorted."))
           else
             before = col_indices[i];
 #endif
-      const std::pair<unsigned int,unsigned int>
+      const std::pair<size_type,size_type>
       row_index = this->row_block_indices.global_to_local (row);
 
       if (this->n_block_cols() > 1)
         {
-          const unsigned int *first_block = Utilities::lower_bound (col_indices,
-                                                                    col_indices+n_cols,
-                                                                    this->column_block_indices.block_start(1));
+          const size_type *first_block = Utilities::lower_bound (col_indices,
+                                                                 col_indices+n_cols,
+                                                                 this->column_block_indices.block_start(1));
 
-          const unsigned int n_zero_block_indices = first_block - col_indices;
+          const size_type n_zero_block_indices = first_block - col_indices;
           block(row_index.first, 0).add (row_index.second,
                                          n_zero_block_indices,
                                          col_indices,
@@ -2206,7 +2206,7 @@ BlockMatrixBase<MatrixType>::add (const unsigned int   row,
   // through all of them.
   if (column_indices[0].size() < n_cols)
     {
-      for (unsigned int i=0; i<this->n_block_cols(); ++i)
+      for (size_type i=0; i<this->n_block_cols(); ++i)
         {
           column_indices[i].resize(n_cols);
           column_values[i].resize(n_cols);
@@ -2215,7 +2215,7 @@ BlockMatrixBase<MatrixType>::add (const unsigned int   row,
 
   // Reset the number of added elements
   // in each block to zero.
-  for (unsigned int i=0; i<this->n_block_cols(); ++i)
+  for (size_type i=0; i<this->n_block_cols(); ++i)
     counter_within_block[i] = 0;
 
   // Go through the column indices to
@@ -2227,17 +2227,17 @@ BlockMatrixBase<MatrixType>::add (const unsigned int   row,
   // block is stored contiguously (in
   // fact, data will be intermixed when
   // it comes from an element matrix).
-  for (unsigned int j=0; j<n_cols; ++j)
+  for (size_type j=0; j<n_cols; ++j)
     {
       double value = values[j];
 
       if (value == 0 && elide_zero_values == true)
         continue;
 
-      const std::pair<unsigned int, unsigned int>
+      const std::pair<size_type, size_type>
       col_index = this->column_block_indices.global_to_local(col_indices[j]);
 
-      const unsigned int local_index = counter_within_block[col_index.first]++;
+      const size_type local_index = counter_within_block[col_index.first]++;
 
       column_indices[col_index.first][local_index] = col_index.second;
       column_values[col_index.first][local_index] = value;
@@ -2246,8 +2246,8 @@ BlockMatrixBase<MatrixType>::add (const unsigned int   row,
 #ifdef DEBUG
   // If in debug mode, do a check whether
   // the right length has been obtained.
-  unsigned int length = 0;
-  for (unsigned int i=0; i<this->n_block_cols(); ++i)
+  size_type length = 0;
+  for (size_type i=0; i<this->n_block_cols(); ++i)
     length += counter_within_block[i];
   Assert (length <= n_cols, ExcInternalError());
 #endif
@@ -2257,9 +2257,9 @@ BlockMatrixBase<MatrixType>::add (const unsigned int   row,
   // where we should start reading out
   // data. Now let's write the data into
   // the individual blocks!
-  const std::pair<unsigned int,unsigned int>
+  const std::pair<size_type,size_type>
   row_index = this->row_block_indices.global_to_local (row);
-  for (unsigned int block_col=0; block_col<n_block_cols(); ++block_col)
+  for (size_type block_col=0; block_col<n_block_cols(); ++block_col)
     {
       if (counter_within_block[block_col] == 0)
         continue;
@@ -2295,8 +2295,8 @@ BlockMatrixBase<MatrixType>::add (const value_type                   factor,
       (factor == 0))
     return;
 
-  for (unsigned int row=0; row<n_block_rows(); ++row)
-    for (unsigned int col=0; col<n_block_cols(); ++col)
+  for (size_type row=0; row<n_block_rows(); ++row)
+    for (size_type col=0; col<n_block_cols(); ++col)
       // This function should throw if the sparsity
       // patterns of the two blocks differ
       block(row, col).add(factor, matrix.block(row,col));
@@ -2307,10 +2307,10 @@ BlockMatrixBase<MatrixType>::add (const value_type                   factor,
 template <class MatrixType>
 inline
 typename BlockMatrixBase<MatrixType>::value_type
-BlockMatrixBase<MatrixType>::operator () (const unsigned int i,
-                                          const unsigned int j) const
+BlockMatrixBase<MatrixType>::operator () (const size_type i,
+                                          const size_type j) const
 {
-  const std::pair<unsigned int,unsigned int>
+  const std::pair<size_type,size_type>
   row_index = row_block_indices.global_to_local (i),
   col_index = column_block_indices.global_to_local (j);
   return block(row_index.first,col_index.first) (row_index.second,
@@ -2322,10 +2322,10 @@ BlockMatrixBase<MatrixType>::operator () (const unsigned int i,
 template <class MatrixType>
 inline
 typename BlockMatrixBase<MatrixType>::value_type
-BlockMatrixBase<MatrixType>::el (const unsigned int i,
-                                 const unsigned int j) const
+BlockMatrixBase<MatrixType>::el (const size_type i,
+                                 const size_type j) const
 {
-  const std::pair<unsigned int,unsigned int>
+  const std::pair<size_type,size_type>
   row_index = row_block_indices.global_to_local (i),
   col_index = column_block_indices.global_to_local (j);
   return block(row_index.first,col_index.first).el (row_index.second,
@@ -2337,12 +2337,12 @@ BlockMatrixBase<MatrixType>::el (const unsigned int i,
 template <class MatrixType>
 inline
 typename BlockMatrixBase<MatrixType>::value_type
-BlockMatrixBase<MatrixType>::diag_element (const unsigned int i) const
+BlockMatrixBase<MatrixType>::diag_element (const size_type i) const
 {
   Assert (n_block_rows() == n_block_cols(),
           ExcNotQuadratic());
 
-  const std::pair<unsigned int,unsigned int>
+  const std::pair<size_type,size_type>
   index = row_block_indices.global_to_local (i);
   return block(index.first,index.first).diag_element(index.second);
 }
@@ -2354,8 +2354,8 @@ inline
 void
 BlockMatrixBase<MatrixType>::compress (::dealii::VectorOperation::values operation)
 {
-  for (unsigned int r=0; r<n_block_rows(); ++r)
-    for (unsigned int c=0; c<n_block_cols(); ++c)
+  for (size_type r=0; r<n_block_rows(); ++r)
+    for (size_type c=0; c<n_block_cols(); ++c)
       block(r,c).compress (operation);
 }
 
@@ -2369,8 +2369,8 @@ BlockMatrixBase<MatrixType>::operator *= (const value_type factor)
   Assert (n_block_cols() != 0, ExcNotInitialized());
   Assert (n_block_rows() != 0, ExcNotInitialized());
 
-  for (unsigned int r=0; r<n_block_rows(); ++r)
-    for (unsigned int c=0; c<n_block_cols(); ++c)
+  for (size_type r=0; r<n_block_rows(); ++r)
+    for (size_type c=0; c<n_block_cols(); ++c)
       block(r,c) *= factor;
 
   return *this;
@@ -2389,8 +2389,8 @@ BlockMatrixBase<MatrixType>::operator /= (const value_type factor)
 
   const value_type factor_inv = 1. / factor;
 
-  for (unsigned int r=0; r<n_block_rows(); ++r)
-    for (unsigned int c=0; c<n_block_cols(); ++c)
+  for (size_type r=0; r<n_block_rows(); ++r)
+    for (size_type c=0; c<n_block_cols(); ++c)
       block(r,c) *= factor_inv;
 
   return *this;
@@ -2428,11 +2428,11 @@ vmult_block_block (BlockVectorType       &dst,
   Assert (src.n_blocks() == n_block_cols(),
           ExcDimensionMismatch(src.n_blocks(), n_block_cols()));
 
-  for (unsigned int row=0; row<n_block_rows(); ++row)
+  for (size_type row=0; row<n_block_rows(); ++row)
     {
       block(row,0).vmult (dst.block(row),
                           src.block(0));
-      for (unsigned int col=1; col<n_block_cols(); ++col)
+      for (size_type col=1; col<n_block_cols(); ++col)
         block(row,col).vmult_add (dst.block(row),
                                   src.block(col));
     };
@@ -2454,7 +2454,7 @@ vmult_nonblock_block (VectorType    &dst,
           ExcDimensionMismatch(src.n_blocks(), n_block_cols()));
 
   block(0,0).vmult (dst, src.block(0));
-  for (unsigned int col=1; col<n_block_cols(); ++col)
+  for (size_type col=1; col<n_block_cols(); ++col)
     block(0,col).vmult_add (dst, src.block(col));
 }
 
@@ -2473,7 +2473,7 @@ vmult_block_nonblock (BlockVectorType &dst,
   Assert (1 == n_block_cols(),
           ExcDimensionMismatch(1, n_block_cols()));
 
-  for (unsigned int row=0; row<n_block_rows(); ++row)
+  for (size_type row=0; row<n_block_rows(); ++row)
     block(row,0).vmult (dst.block(row),
                         src);
 }
@@ -2508,11 +2508,11 @@ BlockMatrixBase<MatrixType>::vmult_add (BlockVectorType       &dst,
   Assert (src.n_blocks() == n_block_cols(),
           ExcDimensionMismatch(src.n_blocks(), n_block_cols()));
 
-  for (unsigned int row=0; row<n_block_rows(); ++row)
+  for (size_type row=0; row<n_block_rows(); ++row)
     {
       block(row,0).vmult_add (dst.block(row),
                               src.block(0));
-      for (unsigned int col=1; col<n_block_cols(); ++col)
+      for (size_type col=1; col<n_block_cols(); ++col)
         block(row,col).vmult_add (dst.block(row),
                                   src.block(col));
     };
@@ -2535,9 +2535,9 @@ Tvmult_block_block (BlockVectorType       &dst,
 
   dst = 0.;
 
-  for (unsigned int row=0; row<n_block_rows(); ++row)
+  for (size_type row=0; row<n_block_rows(); ++row)
     {
-      for (unsigned int col=0; col<n_block_cols(); ++col)
+      for (size_type col=0; col<n_block_cols(); ++col)
         block(row,col).Tvmult_add (dst.block(col),
                                    src.block(row));
     };
@@ -2560,7 +2560,7 @@ Tvmult_block_nonblock (BlockVectorType &dst,
 
   dst = 0.;
 
-  for (unsigned int col=0; col<n_block_cols(); ++col)
+  for (size_type col=0; col<n_block_cols(); ++col)
     block(0,col).Tvmult_add (dst.block(col), src);
 }
 
@@ -2581,7 +2581,7 @@ Tvmult_nonblock_block (VectorType    &dst,
 
   block(0,0).Tvmult (dst, src.block(0));
 
-  for (unsigned int row=1; row<n_block_rows(); ++row)
+  for (size_type row=1; row<n_block_rows(); ++row)
     block(row,0).Tvmult_add (dst, src.block(row));
 }
 
@@ -2615,9 +2615,9 @@ BlockMatrixBase<MatrixType>::Tvmult_add (BlockVectorType &dst,
   Assert (src.n_blocks() == n_block_rows(),
           ExcDimensionMismatch(src.n_blocks(), n_block_rows()));
 
-  for (unsigned int row=0; row<n_block_rows(); ++row)
+  for (size_type row=0; row<n_block_rows(); ++row)
     {
-      for (unsigned int col=0; col<n_block_cols(); ++col)
+      for (size_type col=0; col<n_block_cols(); ++col)
         block(row,col).Tvmult_add (dst.block(col),
                                    src.block(row));
     };
@@ -2635,8 +2635,8 @@ BlockMatrixBase<MatrixType>::matrix_norm_square (const BlockVectorType &v) const
           ExcDimensionMismatch(v.n_blocks(), n_block_rows()));
 
   value_type norm_sqr = 0;
-  for (unsigned int row=0; row<n_block_rows(); ++row)
-    for (unsigned int col=0; col<n_block_cols(); ++col)
+  for (size_type row=0; row<n_block_rows(); ++row)
+    for (size_type col=0; col<n_block_cols(); ++col)
       if (row==col)
         norm_sqr += block(row,col).matrix_norm_square (v.block(row));
       else
@@ -2660,8 +2660,8 @@ matrix_scalar_product (const BlockVectorType    &u,
           ExcDimensionMismatch(v.n_blocks(), n_block_cols()));
 
   value_type result = 0;
-  for (unsigned int row=0; row<n_block_rows(); ++row)
-    for (unsigned int col=0; col<n_block_cols(); ++col)
+  for (size_type row=0; row<n_block_rows(); ++row)
+    for (size_type col=0; col<n_block_cols(); ++col)
       result += block(row,col).matrix_scalar_product (u.block(row),
                                                       v.block(col));
   return result;
@@ -2697,25 +2697,25 @@ residual (BlockVectorType          &dst,
   // perform a sign change of the
   // first two term before, and after
   // adding up
-  for (unsigned int row=0; row<n_block_rows(); ++row)
+  for (size_type row=0; row<n_block_rows(); ++row)
     {
       block(row,0).residual (dst.block(row),
                              x.block(0),
                              b.block(row));
 
-      for (unsigned int i=0; i<dst.block(row).size(); ++i)
+      for (size_type i=0; i<dst.block(row).size(); ++i)
         dst.block(row)(i) = -dst.block(row)(i);
 
-      for (unsigned int col=1; col<n_block_cols(); ++col)
+      for (size_type col=1; col<n_block_cols(); ++col)
         block(row,col).vmult_add (dst.block(row),
                                   x.block(col));
 
-      for (unsigned int i=0; i<dst.block(row).size(); ++i)
+      for (size_type i=0; i<dst.block(row).size(); ++i)
         dst.block(row)(i) = -dst.block(row)(i);
     };
 
   value_type res = 0;
-  for (unsigned int row=0; row<n_block_rows(); ++row)
+  for (size_type row=0; row<n_block_rows(); ++row)
     res += dst.block(row).norm_sqr ();
   return std::sqrt(res);
 }
@@ -2728,8 +2728,8 @@ void
 BlockMatrixBase<MatrixType>::print (std::ostream &out,
                                     const bool    alternative_output) const
 {
-  for (unsigned int row=0; row<n_block_rows(); ++row)
-    for (unsigned int col=0; col<n_block_cols(); ++col)
+  for (size_type row=0; row<n_block_rows(); ++row)
+    for (size_type col=0; col<n_block_cols(); ++col)
       {
         if (!alternative_output)
           out << "Block (" << row << ", " << col << ")" << std::endl;
@@ -2763,7 +2763,7 @@ BlockMatrixBase<MatrixType>::end () const
 template <class MatrixType>
 inline
 typename BlockMatrixBase<MatrixType>::const_iterator
-BlockMatrixBase<MatrixType>::begin (const unsigned int r) const
+BlockMatrixBase<MatrixType>::begin (const size_type r) const
 {
   Assert (r<m(), ExcIndexRange(r,0,m()));
   return const_iterator(this, r);
@@ -2774,7 +2774,7 @@ BlockMatrixBase<MatrixType>::begin (const unsigned int r) const
 template <class MatrixType>
 inline
 typename BlockMatrixBase<MatrixType>::const_iterator
-BlockMatrixBase<MatrixType>::end (const unsigned int r) const
+BlockMatrixBase<MatrixType>::end (const size_type r) const
 {
   Assert (r<m(), ExcIndexRange(r,0,m()));
   return const_iterator(this, r+1);
@@ -2805,7 +2805,7 @@ BlockMatrixBase<MatrixType>::end ()
 template <class MatrixType>
 inline
 typename BlockMatrixBase<MatrixType>::iterator
-BlockMatrixBase<MatrixType>::begin (const unsigned int r)
+BlockMatrixBase<MatrixType>::begin (const size_type r)
 {
   Assert (r<m(), ExcIndexRange(r,0,m()));
   return iterator(this, r);
@@ -2816,7 +2816,7 @@ BlockMatrixBase<MatrixType>::begin (const unsigned int r)
 template <class MatrixType>
 inline
 typename BlockMatrixBase<MatrixType>::iterator
-BlockMatrixBase<MatrixType>::end (const unsigned int r)
+BlockMatrixBase<MatrixType>::end (const size_type r)
 {
   Assert (r<m(), ExcIndexRange(r,0,m()));
   return iterator(this, r+1);
@@ -2828,18 +2828,18 @@ template <class MatrixType>
 void
 BlockMatrixBase<MatrixType>::collect_sizes ()
 {
-  std::vector<unsigned int> row_sizes (this->n_block_rows());
-  std::vector<unsigned int> col_sizes (this->n_block_cols());
+  std::vector<size_type> row_sizes (this->n_block_rows());
+  std::vector<size_type> col_sizes (this->n_block_cols());
 
   // first find out the row sizes
   // from the first block column
-  for (unsigned int r=0; r<this->n_block_rows(); ++r)
+  for (size_type r=0; r<this->n_block_rows(); ++r)
     row_sizes[r] = sub_objects[r][0]->m();
   // then check that the following
   // block columns have the same
   // sizes
-  for (unsigned int c=1; c<this->n_block_cols(); ++c)
-    for (unsigned int r=0; r<this->n_block_rows(); ++r)
+  for (size_type c=1; c<this->n_block_cols(); ++c)
+    for (size_type r=0; r<this->n_block_rows(); ++r)
       Assert (row_sizes[r] == sub_objects[r][c]->m(),
               ExcIncompatibleRowNumbers (r,0,r,c));
 
@@ -2849,10 +2849,10 @@ BlockMatrixBase<MatrixType>::collect_sizes ()
 
 
   // then do the same with the columns
-  for (unsigned int c=0; c<this->n_block_cols(); ++c)
+  for (size_type c=0; c<this->n_block_cols(); ++c)
     col_sizes[c] = sub_objects[0][c]->n();
-  for (unsigned int r=1; r<this->n_block_rows(); ++r)
-    for (unsigned int c=0; c<this->n_block_cols(); ++c)
+  for (size_type r=1; r<this->n_block_rows(); ++r)
+    for (size_type c=0; c<this->n_block_cols(); ++c)
       Assert (col_sizes[c] == sub_objects[r][c]->n(),
               ExcIncompatibleRowNumbers (0,c,r,c));
 
@@ -2867,8 +2867,8 @@ template <class MatrixType>
 void
 BlockMatrixBase<MatrixType>::prepare_add_operation ()
 {
-  for (unsigned int row=0; row<n_block_rows(); ++row)
-    for (unsigned int col=0; col<n_block_cols(); ++col)
+  for (size_type row=0; row<n_block_rows(); ++row)
+    for (size_type col=0; col<n_block_cols(); ++col)
       block(row, col).prepare_add();
 }
 
@@ -2878,8 +2878,8 @@ template <class MatrixType>
 void
 BlockMatrixBase<MatrixType>::prepare_set_operation ()
 {
-  for (unsigned int row=0; row<n_block_rows(); ++row)
-    for (unsigned int col=0; col<n_block_cols(); ++col)
+  for (size_type row=0; row<n_block_rows(); ++row)
+    for (size_type col=0; col<n_block_cols(); ++col)
       block(row, col).prepare_set();
 }
 
index b034e7ce81ba8e0a1b097d6abdb9e5ceaec85f95..cd6c55c94f0fd48468199d7346c9f413cedf0219 100644 (file)
@@ -45,6 +45,11 @@ template <typename number>
 class BlockSparseMatrix : public BlockMatrixBase<SparseMatrix<number> >
 {
 public:
+  /**
+   * Declare type for container size.
+   */
+  typedef std::size_t size_type;
+
   /**
    * Typedef the base class for simpler
    * access to its own typedefs.
@@ -204,7 +209,7 @@ public:
    * Return the number of entries
    * in a specific row.
    */
-  unsigned int get_row_length (const types::global_dof_index row) const;
+  size_type get_row_length (const size_type row) const;
 
   /**
    * Return the number of nonzero
@@ -215,7 +220,7 @@ public:
    * the entries should happen to
    * be zero, it is counted anyway.
    */
-  unsigned int n_nonzero_elements () const;
+  size_type n_nonzero_elements () const;
 
   /**
    * Return the number of actually
@@ -224,7 +229,7 @@ public:
    * (with absolute value larger than
    * threshold) of all the blocks.
    */
-  unsigned int n_actually_nonzero_elements (const double threshold = 0.0) const;
+  size_type n_actually_nonzero_elements (const double threshold = 0.0) const;
 
   /**
    * Return a (constant) reference
@@ -470,8 +475,8 @@ BlockSparseMatrix<number>::operator = (const double d)
 {
   Assert (d==0, ExcScalarAssignmentOnlyForZeroValue());
 
-  for (unsigned int r=0; r<this->n_block_rows(); ++r)
-    for (unsigned int c=0; c<this->n_block_cols(); ++c)
+  for (size_type r=0; r<this->n_block_rows(); ++r)
+    for (size_type c=0; c<this->n_block_cols(); ++c)
       this->block(r,c) = d;
 
   return *this;
@@ -596,7 +601,7 @@ precondition_Jacobi (BlockVectorType       &dst,
 
   // do a diagonal preconditioning. uses only
   // the diagonal blocks of the matrix
-  for (unsigned int i=0; i<this->n_block_rows(); ++i)
+  for (size_type i=0; i<this->n_block_rows(); ++i)
     this->block(i,i).precondition_Jacobi (dst.block(i),
                                           src.block(i),
                                           omega);
index d31077225a07bf2f47f458f56846ced120a741c1..215f259e9a0e4241752c26b14511a8fb001651bf 100644 (file)
@@ -60,8 +60,8 @@ operator = (const BlockSparseMatrix<number> &m)
   // anything except than checking
   // whether the base objects want to
   // do something
-  for (unsigned int r=0; r<this->n_block_rows(); ++r)
-    for (unsigned int c=0; c<this->n_block_cols(); ++c)
+  for (size_type r=0; r<this->n_block_rows(); ++r)
+    for (size_type c=0; c<this->n_block_cols(); ++c)
       this->block(r,c) = m.block(r,c);
 
   return *this;
@@ -100,8 +100,8 @@ reinit (const BlockSparsityPattern &sparsity)
                             sparsity.n_block_cols());
 
   // and reinitialize the blocks
-  for (unsigned int r=0; r<this->n_block_rows(); ++r)
-    for (unsigned int c=0; c<this->n_block_cols(); ++c)
+  for (size_type r=0; r<this->n_block_rows(); ++r)
+    for (size_type c=0; c<this->n_block_cols(); ++c)
       {
         BlockType *p = new SparseMatrix<number>();
         p->reinit (sparsity.block(r,c));
@@ -115,8 +115,8 @@ template <typename number>
 bool
 BlockSparseMatrix<number>::empty () const
 {
-  for (unsigned int r=0; r<this->n_block_rows(); ++r)
-    for (unsigned int c=0; c<this->n_block_cols(); ++c)
+  for (size_type r=0; r<this->n_block_rows(); ++r)
+    for (size_type c=0; c<this->n_block_cols(); ++c)
       if (this->block(r,c).empty () == false)
         return false;
 
@@ -127,8 +127,8 @@ BlockSparseMatrix<number>::empty () const
 
 
 template <typename number>
-unsigned int
-BlockSparseMatrix<number>::get_row_length (const types::global_dof_index row) const
+size_type 
+BlockSparseMatrix<number>::get_row_length (const size_type row) const
 {
   return sparsity_pattern->row_length(row);
 }
@@ -136,7 +136,7 @@ BlockSparseMatrix<number>::get_row_length (const types::global_dof_index row) co
 
 
 template <typename number>
-unsigned int
+size_type 
 BlockSparseMatrix<number>::n_nonzero_elements () const
 {
   return sparsity_pattern->n_nonzero_elements ();
@@ -145,12 +145,12 @@ BlockSparseMatrix<number>::n_nonzero_elements () const
 
 
 template <typename number>
-unsigned int
+size_type 
 BlockSparseMatrix<number>::n_actually_nonzero_elements (const double threshold) const
 {
-  unsigned int count = 0;
-  for (unsigned int i=0; i<this->n_block_rows(); ++i)
-    for (unsigned int j=0; j<this->n_block_cols(); ++j)
+  size_type count = 0;
+  for (size_type i=0; i<this->n_block_rows(); ++i)
+    for (size_type j=0; j<this->n_block_cols(); ++j)
       count += this->sub_objects[i][j]->n_actually_nonzero_elements (threshold);
 
   return count;
@@ -177,8 +177,8 @@ print_formatted (std::ostream       &out,
                  const char         *zero_string,
                  const double        denominator) const
 {
-  for (unsigned int r=0; r<this->n_block_rows(); ++r)
-    for (unsigned int c=0; c<this->n_block_cols(); ++c)
+  for (size_type r=0; r<this->n_block_rows(); ++r)
+    for (size_type c=0; c<this->n_block_cols(); ++c)
       {
         out << "Component (" << r << "," << c << ")" << std::endl;
         this->block(r,c).print_formatted (out, precision, scientific,
@@ -194,8 +194,8 @@ BlockSparseMatrix<number>::memory_consumption () const
 {
   std::size_t mem = sizeof(*this);
   mem += MemoryConsumption::memory_consumption (this->sub_objects);
-  for (unsigned int r=0; r<this->n_block_rows(); ++r)
-    for (unsigned int c=0; c<this->n_block_cols(); ++c)
+  for (size_type r=0; r<this->n_block_rows(); ++r)
+    for (size_type c=0; c<this->n_block_cols(); ++c)
       mem += MemoryConsumption::memory_consumption(*this->sub_objects[r][c]);
 
   return mem;
index f623643e9b964776dc38027d4d98a881ed61b8c1..45448976c831621f5dd34244998352d80c49ddbf 100644 (file)
@@ -47,6 +47,11 @@ template<typename Number>
 class BlockSparseMatrixEZ : public Subscriptor
 {
 public:
+  /**
+   * Declare type for container size.
+   */
+  typedef std::size_t size_type;
+
   /**
    * Default constructor. The
    * result is an empty object with
@@ -61,8 +66,8 @@ public:
    * blocks themselves still have
    * zero dimension.
    */
-  BlockSparseMatrixEZ (const unsigned int block_rows,
-                       const unsigned int block_cols);
+  BlockSparseMatrixEZ (const size_type block_rows,
+                       const size_type block_cols);
 
   /**
    * Copy constructor. This is
@@ -123,8 +128,8 @@ public:
    * called to update internal data
    * structures.
    */
-  void reinit (const unsigned int n_block_rows,
-               const unsigned int n_block_cols);
+  void reinit (const size_type n_block_rows,
+               const size_type n_block_cols);
   /**
    * This function collects the
    * sizes of the sub-objects and
@@ -144,8 +149,8 @@ public:
    * given coordinates.
    */
   SparseMatrixEZ<Number> &
-  block (const unsigned int row,
-         const unsigned int column);
+  block (const size_type row,
+         const size_type column);
 
 
   /**
@@ -154,20 +159,20 @@ public:
    * constant objects.
    */
   const SparseMatrixEZ<Number> &
-  block (const unsigned int row,
-         const unsigned int column) const;
+  block (const size_type row,
+         const size_type column) const;
 
   /**
    * Return the number of blocks in a
    * column.
    */
-  unsigned int n_block_rows () const;
+  size_type n_block_rows () const;
 
   /**
    * Return the number of blocks in a
    * row.
    */
-  unsigned int n_block_cols () const;
+  size_type n_block_cols () const;
 
   /**
    * Return whether the object is
@@ -189,7 +194,7 @@ public:
    * space. It is the sum of rows
    * of the rows of sub-matrices.
    */
-  types::global_dof_index n_rows () const;
+  size_type n_rows () const;
 
   /**
    * Return number of columns of
@@ -199,7 +204,7 @@ public:
    * columns of the columns of
    * sub-matrices.
    */
-  types::global_dof_index n_cols () const;
+  size_type n_cols () const;
 
   /**
    * Return the dimension of the
@@ -207,7 +212,7 @@ public:
    * matrix is of dimension
    * $m \times n$.
    */
-  types::global_dof_index m () const;
+  size_type m () const;
 
   /**
    * Return the dimension of the
@@ -215,7 +220,7 @@ public:
    * matrix is of dimension
    * $m \times n$.
    */
-  types::global_dof_index n () const;
+  size_type n () const;
 
   /**
    * Set the element <tt>(i,j)</tt>
@@ -226,8 +231,8 @@ public:
    * allowed to store zero values
    * in non-existent fields.
    */
-  void set (const types::global_dof_index i,
-            const types::global_dof_index j,
+  void set (const size_type i,
+            const size_type j,
             const Number value);
 
   /**
@@ -239,7 +244,7 @@ public:
    * is allowed to store zero
    * values in non-existent fields.
    */
-  void add (const types::global_dof_index i, const types::global_dof_index j,
+  void add (const size_type i, const size_type j,
             const Number value);
 
 
@@ -328,7 +333,7 @@ private:
 
 template <typename Number>
 inline
-unsigned int
+size_type
 BlockSparseMatrixEZ<Number>::n_block_rows () const
 {
   return row_indices.size();
@@ -338,7 +343,7 @@ BlockSparseMatrixEZ<Number>::n_block_rows () const
 
 template <typename Number>
 inline
-unsigned int
+size_type
 BlockSparseMatrixEZ<Number>::n_rows () const
 {
   return row_indices.total_size();
@@ -348,7 +353,7 @@ BlockSparseMatrixEZ<Number>::n_rows () const
 
 template <typename Number>
 inline
-unsigned int
+size_type
 BlockSparseMatrixEZ<Number>::n_block_cols () const
 {
   return column_indices.size();
@@ -358,7 +363,7 @@ BlockSparseMatrixEZ<Number>::n_block_cols () const
 
 template <typename Number>
 inline
-unsigned int
+size_type
 BlockSparseMatrixEZ<Number>::n_cols () const
 {
   return column_indices.total_size();
@@ -369,8 +374,8 @@ BlockSparseMatrixEZ<Number>::n_cols () const
 template <typename Number>
 inline
 SparseMatrixEZ<Number> &
-BlockSparseMatrixEZ<Number>::block (const unsigned int row,
-                                    const unsigned int column)
+BlockSparseMatrixEZ<Number>::block (const size_type row,
+                                    const size_type column)
 {
   Assert (row<n_block_rows(), ExcIndexRange (row, 0, n_block_rows()));
   Assert (column<n_block_cols(), ExcIndexRange (column, 0, n_block_cols()));
@@ -383,8 +388,8 @@ BlockSparseMatrixEZ<Number>::block (const unsigned int row,
 template <typename Number>
 inline
 const SparseMatrixEZ<Number> &
-BlockSparseMatrixEZ<Number>::block (const unsigned int row,
-                                    const unsigned int column) const
+BlockSparseMatrixEZ<Number>::block (const size_type row,
+                                    const size_type column) const
 {
   Assert (row<n_block_rows(), ExcIndexRange (row, 0, n_block_rows()));
   Assert (column<n_block_cols(), ExcIndexRange (column, 0, n_block_cols()));
@@ -396,7 +401,7 @@ BlockSparseMatrixEZ<Number>::block (const unsigned int row,
 
 template <typename Number>
 inline
-types::global_dof_index
+size_type
 BlockSparseMatrixEZ<Number>::m () const
 {
   return n_rows();
@@ -406,7 +411,7 @@ BlockSparseMatrixEZ<Number>::m () const
 
 template <typename Number>
 inline
-types::global_dof_index
+size_type
 BlockSparseMatrixEZ<Number>::n () const
 {
   return n_cols();
@@ -417,14 +422,14 @@ BlockSparseMatrixEZ<Number>::n () const
 template <typename Number>
 inline
 void
-BlockSparseMatrixEZ<Number>::set (const types::global_dof_index i,
-                                  const types::global_dof_index j,
+BlockSparseMatrixEZ<Number>::set (const size_type i,
+                                  const size_type j,
                                   const Number value)
 {
 
   Assert (numbers::is_finite(value), ExcNumberNotFinite());
 
-  const std::pair<unsigned int,types::global_dof_index>
+  const std::pair<size_type,size_type>
   row_index = row_indices.global_to_local (i),
   col_index = column_indices.global_to_local (j);
   block(row_index.first,col_index.first).set (row_index.second,
@@ -437,14 +442,14 @@ BlockSparseMatrixEZ<Number>::set (const types::global_dof_index i,
 template <typename Number>
 inline
 void
-BlockSparseMatrixEZ<Number>::add (const types::global_dof_index i,
-                                  const types::global_dof_index j,
+BlockSparseMatrixEZ<Number>::add (const size_type i,
+                                  const size_type j,
                                   const Number value)
 {
 
   Assert (numbers::is_finite(value), ExcNumberNotFinite());
 
-  const std::pair<unsigned int,types::global_dof_index>
+  const std::pair<size_type,size_type>
   row_index = row_indices.global_to_local (i),
   col_index = column_indices.global_to_local (j);
   block(row_index.first,col_index.first).add (row_index.second,
@@ -466,8 +471,8 @@ BlockSparseMatrixEZ<Number>::vmult (BlockVector<somenumber>       &dst,
 
   dst = 0.;
 
-  for (unsigned int row=0; row<n_block_rows(); ++row)
-    for (unsigned int col=0; col<n_block_cols(); ++col)
+  for (size_type row=0; row<n_block_rows(); ++row)
+    for (size_type col=0; col<n_block_cols(); ++col)
       block(row,col).vmult_add (dst.block(row),
                                 src.block(col));
 }
@@ -486,8 +491,8 @@ vmult_add (BlockVector<somenumber>       &dst,
   Assert (src.n_blocks() == n_block_cols(),
           ExcDimensionMismatch(src.n_blocks(), n_block_cols()));
 
-  for (unsigned int row=0; row<n_block_rows(); ++row)
-    for (unsigned int col=0; col<n_block_cols(); ++col)
+  for (size_type row=0; row<n_block_rows(); ++row)
+    for (size_type col=0; col<n_block_cols(); ++col)
       block(row,col).vmult_add (dst.block(row),
                                 src.block(col));
 }
@@ -509,8 +514,8 @@ Tvmult (BlockVector<somenumber>       &dst,
 
   dst = 0.;
 
-  for (unsigned int row=0; row<n_block_rows(); ++row)
-    for (unsigned int col=0; col<n_block_cols(); ++col)
+  for (size_type row=0; row<n_block_rows(); ++row)
+    for (size_type col=0; col<n_block_cols(); ++col)
       block(row,col).Tvmult_add (dst.block(col),
                                  src.block(row));
 }
@@ -529,9 +534,9 @@ Tvmult_add (BlockVector<somenumber>       &dst,
   Assert (src.n_blocks() == n_block_rows(),
           ExcDimensionMismatch(src.n_blocks(), n_block_rows()));
 
-  for (unsigned int row=0; row<n_block_rows(); ++row)
+  for (size_type row=0; row<n_block_rows(); ++row)
     {
-      for (unsigned int col=0; col<n_block_cols(); ++col)
+      for (size_type col=0; col<n_block_cols(); ++col)
         block(row,col).Tvmult_add (dst.block(col),
                                    src.block(row));
     };
@@ -544,18 +549,18 @@ inline
 void
 BlockSparseMatrixEZ<number>::print_statistics (STREAM &out, bool full)
 {
-  unsigned int used_total = 0;
-  unsigned int allocated_total = 0;
-  unsigned int reserved_total = 0;
-  std::vector<unsigned int> used_by_line_total;
-
-  unsigned int used;
-  unsigned int allocated;
-  unsigned int reserved;
-  std::vector<unsigned int> used_by_line;
-
-  for (unsigned int i=0; i<n_block_rows(); ++i)
-    for (unsigned int j=0; j<n_block_cols(); ++j)
+  size_type used_total = 0;
+  size_type allocated_total = 0;
+  size_type reserved_total = 0;
+  std::vector<size_type> used_by_line_total;
+
+  size_type used;
+  size_type allocated;
+  size_type reserved;
+  std::vector<size_type> used_by_line;
+
+  for (size_type i=0; i<n_block_rows(); ++i)
+    for (size_type j=0; j<n_block_cols(); ++j)
       {
         used_by_line.clear();
         out << "block:\t" << i << '\t' << j << std::endl;
@@ -573,7 +578,7 @@ BlockSparseMatrixEZ<number>::print_statistics (STREAM &out, bool full)
         if (full)
           {
             used_by_line_total.resize(used_by_line.size());
-            for (unsigned int i=0; i< used_by_line.size(); ++i)
+            for (size_type i=0; i< used_by_line.size(); ++i)
               if (used_by_line[i] != 0)
                 {
                   out << "row-entries\t" << i
@@ -587,7 +592,7 @@ BlockSparseMatrixEZ<number>::print_statistics (STREAM &out, bool full)
       << "used:" << used_total << std::endl
       << "allocated:" << allocated_total << std::endl
       << "reserved:" << reserved_total << std::endl;
-  for (unsigned int i=0; i< used_by_line_total.size(); ++i)
+  for (size_type i=0; i< used_by_line_total.size(); ++i)
     if (used_by_line_total[i] != 0)
       {
         out << "row-entries\t" << i
index 7b77108246f12a5c6f63d154db4dc7c00fa47fef..a97b1175b06494f23f91bbc98490af0b4d7bfd13 100644 (file)
@@ -28,8 +28,8 @@ BlockSparseMatrixEZ<number>::BlockSparseMatrixEZ ()
 
 template <typename number>
 BlockSparseMatrixEZ<number>::
-BlockSparseMatrixEZ (const unsigned int rows,
-                     const unsigned int cols)
+BlockSparseMatrixEZ (const size_type rows,
+                     const size_type cols)
   :
   row_indices (rows, 0),
   column_indices (cols, 0)
@@ -60,8 +60,8 @@ operator = (const BlockSparseMatrixEZ<number> &m)
   // anything except than checking
   // whether the base objects want to
   // do something
-  for (unsigned int r=0; r<n_block_rows(); ++r)
-    for (unsigned int c=0; c<n_block_cols(); ++c)
+  for (size_type r=0; r<n_block_rows(); ++r)
+    for (size_type c=0; c<n_block_cols(); ++c)
       block(r,c) = m.block(r,c);
   return *this;
 }
@@ -74,8 +74,8 @@ BlockSparseMatrixEZ<number>::operator = (const double d)
 {
   Assert (d==0, ExcScalarAssignmentOnlyForZeroValue());
 
-  for (unsigned int r=0; r<n_block_rows(); ++r)
-    for (unsigned int c=0; c<n_block_cols(); ++c)
+  for (size_type r=0; r<n_block_rows(); ++r)
+    for (size_type c=0; c<n_block_cols(); ++c)
       block(r,c) = 0;
 
   return *this;
@@ -97,8 +97,8 @@ BlockSparseMatrixEZ<number>::BlockSparseMatrixEZ (
 
 template <typename number>
 void
-BlockSparseMatrixEZ<number>::reinit (const unsigned int rows,
-                                     const unsigned int cols)
+BlockSparseMatrixEZ<number>::reinit (const size_type rows,
+                                     const size_type cols)
 {
   row_indices.reinit(rows, 0);
   column_indices.reinit(cols, 0);
@@ -122,8 +122,8 @@ template <typename number>
 bool
 BlockSparseMatrixEZ<number>::empty () const
 {
-  for (unsigned int r=0; r<n_block_rows(); ++r)
-    for (unsigned int c=0; c<n_block_cols(); ++c)
+  for (size_type r=0; r<n_block_rows(); ++r)
+    for (size_type c=0; c<n_block_cols(); ++c)
       if (block(r,c).empty () == false)
         return false;
   return true;
@@ -135,20 +135,20 @@ template <typename number>
 void
 BlockSparseMatrixEZ<number>::collect_sizes ()
 {
-  const unsigned int rows = n_block_rows();
-  const unsigned int columns = n_block_cols();
-  std::vector<types::global_dof_index> row_sizes (rows);
-  std::vector<types::global_dof_index> col_sizes (columns);
+  const size_type rows = n_block_rows();
+  const size_type columns = n_block_cols();
+  std::vector<size_type> row_sizes (rows);
+  std::vector<size_type> col_sizes (columns);
 
   // first find out the row sizes
   // from the first block column
-  for (unsigned int r=0; r<rows; ++r)
+  for (size_type r=0; r<rows; ++r)
     row_sizes[r] = blocks[r][0].m();
   // then check that the following
   // block columns have the same
   // sizes
-  for (unsigned int c=1; c<columns; ++c)
-    for (unsigned int r=0; r<rows; ++r)
+  for (size_type c=1; c<columns; ++c)
+    for (size_type r=0; r<rows; ++r)
       Assert (row_sizes[r] == blocks[r][c].m(),
               ExcDimensionMismatch (row_sizes[r], blocks[r][c].m()));
 
@@ -158,10 +158,10 @@ BlockSparseMatrixEZ<number>::collect_sizes ()
 
 
   // then do the same with the columns
-  for (unsigned int c=0; c<columns; ++c)
+  for (size_type c=0; c<columns; ++c)
     col_sizes[c] = blocks[0][c].n();
-  for (unsigned int r=1; r<rows; ++r)
-    for (unsigned int c=0; c<columns; ++c)
+  for (size_type r=1; r<rows; ++r)
+    for (size_type c=0; c<columns; ++c)
       Assert (col_sizes[c] == blocks[r][c].n(),
               ExcDimensionMismatch (col_sizes[c], blocks[r][c].n()));
 
index 3ceac28524f89b2b51b0081217e1186924e31271..81cfa10a2b78e624bbac0e24ff7d7a37486b18ed 100644 (file)
@@ -82,6 +82,11 @@ template <class SparsityPatternBase>
 class BlockSparsityPatternBase : public Subscriptor
 {
 public:
+  /**
+   * Declare type for container size.
+   */
+  typedef std::size_t size_type;
+
   /**
    * Define a value which is used
    * to indicate that a certain
@@ -94,7 +99,7 @@ public:
    * the respective value of the
    * SparsityPattern class.
    */
-  static const unsigned int invalid_entry = SparsityPattern::invalid_entry;
+  static const size_type invalid_entry = SparsityPattern::invalid_entry;
 
   /**
    * Initialize the matrix empty,
@@ -116,8 +121,8 @@ public:
    * to call collect_sizes() after
    * you assign them sizes.
    */
-  BlockSparsityPatternBase (const unsigned int n_block_rows,
-                            const unsigned int n_block_columns);
+  BlockSparsityPatternBase (const size_type n_block_rows,
+                            const size_type n_block_columns);
 
   /**
    * Copy constructor. This
@@ -163,8 +168,8 @@ public:
    * user call whatever function
    * she desires.
    */
-  void reinit (const unsigned int n_block_rows,
-               const unsigned int n_block_columns);
+  void reinit (const size_type n_block_rows,
+               const size_type n_block_columns);
 
   /**
    * Copy operator. For this the
@@ -195,8 +200,8 @@ public:
    * given coordinates.
    */
   SparsityPatternBase &
-  block (const unsigned int row,
-         const unsigned int column);
+  block (const size_type row,
+         const size_type column);
 
 
   /**
@@ -205,8 +210,8 @@ public:
    * constant objects.
    */
   const SparsityPatternBase &
-  block (const unsigned int row,
-         const unsigned int column) const;
+  block (const size_type row,
+         const size_type column) const;
 
   /**
    * Grant access to the object
@@ -239,13 +244,13 @@ public:
    * Return the number of blocks in a
    * column.
    */
-  unsigned int n_block_rows () const;
+  size_type n_block_rows () const;
 
   /**
    * Return the number of blocks in a
    * row.
    */
-  unsigned int n_block_cols () const;
+  size_type n_block_cols () const;
 
   /**
    * Return whether the object is
@@ -268,7 +273,7 @@ public:
    * blocks in a row, and the
    * maximum over all rows.
    */
-  unsigned int max_entries_per_row () const;
+  size_type max_entries_per_row () const;
 
   /**
    * Add a nonzero entry to the matrix.
@@ -282,7 +287,7 @@ public:
    * to which block <tt>(i,j)</tt> belongs
    * and then relays to that block.
    */
-  void add (const types::global_dof_index i, const types::global_dof_index j);
+  void add (const size_type i, const size_type j);
 
   /**
    * Add several nonzero entries to the
@@ -300,10 +305,10 @@ public:
    * blocks.
    */
   template <typename ForwardIterator>
-  void add_entries (const unsigned int row,
-                    ForwardIterator    begin,
-                    ForwardIterator    end,
-                    const bool         indices_are_sorted = false);
+  void add_entries (const size_type  row,
+                    ForwardIterator  begin,
+                    ForwardIterator  end,
+                    const bool       indices_are_sorted = false);
 
   /**
    * Return number of rows of this
@@ -313,7 +318,7 @@ public:
    * of the (block-)rows of
    * sub-matrices.
    */
-  types::global_dof_index n_rows () const;
+  size_type n_rows () const;
 
   /**
    * Return number of columns of
@@ -323,13 +328,13 @@ public:
    * columns of the (block-)columns
    * of sub-matrices.
    */
-  types::global_dof_index n_cols () const;
+  size_type n_cols () const;
 
   /**
    * Check if a value at a certain
    * position may be non-zero.
    */
-  bool exists (const types::global_dof_index i, const types::global_dof_index j) const;
+  bool exists (const size_type i, const size_type j) const;
 
   /**
    * Number of entries in a
@@ -337,7 +342,7 @@ public:
    * all the blocks that form this
    * row.
    */
-  unsigned int row_length (const types::global_dof_index row) const;
+  size_type row_length (const size_type row) const;
 
   /**
    * Return the number of nonzero
@@ -358,7 +363,7 @@ public:
    * the sum of the values as
    * returned by the sub-objects.
    */
-  unsigned int n_nonzero_elements () const;
+  size_type n_nonzero_elements () const;
 
   /**
    * Print the sparsity of the
@@ -410,12 +415,12 @@ protected:
   /**
    * Number of block rows.
    */
-  unsigned int rows;
+  size_type rows;
 
   /**
    * Number of block columns.
    */
-  unsigned int columns;
+  size_type columns;
 
   /**
    * Array of sparsity patterns.
@@ -445,7 +450,7 @@ private:
    * individual blocks when doing a
    * collective add or set.
    */
-  std::vector<unsigned int> counter_within_block;
+  std::vector<size_type > counter_within_block;
 
   /**
    * Temporary vector for column
@@ -453,7 +458,7 @@ private:
    * local to global data on each
    * sparse matrix.
    */
-  std::vector<std::vector<unsigned int> > block_column_indices;
+  std::vector<std::vector<size_type > > block_column_indices;
 
   /**
    * Make the block sparse matrix a
@@ -501,15 +506,15 @@ public:
    * to call collect_sizes() after
    * you assign them sizes.
    */
-  BlockSparsityPattern (const unsigned int n_rows,
-                        const unsigned int n_columns);
+  BlockSparsityPattern (const size_type n_rows,
+                        const size_type n_columns);
 
   /**
    * Forwarding to
    * BlockSparsityPatternBase::reinit().
    */
-  void reinit (const unsigned int n_block_rows,
-               const unsigned int n_block_columns);
+  void reinit (const size_type n_block_rows,
+               const size_type n_block_columns);
 
   /**
    * Initialize the pattern with
@@ -535,7 +540,7 @@ public:
    */
   void reinit (const BlockIndices &row_indices,
                const BlockIndices &col_indices,
-               const std::vector<std::vector<types::global_dof_index> > &row_lengths);
+               const std::vector<std::vector<size_type> > &row_lengths);
 
 
   /**
@@ -672,8 +677,8 @@ public:
    * to call collect_sizes() after
    * you assign them sizes.
    */
-  BlockCompressedSparsityPattern (const unsigned int n_rows,
-                                  const unsigned int n_columns);
+  BlockCompressedSparsityPattern (const size_type n_rows,
+                                  const size_type n_columns);
 
   /**
    * Initialize the pattern with
@@ -686,8 +691,8 @@ public:
    * and then entering the index
    * values.
    */
-  BlockCompressedSparsityPattern (const std::vector<types::global_dof_index> &row_block_sizes,
-                                  const std::vector<types::global_dof_index> &col_block_sizes);
+  BlockCompressedSparsityPattern (const std::vector<size_type> &row_block_sizes,
+                                  const std::vector<size_type> &col_block_sizes);
 
   /**
    * Initialize the pattern with
@@ -713,8 +718,8 @@ public:
    * <tt>row_block_sizes[i]</tt>
    * times <tt>col_block_sizes[j]</tt>.
    */
-  void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
-               const std::vector< types::global_dof_index > &col_block_sizes);
+  void reinit (const std::vector<size_type> &row_block_sizes,
+               const std::vector<size_type> &col_block_sizes);
 
   /**
    * Resize the matrix to a tensor
@@ -789,8 +794,8 @@ public:
    * to call collect_sizes() after
    * you assign them sizes.
    */
-  BlockCompressedSetSparsityPattern (const unsigned int n_rows,
-                                     const unsigned int n_columns);
+  BlockCompressedSetSparsityPattern (const size_type n_rows,
+                                     const size_type n_columns);
 
   /**
    * Initialize the pattern with
@@ -803,8 +808,8 @@ public:
    * and then entering the index
    * values.
    */
-  BlockCompressedSetSparsityPattern (const std::vector<types::global_dof_index> &row_block_sizes,
-                                     const std::vector<types::global_dof_index> &col_block_sizes);
+  BlockCompressedSetSparsityPattern (const std::vector<size_type> &row_block_sizes,
+                                     const std::vector<size_type> &col_block_sizes);
 
   /**
    * Initialize the pattern with
@@ -830,8 +835,8 @@ public:
    * <tt>row_block_sizes[i]</tt>
    * times <tt>col_block_sizes[j]</tt>.
    */
-  void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
-               const std::vector< types::global_dof_index > &col_block_sizes);
+  void reinit (const std::vector<size_type> &row_block_sizes,
+               const std::vector<size_type> &col_block_sizes);
 
   /**
    * Resize the matrix to a tensor
@@ -899,8 +904,8 @@ public:
    * to call collect_sizes() after
    * you assign them sizes.
    */
-  BlockCompressedSimpleSparsityPattern (const unsigned int n_rows,
-                                        const unsigned int n_columns);
+  BlockCompressedSimpleSparsityPattern (const size_type n_rows,
+                                        const size_type n_columns);
 
   /**
    * Initialize the pattern with
@@ -913,8 +918,8 @@ public:
    * and then entering the index
    * values.
    */
-  BlockCompressedSimpleSparsityPattern (const std::vector<types::global_dof_index> &row_block_sizes,
-                                        const std::vector<types::global_dof_index> &col_block_sizes);
+  BlockCompressedSimpleSparsityPattern (const std::vector<size_type> &row_block_sizes,
+                                        const std::vector<size_type> &col_block_sizes);
 
   /**
    * Initialize the pattern with symmetric
@@ -945,8 +950,8 @@ public:
    * <tt>row_block_sizes[i]</tt>
    * times <tt>col_block_sizes[j]</tt>.
    */
-  void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
-               const std::vector< types::global_dof_index > &col_block_sizes);
+  void reinit (const std::vector<size_type> &row_block_sizes,
+               const std::vector<size_type> &col_block_sizes);
 
   /**
    * Resize the pattern with symmetric
@@ -962,8 +967,8 @@ public:
    * Return the column number of
    * the @p index th entry in row @p row.
    */
-  unsigned int column_number (const unsigned int row,
-                              const unsigned int index) const;
+  size_type column_number (const size_type row,
+                           const size_type index) const;
 
   /**
    * Allow the use of the reinit
@@ -1025,8 +1030,8 @@ namespace TrilinosWrappers
      * to call collect_sizes() after
      * you assign them sizes.
      */
-    BlockSparsityPattern (const unsigned int n_rows,
-                          const unsigned int n_columns);
+    BlockSparsityPattern (const size_type n_rows,
+                          const size_type n_columns);
 
     /**
      * Initialize the pattern with
@@ -1039,8 +1044,8 @@ namespace TrilinosWrappers
      * and then entering the index
      * values.
      */
-    BlockSparsityPattern (const std::vector<types::global_dof_index> &row_block_sizes,
-                          const std::vector<types::global_dof_index> &col_block_sizes);
+    BlockSparsityPattern (const std::vector<size_type> &row_block_sizes,
+                          const std::vector<size_type> &col_block_sizes);
 
     /**
      * Initialize the pattern with an array
@@ -1087,8 +1092,8 @@ namespace TrilinosWrappers
      * <tt>row_block_sizes[i]</tt>
      * times <tt>col_block_sizes[j]</tt>.
      */
-    void reinit (const std::vector< types::global_dof_index > &row_block_sizes,
-                 const std::vector< types::global_dof_index > &col_block_sizes);
+    void reinit (const std::vector<size_type> &row_block_sizes,
+                 const std::vector<size_type> &col_block_sizes);
 
     /**
      * Resize the matrix to a square tensor
@@ -1129,8 +1134,8 @@ namespace TrilinosWrappers
 template <class SparsityPatternBase>
 inline
 SparsityPatternBase &
-BlockSparsityPatternBase<SparsityPatternBase>::block (const unsigned int row,
-                                                      const unsigned int column)
+BlockSparsityPatternBase<SparsityPatternBase>::block (const size_type row,
+                                                      const size_type column)
 {
   Assert (row<rows, ExcIndexRange(row,0,rows));
   Assert (column<columns, ExcIndexRange(column,0,columns));
@@ -1142,8 +1147,8 @@ BlockSparsityPatternBase<SparsityPatternBase>::block (const unsigned int row,
 template <class SparsityPatternBase>
 inline
 const SparsityPatternBase &
-BlockSparsityPatternBase<SparsityPatternBase>::block (const unsigned int row,
-                                                      const unsigned int column) const
+BlockSparsityPatternBase<SparsityPatternBase>::block (const size_type row,
+                                                      const size_type column) const
 {
   Assert (row<rows, ExcIndexRange(row,0,rows));
   Assert (column<columns, ExcIndexRange(column,0,columns));
@@ -1175,13 +1180,13 @@ BlockSparsityPatternBase<SparsityPatternBase>::get_column_indices () const
 template <class SparsityPatternBase>
 inline
 void
-BlockSparsityPatternBase<SparsityPatternBase>::add (const types::global_dof_index i,
-                                                    const types::global_dof_index j)
+BlockSparsityPatternBase<SparsityPatternBase>::add (const size_type i,
+                                                    const size_type j)
 {
   // if you get an error here, are
   // you sure you called
   // <tt>collect_sizes()</tt> before?
-  const std::pair<unsigned int,types::global_dof_index>
+  const std::pair<size_type,size_type>
   row_index = row_indices.global_to_local (i),
   col_index = column_indices.global_to_local (j);
   sub_objects[row_index.first][col_index.first]->add (row_index.second,
@@ -1193,10 +1198,10 @@ BlockSparsityPatternBase<SparsityPatternBase>::add (const types::global_dof_inde
 template <class SparsityPatternBase>
 template <typename ForwardIterator>
 void
-BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const types::global_dof_index row,
-                                                            ForwardIterator    begin,
-                                                            ForwardIterator    end,
-                                                            const bool         indices_are_sorted)
+BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const size_type row,
+                                                            ForwardIterator begin,
+                                                            ForwardIterator end,
+                                                            const bool      indices_are_sorted)
 {
   // Resize scratch arrays
   if (block_column_indices.size() < this->n_block_cols())
@@ -1205,7 +1210,7 @@ BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const types::global_
       counter_within_block.resize (this->n_block_cols());
     }
 
-  const types::global_dof_index n_cols = static_cast<types::global_dof_index>(end - begin);
+  const size_type n_cols = static_cast<size_type>(end - begin);
 
   // Resize sub-arrays to n_cols. This
   // is a bit wasteful, but we resize
@@ -1218,12 +1223,12 @@ BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const types::global_
   // enough before actually going
   // through all of them.
   if (block_column_indices[0].size() < n_cols)
-    for (unsigned int i=0; i<this->n_block_cols(); ++i)
+    for (size_type i=0; i<this->n_block_cols(); ++i)
       block_column_indices[i].resize(n_cols);
 
   // Reset the number of added elements
   // in each block to zero.
-  for (unsigned int i=0; i<this->n_block_cols(); ++i)
+  for (size_type i=0; i<this->n_block_cols(); ++i)
     counter_within_block[i] = 0;
 
   // Go through the column indices to
@@ -1237,12 +1242,12 @@ BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const types::global_
   // comes from an element matrix).
   for (ForwardIterator it = begin; it != end; ++it)
     {
-      const types::global_dof_index col = *it;
+      const size_type col = *it;
 
-      const std::pair<unsigned int, types::global_dof_index>
+      const std::pair<size_type , size_type>
       col_index = this->column_indices.global_to_local(col);
 
-      const unsigned int local_index = counter_within_block[col_index.first]++;
+      const size_type local_index = counter_within_block[col_index.first]++;
 
       block_column_indices[col_index.first][local_index] = col_index.second;
     }
@@ -1250,8 +1255,8 @@ BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const types::global_
 #ifdef DEBUG
   // If in debug mode, do a check whether
   // the right length has been obtained.
-  unsigned int length = 0;
-  for (unsigned int i=0; i<this->n_block_cols(); ++i)
+  size_type length = 0;
+  for (size_type i=0; i<this->n_block_cols(); ++i)
     length += counter_within_block[i];
   Assert (length == n_cols, ExcInternalError());
 #endif
@@ -1261,9 +1266,9 @@ BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const types::global_
   // where we should start reading out
   // data. Now let's write the data into
   // the individual blocks!
-  const std::pair<unsigned int,types::global_dof_index>
+  const std::pair<size_type , size_type>
   row_index = this->row_indices.global_to_local (row);
-  for (unsigned int block_col=0; block_col<n_block_cols(); ++block_col)
+  for (size_type block_col=0; block_col<n_block_cols(); ++block_col)
     {
       if (counter_within_block[block_col] == 0)
         continue;
@@ -1280,13 +1285,13 @@ BlockSparsityPatternBase<SparsityPatternBase>::add_entries (const types::global_
 template <class SparsityPatternBase>
 inline
 bool
-BlockSparsityPatternBase<SparsityPatternBase>::exists (const types::global_dof_index i,
-                                                       const types::global_dof_index j) const
+BlockSparsityPatternBase<SparsityPatternBase>::exists (const size_type i,
+                                                       const size_type j) const
 {
   // if you get an error here, are
   // you sure you called
   // <tt>collect_sizes()</tt> before?
-  const std::pair<unsigned int,types::global_dof_index>
+  const std::pair<size_type , size_type>
   row_index = row_indices.global_to_local (i),
   col_index = column_indices.global_to_local (j);
   return sub_objects[row_index.first][col_index.first]->exists (row_index.second,
@@ -1297,16 +1302,16 @@ BlockSparsityPatternBase<SparsityPatternBase>::exists (const types::global_dof_i
 
 template <class SparsityPatternBase>
 inline
-unsigned int
+size_type 
 BlockSparsityPatternBase<SparsityPatternBase>::
-row_length (const types::global_dof_index row) const
+row_length (const size_type row) const
 {
-  const std::pair<unsigned int,types::global_dof_index>
+  const std::pair<size_type , size_type>
   row_index = row_indices.global_to_local (row);
 
-  unsigned int c = 0;
+  size_type c = 0;
 
-  for (unsigned int b=0; b<rows; ++b)
+  for (size_type b=0; b<rows; ++b)
     c += sub_objects[row_index.first][b]->row_length (row_index.second);
 
   return c;
@@ -1316,7 +1321,7 @@ row_length (const types::global_dof_index row) const
 
 template <class SparsityPatternBase>
 inline
-unsigned int
+size_type 
 BlockSparsityPatternBase<SparsityPatternBase>::n_block_cols () const
 {
   return columns;
@@ -1326,7 +1331,7 @@ BlockSparsityPatternBase<SparsityPatternBase>::n_block_cols () const
 
 template <class SparsityPatternBase>
 inline
-unsigned int
+size_type 
 BlockSparsityPatternBase<SparsityPatternBase>::n_block_rows () const
 {
   return rows;
@@ -1334,20 +1339,20 @@ BlockSparsityPatternBase<SparsityPatternBase>::n_block_rows () const
 
 
 inline
-unsigned int
-BlockCompressedSimpleSparsityPattern::column_number (const unsigned int row,
-                                                     const unsigned int index) const
+size_type 
+BlockCompressedSimpleSparsityPattern::column_number (const size_type row,
+                                                     const size_type index) const
 {
   // .first= ith block, .second = jth row in that block
-  const std::pair<unsigned int,unsigned int>
+  const std::pair<size_type ,size_type >
   row_index = row_indices.global_to_local (row);
 
   Assert(index<row_length(row), ExcIndexRange(index, 0, row_length(row)));
 
-  unsigned int c = 0;
-  for (unsigned int b=0; b<columns; ++b)
+  size_type c = 0;
+  for (size_type b=0; b<columns; ++b)
     {
-      unsigned int rowlen = sub_objects[row_index.first][b]->row_length (row_index.second);
+      size_type rowlen = sub_objects[row_index.first][b]->row_length (row_index.second);
       if (index<c+rowlen)
         return c+sub_objects[row_index.first][b]->column_number(row_index.second, index-c);
       c += rowlen;
@@ -1361,8 +1366,8 @@ BlockCompressedSimpleSparsityPattern::column_number (const unsigned int row,
 inline
 void
 BlockSparsityPattern::reinit (
-  const unsigned int n_block_rows,
-  const unsigned int n_block_columns)
+  const size_type n_block_rows,
+  const size_type n_block_columns)
 {
   BlockSparsityPatternBase<SparsityPattern>::reinit (
     n_block_rows, n_block_columns);
index 5a86446e24d0f4a5e1b99cc33dfa8cc74b21a6bd..568fb2242b52cfd35b870ca7401c8ab19ac5c834 100644 (file)
@@ -56,6 +56,11 @@ template <typename Number>
 class BlockVector : public BlockVectorBase<Vector<Number> >
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std:size_t size_type;
+
   /**
    * Typedef the base class for simpler
    * access to its own typedefs.
@@ -101,8 +106,8 @@ public:
    *  use blocks of different
    *  sizes.
    */
-  explicit BlockVector (const unsigned int            num_blocks = 0,
-                        const types::global_dof_index block_size = 0);
+  explicit BlockVector (const size_type num_blocks = 0,
+                        const size_type block_size = 0);
 
   /**
    * Copy-Constructor. Dimension set to
@@ -157,7 +162,7 @@ public:
    * <tt>block_sizes[i]</tt> zero
    * elements.
    */
-  BlockVector (const std::vector<types::global_dof_index> &block_sizes);
+  BlockVector (const std::vector<size_type> &block_sizes);
 
   /**
    * Constructor. Initialize vector
@@ -185,7 +190,7 @@ public:
    * different blocks.
    */
   template <typename InputIterator>
-  BlockVector (const std::vector<unsigned int> &n,
+  BlockVector (const std::vector<size_type>    &n,
                const InputIterator              first,
                const InputIterator              end);
 
@@ -271,7 +276,7 @@ public:
    * is filled with zeros.
    */
   void reinit (const unsigned int num_blocks,
-               const types::global_dof_index block_size = 0,
+               const size_type block_size = 0,
                const bool fast = false);
 
   /**
@@ -305,8 +310,8 @@ public:
    * since they may be routed to
    * the wrong block.
    */
-  void reinit (const std::vector<types::global_dof_index> &N,
-               const bool                                 fast=false);
+  void reinit (const std::vector<size_type> &N,
+               const bool                    fast=false);
 
   /**
    * Reinitialize the BlockVector
@@ -470,7 +475,7 @@ public:
 
 template <typename Number>
 template <typename InputIterator>
-BlockVector<Number>::BlockVector (const std::vector<unsigned int> &n,
+BlockVector<Number>::BlockVector (const std::vector<size_type>    &n,
                                   const InputIterator              first,
                                   const InputIterator              end)
 {
@@ -479,7 +484,7 @@ BlockVector<Number>::BlockVector (const std::vector<unsigned int> &n,
   // copy elements soon
   reinit (n, true);
   InputIterator start = first;
-  for (unsigned int b=0; b<n.size(); ++b)
+  for (size_type b=0; b<n.size(); ++b)
     {
       InputIterator end = start;
       std::advance (end, static_cast<signed int>(n[b]));
@@ -543,7 +548,7 @@ template <typename Number>
 inline
 void BlockVector<Number>::compress (::dealii::VectorOperation::values operation)
 {
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     this->components[i].compress(operation);
 }
 
@@ -555,7 +560,7 @@ void BlockVector<Number>::scale (const value_type factor)
 
   Assert (numbers::is_finite(factor), ExcNumberNotFinite());
 
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     this->components[i] *= factor;
 }
 
index 690077e4c972eafaa887cc30c5836a8ddf949195..608fd7f4ec53f6d22ad1fa492d777913c72fb303 100644 (file)
@@ -23,7 +23,7 @@ DEAL_II_NAMESPACE_OPEN
 
 template <typename Number>
 BlockVector<Number>::BlockVector (const unsigned int n_blocks,
-                                  const types::global_dof_index block_size)
+                                  const size_type block_size)
 {
   reinit (n_blocks, block_size);
 }
@@ -31,7 +31,7 @@ BlockVector<Number>::BlockVector (const unsigned int n_blocks,
 
 
 template <typename Number>
-BlockVector<Number>::BlockVector (const std::vector<types::global_dof_index> &n)
+BlockVector<Number>::BlockVector (const std::vector<size_type> &n)
 {
   reinit (n, false);
 }
@@ -52,7 +52,7 @@ BlockVector<Number>::BlockVector (const BlockVector<Number> &v)
   this->components.resize (v.n_blocks());
   this->block_indices = v.block_indices;
 
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     this->components[i] = v.components[i];
 }
 
@@ -78,7 +78,7 @@ BlockVector<Number>::BlockVector (const TrilinosWrappers::BlockVector &v)
   this->block_indices = v.get_block_indices();
   this->components.resize(this->n_blocks());
 
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     this->components[i] = v.block(i);
 
   BaseClass::collect_sizes();
@@ -88,24 +88,24 @@ BlockVector<Number>::BlockVector (const TrilinosWrappers::BlockVector &v)
 
 
 template <typename Number>
-void BlockVector<Number>::reinit (const unsigned int            n_bl,
-                                  const types::global_dof_index bl_sz,
-                                  const bool                    fast)
+void BlockVector<Number>::reinit (const size_type  n_bl,
+                                  const szie_type  bl_sz,
+                                  const bool       fast)
 {
-  std::vector<types::global_dof_index> n(n_bl, bl_sz);
+  std::vector<size_type> n(n_bl, bl_sz);
   reinit(n, fast);
 }
 
 
 template <typename Number>
-void BlockVector<Number>::reinit (const std::vector<types::global_dof_index> &n,
-                                  const bool                                 fast)
+void BlockVector<Number>::reinit (const std::vector<size_type> &n,
+                                  const bool                    fast)
 {
   this->block_indices.reinit (n);
   if (this->components.size() != this->n_blocks())
     this->components.resize(this->n_blocks());
 
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     this->components[i].reinit(n[i], fast);
 }
 
@@ -119,7 +119,7 @@ void BlockVector<Number>::reinit (
   if (this->components.size() != this->n_blocks())
     this->components.resize(this->n_blocks());
 
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     this->components[i].reinit(n.block_size(i), fast);
 }
 
@@ -133,7 +133,7 @@ void BlockVector<Number>::reinit (const BlockVector<Number2> &v,
   if (this->components.size() != this->n_blocks())
     this->components.resize(this->n_blocks());
 
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     this->block(i).reinit(v.block(i), fast);
 }
 
@@ -161,7 +161,7 @@ void BlockVector<Number>::swap (BlockVector<Number> &v)
   Assert (this->n_blocks() == v.n_blocks(),
           ExcDimensionMismatch(this->n_blocks(), v.n_blocks()));
 
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     dealii::swap (this->components[i], v.components[i]);
   dealii::swap (this->block_indices, v.block_indices);
 }
@@ -174,7 +174,7 @@ void BlockVector<Number>::print (std::ostream       &out,
                                  const bool          scientific,
                                  const bool          across) const
 {
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     {
       if (across)
         out << 'C' << i << ':';
@@ -189,7 +189,7 @@ void BlockVector<Number>::print (std::ostream       &out,
 template <typename Number>
 void BlockVector<Number>::block_write (std::ostream &out) const
 {
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     this->components[i].block_write(out);
 }
 
@@ -198,7 +198,7 @@ void BlockVector<Number>::block_write (std::ostream &out) const
 template <typename Number>
 void BlockVector<Number>::block_read (std::istream &in)
 {
-  for (unsigned int i=0; i<this->n_blocks(); ++i)
+  for (size_type i=0; i<this->n_blocks(); ++i)
     this->components[i].block_read(in);
 }
 
index cc4c3b731c60c8a01df49bbf6489831cc8123c54..3c2f99ff5ac82633236668b7894116f6516f9144 100644 (file)
@@ -299,6 +299,11 @@ namespace internal
       typedef Iterator<BlockVectorType,!constness> InverseConstnessIterator;
 
     public:
+      /**
+       * Declare the type for container size.
+       */
+      typedef std::size_t size_type;
+
       /**
        * Type of the number this
        * iterator points
@@ -354,8 +359,8 @@ namespace internal
        * const or non-const
        * reference.
        */
-      Iterator (BlockVector                   &parent,
-                const types::global_dof_index global_index);
+      Iterator (BlockVector     &parent,
+                const size_type  global_index);
 
       /**
        * Copy constructor.
@@ -382,12 +387,12 @@ namespace internal
        * the respective member
        * variables.
        */
-      Iterator (BlockVector        &parent,
-                const types::global_dof_index  global_index,
-                const unsigned int             current_block,
-                const types::global_dof_index  index_within_block,
-                const types::global_dof_index  next_break_forward,
-                const types::global_dof_index  next_break_backward);
+      Iterator (BlockVector     &parent,
+                const size_type  global_index,
+                const size_type  current_block,
+                const size_type  index_within_block,
+                const size_type  next_break_forward,
+                const size_type  next_break_backward);
 
     public:
 
@@ -614,7 +619,7 @@ namespace internal
        * element to which we
        * presently point.
        */
-      types::global_dof_index     global_index;
+      size_type     global_index;
 
       /**
        * Current block and index
@@ -622,8 +627,8 @@ namespace internal
        * element presently pointed
        * to.
        */
-      unsigned int current_block;
-      types::global_dof_index index_within_block;
+      size_type current_block;
+      size_type index_within_block;
 
       /**
        * Indices of the global
@@ -637,8 +642,8 @@ namespace internal
        * efficient than always
        * asking the parent object.
        */
-      types::global_dof_index next_break_forward;
-      types::global_dof_index next_break_backward;
+      size_type next_break_forward;
+      size_type next_break_backward;
 
       /**
        * Move forward one element.
@@ -800,13 +805,13 @@ public:
    * Access to a single block.
    */
   BlockType &
-  block (const unsigned int i);
+  block (const size_type i);
 
   /**
    * Read-only access to a single block.
    */
   const BlockType &
-  block (const unsigned int i) const;
+  block (const size_type i) const;
 
   /**
    * Return a reference on the
@@ -831,7 +836,7 @@ public:
    * is the sum of the dimensions of all
    * components.
    */
-  types::global_dof_index size () const;
+  size_type size () const;
 
   /**
    * Return an iterator pointing to
@@ -862,20 +867,20 @@ public:
   /**
    * Access components, returns U(i).
    */
-  value_type operator() (const types::global_dof_index i) const;
+  value_type operator() (const size_type i) const;
 
   /**
    * Access components, returns U(i)
    * as a writeable reference.
    */
-  reference operator() (const types::global_dof_index i);
+  reference operator() (const size_type i);
 
   /**
    * Access components, returns U(i).
    *
    * Exactly the same as operator().
    */
-  value_type operator[] (const types::global_dof_index i) const;
+  value_type operator[] (const size_type i) const;
 
   /**
    * Access components, returns U(i)
@@ -883,7 +888,7 @@ public:
    *
    * Exactly the same as operator().
    */
-  reference operator[] (const types::global_dof_index i);
+  reference operator[] (const size_type i);
 
   /**
    * Copy operator: fill all components of
@@ -965,7 +970,7 @@ public:
    * in the local range of this processor.
    * Asks the corresponding block.
    */
-  bool in_local_range (const types::global_dof_index global_index) const;
+  bool in_local_range (const size_type global_index) const;
 
   /**
    * Return whether the vector contains only
@@ -1011,8 +1016,8 @@ public:
    * indices.
    */
   template <typename Number>
-  void add (const std::vector<types::global_dof_index> &indices,
-            const std::vector<Number>                  &values);
+  void add (const std::vector<size_type> &indices,
+            const std::vector<Number>    &values);
 
   /**
    * This is a second collective
@@ -1022,8 +1027,8 @@ public:
    * values.
    */
   template <typename Number>
-  void add (const std::vector<types::global_dof_index> &indices,
-            const Vector<Number>                       &values);
+  void add (const std::vector<size_type> &indices,
+            const Vector<Number>         &values);
 
   /**
    * Take an address where
@@ -1035,9 +1040,9 @@ public:
    * functions above.
    */
   template <typename Number>
-  void add (const unsigned int            n_elements,
-            const types::global_dof_index *indices,
-            const Number                  *values);
+  void add (const size_type  n_elements,
+            const size_type *indices,
+            const Number    *values);
 
   /**
    * $U(0-DIM)+=s$.  Addition of <tt>s</tt>
@@ -1232,11 +1237,11 @@ namespace internal
     inline
     Iterator<BlockVectorType,constness>::
     Iterator (BlockVector        &parent,
-              const types::global_dof_index  global_index,
-              const unsigned int             current_block,
-              const types::global_dof_index  index_within_block,
-              const types::global_dof_index  next_break_forward,
-              const types::global_dof_index  next_break_backward)
+              const size_type  global_index,
+              const size_type  current_block,
+              const size_type  index_within_block,
+              const size_type  next_break_forward,
+              const size_type  next_break_backward)
       :
       parent (&parent),
       global_index (global_index),
@@ -1640,8 +1645,8 @@ namespace internal
 
     template <class BlockVectorType, bool constness>
     Iterator<BlockVectorType,constness>::
-    Iterator (BlockVector                   &parent,
-              const types::global_dof_index global_index)
+    Iterator (BlockVector    &parent,
+              const size_type global_index)
       :
       parent (&parent),
       global_index (global_index)
@@ -1654,7 +1659,7 @@ namespace internal
       // past-the-end
       if (global_index < parent.size())
         {
-          const std::pair<unsigned int, types::global_dof_index>
+          const std::pair<size_type, size_type>
           indices = parent.block_indices.global_to_local(global_index);
           current_block      = indices.first;
           index_within_block = indices.second;
@@ -1762,7 +1767,7 @@ BlockVectorBase<VectorType>::BlockVectorBase ()
 
 template <class VectorType>
 inline
-types::global_dof_index
+size_type
 BlockVectorBase<VectorType>::size () const
 {
   return block_indices.total_size();
@@ -1772,7 +1777,7 @@ BlockVectorBase<VectorType>::size () const
 
 template <class VectorType>
 inline
-unsigned int
+size_type 
 BlockVectorBase<VectorType>::n_blocks () const
 {
   return block_indices.size();
@@ -1782,7 +1787,7 @@ BlockVectorBase<VectorType>::n_blocks () const
 template <class VectorType>
 inline
 typename BlockVectorBase<VectorType>::BlockType &
-BlockVectorBase<VectorType>::block (const unsigned int i)
+BlockVectorBase<VectorType>::block (const size_type i)
 {
   Assert(i<n_blocks(), ExcIndexRange(i,0,n_blocks()));
 
@@ -1794,7 +1799,7 @@ BlockVectorBase<VectorType>::block (const unsigned int i)
 template <class VectorType>
 inline
 const typename BlockVectorBase<VectorType>::BlockType &
-BlockVectorBase<VectorType>::block (const unsigned int i) const
+BlockVectorBase<VectorType>::block (const size_type i) const
 {
   Assert(i<n_blocks(), ExcIndexRange(i,0,n_blocks()));
 
@@ -1817,9 +1822,9 @@ inline
 void
 BlockVectorBase<VectorType>::collect_sizes ()
 {
-  std::vector<types::global_dof_index> sizes (n_blocks());
+  std::vector<size_type> sizes (n_blocks());
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     sizes[i] = block(i).size();
 
   block_indices.reinit(sizes);
@@ -1832,7 +1837,7 @@ inline
 void
 BlockVectorBase<VectorType>::compress (::dealii::VectorOperation::values operation)
 {
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     block(i).compress (operation);
 }
 
@@ -1890,9 +1895,9 @@ template <class VectorType>
 inline
 bool
 BlockVectorBase<VectorType>::in_local_range
-(const types::global_dof_index global_index) const
+(const size_type global_index) const
 {
-  const std::pair<unsigned int,unsigned int> local_index
+  const std::pair<size_type,size_type> local_index
     = block_indices.global_to_local (global_index);
 
   return components[local_index.first].in_local_range (global_index);
@@ -1903,7 +1908,7 @@ template <class VectorType>
 bool
 BlockVectorBase<VectorType>::all_zero () const
 {
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     if (components[i].all_zero() == false)
       return false;
 
@@ -1916,7 +1921,7 @@ template <class VectorType>
 bool
 BlockVectorBase<VectorType>::is_non_negative () const
 {
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     if (components[i].is_non_negative() == false)
       return false;
 
@@ -1934,7 +1939,7 @@ operator * (const BlockVectorBase<VectorType> &v) const
           ExcDimensionMismatch(n_blocks(), v.n_blocks()));
 
   value_type sum = 0.;
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     sum += components[i]*v.components[i];
 
   return sum;
@@ -1946,7 +1951,7 @@ typename BlockVectorBase<VectorType>::real_type
 BlockVectorBase<VectorType>::norm_sqr () const
 {
   real_type sum = 0.;
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     sum += components[i].norm_sqr();
 
   return sum;
@@ -1959,7 +1964,7 @@ typename BlockVectorBase<VectorType>::value_type
 BlockVectorBase<VectorType>::mean_value () const
 {
   value_type sum = 0.;
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     sum += components[i].mean_value() * components[i].size();
 
   return sum/size();
@@ -1972,7 +1977,7 @@ typename BlockVectorBase<VectorType>::real_type
 BlockVectorBase<VectorType>::l1_norm () const
 {
   real_type sum = 0.;
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     sum += components[i].l1_norm();
 
   return sum;
@@ -1994,7 +1999,7 @@ typename BlockVectorBase<VectorType>::real_type
 BlockVectorBase<VectorType>::linfty_norm () const
 {
   real_type sum = 0.;
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       value_type newval = components[i].linfty_norm();
       if (sum<newval)
@@ -2022,7 +2027,7 @@ BlockVectorBase<VectorType>::operator -= (const BlockVectorBase<VectorType> &v)
   Assert (n_blocks() == v.n_blocks(),
           ExcDimensionMismatch(n_blocks(), v.n_blocks()));
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       components[i] -= v.components[i];
     }
@@ -2035,8 +2040,8 @@ template <class VectorType>
 template <typename Number>
 inline
 void
-BlockVectorBase<VectorType>::add (const std::vector<types::global_dof_index> &indices,
-                                  const std::vector<Number>                  &values)
+BlockVectorBase<VectorType>::add (const std::vector<size_type> &indices,
+                                  const std::vector<Number>    &values)
 {
   Assert (indices.size() == values.size(),
           ExcDimensionMismatch(indices.size(), values.size()));
@@ -2049,13 +2054,13 @@ template <class VectorType>
 template <typename Number>
 inline
 void
-BlockVectorBase<VectorType>::add (const std::vector<types::global_dof_index> &indices,
-                                  const Vector<Number>                       &values)
+BlockVectorBase<VectorType>::add (const std::vector<size_type> &indices,
+                                  const Vector<Number>         &values)
 {
   Assert (indices.size() == values.size(),
           ExcDimensionMismatch(indices.size(), values.size()));
-  const unsigned int n_indices = indices.size();
-  for (unsigned int i=0; i<n_indices; ++i)
+  const size_type n_indices = indices.size();
+  for (size_type i=0; i<n_indices; ++i)
     (*this)(indices[i]) += values(i);
 }
 
@@ -2065,11 +2070,11 @@ template <class VectorType>
 template <typename Number>
 inline
 void
-BlockVectorBase<VectorType>::add (const unsigned int            n_indices,
-                                  const types::global_dof_index *indices,
-                                  const Number                  *values)
+BlockVectorBase<VectorType>::add (const size_type  n_indices,
+                                  const size_type *indices,
+                                  const Number    *values)
 {
-  for (unsigned int i=0; i<n_indices; ++i)
+  for (size_type i=0; i<n_indices; ++i)
     (*this)(indices[i]) += values[i];
 }
 
@@ -2080,7 +2085,7 @@ void BlockVectorBase<VectorType>::add (const value_type a)
 {
   Assert (numbers::is_finite(a), ExcNumberNotFinite());
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       components[i].add(a);
     }
@@ -2094,7 +2099,7 @@ void BlockVectorBase<VectorType>::add (const BlockVectorBase<VectorType> &v)
   Assert (n_blocks() == v.n_blocks(),
           ExcDimensionMismatch(n_blocks(), v.n_blocks()));
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       components[i].add(v.components[i]);
     }
@@ -2112,7 +2117,7 @@ void BlockVectorBase<VectorType>::add (const value_type a,
   Assert (n_blocks() == v.n_blocks(),
           ExcDimensionMismatch(n_blocks(), v.n_blocks()));
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       components[i].add(a, v.components[i]);
     }
@@ -2136,7 +2141,7 @@ void BlockVectorBase<VectorType>::add (const value_type a,
           ExcDimensionMismatch(n_blocks(), w.n_blocks()));
 
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       components[i].add(a, v.components[i], b, w.components[i]);
     }
@@ -2154,7 +2159,7 @@ void BlockVectorBase<VectorType>::sadd (const value_type x,
   Assert (n_blocks() == v.n_blocks(),
           ExcDimensionMismatch(n_blocks(), v.n_blocks()));
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       components[i].sadd(x, v.components[i]);
     }
@@ -2173,7 +2178,7 @@ void BlockVectorBase<VectorType>::sadd (const value_type x, const value_type a,
   Assert (n_blocks() == v.n_blocks(),
           ExcDimensionMismatch(n_blocks(), v.n_blocks()));
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       components[i].sadd(x, a, v.components[i]);
     }
@@ -2197,7 +2202,7 @@ void BlockVectorBase<VectorType>::sadd (const value_type x, const value_type a,
   Assert (n_blocks() == w.n_blocks(),
           ExcDimensionMismatch(n_blocks(), w.n_blocks()));
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       components[i].sadd(x, a, v.components[i], b, w.components[i]);
     }
@@ -2226,7 +2231,7 @@ void BlockVectorBase<VectorType>::sadd (const value_type x, const value_type a,
   Assert (n_blocks() == y.n_blocks(),
           ExcDimensionMismatch(n_blocks(), y.n_blocks()));
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       components[i].sadd(x, a, v.components[i],
                          b, w.components[i], c, y.components[i]);
@@ -2241,7 +2246,7 @@ void BlockVectorBase<VectorType>::scale (const BlockVector2 &v)
 {
   Assert (n_blocks() == v.n_blocks(),
           ExcDimensionMismatch(n_blocks(), v.n_blocks()));
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     components[i].scale(v.block(i));
 }
 
@@ -2262,7 +2267,7 @@ void BlockVectorBase<VectorType>::equ (const value_type a,
   Assert (n_blocks() == w.n_blocks(),
           ExcDimensionMismatch(n_blocks(), w.n_blocks()));
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     {
       components[i].equ( a, v.components[i], b, w.components[i]);
     }
@@ -2275,7 +2280,7 @@ std::size_t
 BlockVectorBase<VectorType>::memory_consumption () const
 {
   std::size_t mem = sizeof(this->n_blocks());
-  for (unsigned int i=0; i<this->components.size(); ++i)
+  for (size_type i=0; i<this->components.size(); ++i)
     mem += MemoryConsumption::memory_consumption (this->components[i]);
   mem += MemoryConsumption::memory_consumption (this->block_indices);
   return mem;
@@ -2294,7 +2299,7 @@ void BlockVectorBase<VectorType>::equ (const value_type    a,
   Assert (n_blocks() == v.n_blocks(),
           ExcDimensionMismatch(n_blocks(), v.n_blocks()));
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     components[i].equ( a, v.components[i]);
 }
 
@@ -2303,7 +2308,7 @@ void BlockVectorBase<VectorType>::equ (const value_type    a,
 template <class VectorType>
 void BlockVectorBase<VectorType>::update_ghost_values () const
 {
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     block(i).update_ghost_values ();
 }
 
@@ -2316,7 +2321,7 @@ BlockVectorBase<VectorType>::operator = (const value_type s)
 
   Assert (numbers::is_finite(s), ExcNumberNotFinite());
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     components[i] = s;
 
   return *this;
@@ -2329,7 +2334,7 @@ BlockVectorBase<VectorType>::operator = (const BlockVectorBase<VectorType> &v)
 {
   AssertDimension(n_blocks(), v.n_blocks());
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     components[i] = v.components[i];
 
   return *this;
@@ -2343,7 +2348,7 @@ BlockVectorBase<VectorType>::operator = (const BlockVectorBase<VectorType2> &v)
 {
   AssertDimension(n_blocks(), v.n_blocks());
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     components[i] = v.components[i];
 
   return *this;
@@ -2358,9 +2363,9 @@ BlockVectorBase<VectorType>::operator = (const VectorType &v)
   Assert (size() == v.size(),
           ExcDimensionMismatch(size(), v.size()));
 
-  unsigned int index_v = 0;
-  for (unsigned int b=0; b<n_blocks(); ++b)
-    for (unsigned int i=0; i<block(b).size(); ++i, ++index_v)
+  size_type index_v = 0;
+  for (size_type b=0; b<n_blocks(); ++b)
+    for (size_type i=0; i<block(b).size(); ++i, ++index_v)
       block(b)(i) = v(index_v);
 
   return *this;
@@ -2377,7 +2382,7 @@ operator == (const BlockVectorBase<VectorType2> &v) const
 {
   Assert (block_indices == v.block_indices, ExcDifferentBlockIndices());
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     if ( ! (components[i] == v.components[i]))
       return false;
 
@@ -2394,7 +2399,7 @@ BlockVectorBase<VectorType>::operator *= (const value_type factor)
 
   Assert (numbers::is_finite(factor), ExcNumberNotFinite());
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     components[i] *= factor;
 
   return *this;
@@ -2411,7 +2416,7 @@ BlockVectorBase<VectorType>::operator /= (const value_type factor)
   Assert (numbers::is_finite(factor), ExcNumberNotFinite());
   Assert (factor > 0., ExcDivideByZero() );
 
-  for (unsigned int i=0; i<n_blocks(); ++i)
+  for (size_type i=0; i<n_blocks(); ++i)
     components[i] /= factor;
 
   return *this;
@@ -2421,9 +2426,9 @@ BlockVectorBase<VectorType>::operator /= (const value_type factor)
 template <class VectorType>
 inline
 typename BlockVectorBase<VectorType>::value_type
-BlockVectorBase<VectorType>::operator() (const types::global_dof_index i) const
+BlockVectorBase<VectorType>::operator() (const size_type i) const
 {
-  const std::pair<unsigned int,types::global_dof_index> local_index
+  const std::pair<size_type,size_type> local_index
     = block_indices.global_to_local (i);
   return components[local_index.first](local_index.second);
 }
@@ -2433,9 +2438,9 @@ BlockVectorBase<VectorType>::operator() (const types::global_dof_index i) const
 template <class VectorType>
 inline
 typename BlockVectorBase<VectorType>::reference
-BlockVectorBase<VectorType>::operator() (const types::global_dof_index i)
+BlockVectorBase<VectorType>::operator() (const size_type i)
 {
-  const std::pair<unsigned int,types::global_dof_index> local_index
+  const std::pair<size_type,size_type> local_index
     = block_indices.global_to_local (i);
   return components[local_index.first](local_index.second);
 }
@@ -2445,7 +2450,7 @@ BlockVectorBase<VectorType>::operator() (const types::global_dof_index i)
 template <class VectorType>
 inline
 typename BlockVectorBase<VectorType>::value_type
-BlockVectorBase<VectorType>::operator[] (const types::global_dof_index i) const
+BlockVectorBase<VectorType>::operator[] (const size_type i) const
 {
   return operator()(i);
 }
@@ -2455,7 +2460,7 @@ BlockVectorBase<VectorType>::operator[] (const types::global_dof_index i) const
 template <class VectorType>
 inline
 typename BlockVectorBase<VectorType>::reference
-BlockVectorBase<VectorType>::operator[] (const types::global_dof_index i)
+BlockVectorBase<VectorType>::operator[] (const size_type i)
 {
   return operator()(i);
 }
index aac418b41e9e68f33cf2a1907256917c56b74ca5..44079dbba14af4ba77305bc05b670b8e746d56fe 100644 (file)
@@ -49,6 +49,11 @@ template <typename number>
 class ChunkSparseMatrix : public virtual Subscriptor
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std::size_t size_type;
+
   /**
    * Type of matrix entries. In analogy to
    * the STL container classes.
@@ -290,7 +295,7 @@ public:
    * matrix is of dimension
    * $m \times n$.
    */
-  types::global_dof_index m () const;
+  size_type m () const;
 
   /**
    * Return the dimension of the
@@ -298,7 +303,7 @@ public:
    * matrix is of dimension
    * $m \times n$.
    */
-  types::global_dof_index n () const;
+  size_type n () const;
 
   /**
    * Return the number of nonzero
@@ -309,7 +314,7 @@ public:
    * the entries should happen to
    * be zero, it is counted anyway.
    */
-  unsigned int n_nonzero_elements () const;
+  size_type n_nonzero_elements () const;
 
   /**
    * Return the number of actually
@@ -323,7 +328,7 @@ public:
    * sparsity pattern but only the
    * ones that are nonzero.
    */
-  unsigned int n_actually_nonzero_elements () const;
+  size_type n_actually_nonzero_elements () const;
 
   /**
    * Return a (constant) reference
@@ -361,8 +366,8 @@ public:
    * is allowed to store zero
    * values in non-existent fields.
    */
-  void set (const types::global_dof_index i,
-            const types::global_dof_index j,
+  void set (const size_type i,
+            const size_type j,
             const number value);
 
   /**
@@ -374,8 +379,8 @@ public:
    * is allowed to store zero
    * values in non-existent fields.
    */
-  void add (const types::global_dof_index i,
-            const types::global_dof_index j,
+  void add (const size_type i,
+            const size_type j,
             const number value);
 
   /**
@@ -396,12 +401,12 @@ public:
    * into the matrix.
    */
   template <typename number2>
-  void add (const unsigned int  row,
-            const unsigned int  n_cols,
-            const unsigned int *col_indices,
-            const number2      *values,
-            const bool          elide_zero_values = true,
-            const bool          col_indices_are_sorted = false);
+  void add (const size_type  row,
+            const size_type  n_cols,
+            const size_type *col_indices,
+            const number2   *values,
+            const bool       elide_zero_values = true,
+            const bool       col_indices_are_sorted = false);
 
   /**
    * Multiply the entire matrix by a
@@ -574,8 +579,8 @@ public:
    * tailored better to a sparse matrix
    * structure.
    */
-  number operator () (const types::global_dof_index i,
-                      const types::global_dof_index j) const;
+  number operator () (const size_type i,
+                      const size_type j) const;
 
   /**
    * This function is mostly like
@@ -601,8 +606,8 @@ public:
    * tailored better to a sparse matrix
    * structure.
    */
-  number el (const types::global_dof_index i,
-             const types::global_dof_index j) const;
+  number el (const size_type i,
+             const size_type j) const;
 
   /**
    * Return the main diagonal
@@ -620,14 +625,14 @@ public:
    * involve searching for the
    * right column number.
    */
-  number diag_element (const types::global_dof_index i) const;
+  number diag_element (const size_type i) const;
 
   /**
    * Same as above, but return a
    * writeable reference. You're
    * sure you know what you do?
    */
-  number &diag_element (const types::global_dof_index i);
+  number &diag_element (const size_type i);
 
 //@}
   /**
@@ -940,8 +945,8 @@ public:
    */
   template <typename somenumber>
   void PSOR (Vector<somenumber> &v,
-             const std::vector<unsigned int> &permutation,
-             const std::vector<unsigned int> &inverse_permutation,
+             const std::vector<size_type> &permutation,
+             const std::vector<size_type> &inverse_permutation,
              const number        om = 1.) const;
 
   /**
@@ -966,8 +971,8 @@ public:
    */
   template <typename somenumber>
   void TPSOR (Vector<somenumber> &v,
-              const std::vector<unsigned int> &permutation,
-              const std::vector<unsigned int> &inverse_permutation,
+              const std::vector<size_type> &permutation,
+              const std::vector<size_type> &inverse_permutation,
               const number        om = 1.) const;
 
   /**
@@ -1202,14 +1207,14 @@ private:
    * object, using the reinit()
    * function.
    */
-  unsigned int max_len;
+  size_type max_len;
 
   /**
    * Return the location of entry
    * $(i,j)$ within the val array.
    */
-  unsigned int compute_location (const types::global_dof_index i,
-                                 const types::global_dof_index j) const;
+  size_type compute_location (const size_type i,
+                              const size_type j) const;
 
   // make all other sparse matrices
   // friends
@@ -1225,7 +1230,7 @@ private:
 
 template <typename number>
 inline
-types::global_dof_index ChunkSparseMatrix<number>::m () const
+size_type ChunkSparseMatrix<number>::m () const
 {
   Assert (cols != 0, ExcNotInitialized());
   return cols->rows;
@@ -1234,7 +1239,7 @@ types::global_dof_index ChunkSparseMatrix<number>::m () const
 
 template <typename number>
 inline
-types::global_dof_index ChunkSparseMatrix<number>::n () const
+size_type ChunkSparseMatrix<number>::n () const
 {
   Assert (cols != 0, ExcNotInitialized());
   return cols->cols;
@@ -1244,12 +1249,12 @@ types::global_dof_index ChunkSparseMatrix<number>::n () const
 
 template <typename number>
 inline
-unsigned int
-ChunkSparseMatrix<number>::compute_location (const types::global_dof_index i,
-                                             const types::global_dof_index j) const
+size_type 
+ChunkSparseMatrix<number>::compute_location (const size_type i,
+                                             const size_type j) const
 {
-  const unsigned int chunk_size = cols->get_chunk_size();
-  const unsigned int chunk_index
+  const size_type chunk_size = cols->get_chunk_size();
+  const size_type chunk_index
     = cols->sparsity_pattern(i/chunk_size, j/chunk_size);
 
   if (chunk_index == ChunkSparsityPattern::invalid_entry)
@@ -1267,8 +1272,8 @@ ChunkSparseMatrix<number>::compute_location (const types::global_dof_index i,
 
 template <typename number>
 inline
-void ChunkSparseMatrix<number>::set (const types::global_dof_index i,
-                                     const types::global_dof_index j,
+void ChunkSparseMatrix<number>::set (const size_type i,
+                                     const size_type j,
                                      const number value)
 {
 
@@ -1279,7 +1284,7 @@ void ChunkSparseMatrix<number>::set (const types::global_dof_index i,
   // the matrix that are not part of
   // the sparsity pattern, if the
   // value to which we set it is zero
-  const unsigned int index = compute_location(i,j);
+  const size_type index = compute_location(i,j);
   Assert ((index != SparsityPattern::invalid_entry) ||
           (value == 0.),
           ExcInvalidIndex(i,j));
@@ -1292,8 +1297,8 @@ void ChunkSparseMatrix<number>::set (const types::global_dof_index i,
 
 template <typename number>
 inline
-void ChunkSparseMatrix<number>::add (const types::global_dof_index i,
-                                     const types::global_dof_index j,
+void ChunkSparseMatrix<number>::add (const size_type i,
+                                     const size_type j,
                                      const number value)
 {
 
@@ -1303,7 +1308,7 @@ void ChunkSparseMatrix<number>::add (const types::global_dof_index i,
 
   if (value != 0.)
     {
-      const unsigned int index = compute_location(i,j);
+      const size_type index = compute_location(i,j);
       Assert ((index != ChunkSparsityPattern::invalid_entry),
               ExcInvalidIndex(i,j));
 
@@ -1316,15 +1321,15 @@ void ChunkSparseMatrix<number>::add (const types::global_dof_index i,
 template <typename number>
 template <typename number2>
 inline
-void ChunkSparseMatrix<number>::add (const unsigned int row,
-                                     const unsigned int n_cols,
-                                     const unsigned int *col_indices,
-                                     const number2      *values,
-                                     const bool          /*elide_zero_values*/,
-                                     const bool          /*col_indices_are_sorted*/)
+void ChunkSparseMatrix<number>::add (const size_type  row,
+                                     const size_type  n_cols,
+                                     const size_type *col_indices,
+                                     const number2   *values,
+                                     const bool       /*elide_zero_values*/,
+                                     const bool       /*col_indices_are_sorted*/)
 {
   // TODO: could be done more efficiently...
-  for (unsigned int col=0; col<n_cols; ++col)
+  for (size_type col=0; col<n_cols; ++col)
     add(row, col_indices[col], static_cast<number>(values[col]));
 }
 
@@ -1338,7 +1343,7 @@ ChunkSparseMatrix<number>::operator *= (const number factor)
   Assert (cols != 0, ExcNotInitialized());
   Assert (val != 0, ExcNotInitialized());
 
-  const unsigned int chunk_size = cols->get_chunk_size();
+  const size_type chunk_size = cols->get_chunk_size();
 
   // multiply all elements of the matrix with
   // the given factor. this includes the
@@ -1372,7 +1377,7 @@ ChunkSparseMatrix<number>::operator /= (const number factor)
 
   const number factor_inv = 1. / factor;
 
-  const unsigned int chunk_size = cols->get_chunk_size();
+  const size_type chunk_size = cols->get_chunk_size();
 
   // multiply all elements of the matrix with
   // the given factor. this includes the
@@ -1398,8 +1403,8 @@ ChunkSparseMatrix<number>::operator /= (const number factor)
 
 template <typename number>
 inline
-number ChunkSparseMatrix<number>::operator () (const types::global_dof_index i,
-                                               const types::global_dof_index j) const
+number ChunkSparseMatrix<number>::operator () (const size_type i,
+                                               const size_type j) const
 {
   Assert (cols != 0, ExcNotInitialized());
   AssertThrow (compute_location(i,j) != SparsityPattern::invalid_entry,
@@ -1411,11 +1416,11 @@ number ChunkSparseMatrix<number>::operator () (const types::global_dof_index i,
 
 template <typename number>
 inline
-number ChunkSparseMatrix<number>::el (const types::global_dof_index i,
-                                      const types::global_dof_index j) const
+number ChunkSparseMatrix<number>::el (const size_type i,
+                                      const size_type j) const
 {
   Assert (cols != 0, ExcNotInitialized());
-  const unsigned int index = compute_location(i,j);
+  const size_type index = compute_location(i,j);
 
   if (index != ChunkSparsityPattern::invalid_entry)
     return val[index];
@@ -1427,7 +1432,7 @@ number ChunkSparseMatrix<number>::el (const types::global_dof_index i,
 
 template <typename number>
 inline
-number ChunkSparseMatrix<number>::diag_element (const types::global_dof_index i) const
+number ChunkSparseMatrix<number>::diag_element (const size_type i) const
 {
   Assert (cols != 0, ExcNotInitialized());
   Assert (m() == n(),  ExcNotQuadratic());
@@ -1436,7 +1441,7 @@ number ChunkSparseMatrix<number>::diag_element (const types::global_dof_index i)
   // Use that the first element in each row
   // of a quadratic matrix is the main
   // diagonal of the chunk sparsity pattern
-  const unsigned int chunk_size = cols->get_chunk_size();
+  const size_type chunk_size = cols->get_chunk_size();
   return val[cols->sparsity_pattern.rowstart[i/chunk_size]
              *
              chunk_size * chunk_size
@@ -1450,7 +1455,7 @@ number ChunkSparseMatrix<number>::diag_element (const types::global_dof_index i)
 
 template <typename number>
 inline
-number &ChunkSparseMatrix<number>::diag_element (const types::global_dof_index i)
+number &ChunkSparseMatrix<number>::diag_element (const size_type i)
 {
   Assert (cols != 0, ExcNotInitialized());
   Assert (m() == n(),  ExcNotQuadratic());
@@ -1459,7 +1464,7 @@ number &ChunkSparseMatrix<number>::diag_element (const types::global_dof_index i
   // Use that the first element in each row
   // of a quadratic matrix is the main
   // diagonal of the chunk sparsity pattern
-  const unsigned int chunk_size = cols->get_chunk_size();
+  const size_type chunk_size = cols->get_chunk_size();
   return val[cols->sparsity_pattern.rowstart[i/chunk_size]
              *
              chunk_size * chunk_size
@@ -1477,14 +1482,14 @@ void
 ChunkSparseMatrix<number>::copy_from (const ForwardIterator begin,
                                       const ForwardIterator end)
 {
-  Assert (static_cast<unsigned int>(std::distance (begin, end)) == m(),
+  Assert (static_cast<size_type >(std::distance (begin, end)) == m(),
           ExcIteratorRange (std::distance (begin, end), m()));
 
   // for use in the inner loop, we
   // define a typedef to the type of
   // the inner iterators
   typedef typename std::iterator_traits<ForwardIterator>::value_type::const_iterator inner_iterator;
-  unsigned int row=0;
+  size_type row=0;
   for (ForwardIterator i=begin; i!=end; ++i, ++row)
     {
       const inner_iterator end_of_row = i->end();
index 713506d6199121622ca465a04e5ef5dc7255ee23..913610e275e3c5cae4c2ce243a50ffc68ff3a08c 100644 (file)
@@ -54,20 +54,20 @@ namespace internal
              typename DstIterator>
     inline
     void
-    chunk_vmult_add (const unsigned int   chunk_size,
+    chunk_vmult_add (const size_type      chunk_size,
                      const MatrixIterator matrix,
                      const SrcIterator    src,
                      DstIterator          dst)
     {
       MatrixIterator matrix_row = matrix;
 
-      for (unsigned int i=0; i<chunk_size;
+      for (size_type i=0; i<chunk_size;
            ++i,  matrix_row += chunk_size)
         {
           typename std::iterator_traits<DstIterator>::value_type
           sum = 0;
 
-          for (unsigned int j=0; j<chunk_size; ++j)
+          for (size_type j=0; j<chunk_size; ++j)
             sum += matrix_row[j] * src[j];
 
           dst[i] += sum;
@@ -86,20 +86,20 @@ namespace internal
              typename DstIterator>
     inline
     void
-    chunk_vmult_subtract (const unsigned int   chunk_size,
+    chunk_vmult_subtract (const size_type chunk_size,
                           const MatrixIterator matrix,
                           const SrcIterator    src,
                           DstIterator          dst)
     {
       MatrixIterator matrix_row = matrix;
 
-      for (unsigned int i=0; i<chunk_size;
+      for (size_type i=0; i<chunk_size;
            ++i,  matrix_row += chunk_size)
         {
           typename std::iterator_traits<DstIterator>::value_type
           sum = 0;
 
-          for (unsigned int j=0; j<chunk_size; ++j)
+          for (size_type j=0; j<chunk_size; ++j)
             sum += matrix_row[j] * src[j];
 
           dst[i] -= sum;
@@ -120,17 +120,17 @@ namespace internal
              typename DstIterator>
     inline
     void
-    chunk_Tvmult_add (const unsigned int   chunk_size,
+    chunk_Tvmult_add (const size_type      chunk_size,
                       const MatrixIterator matrix,
                       const SrcIterator    src,
                       DstIterator          dst)
     {
-      for (unsigned int i=0; i<chunk_size; ++i)
+      for (size_type i=0; i<chunk_size; ++i)
         {
           typename std::iterator_traits<DstIterator>::value_type
           sum = 0;
 
-          for (unsigned int j=0; j<chunk_size; ++j)
+          for (size_type j=0; j<chunk_size; ++j)
             sum += matrix[j*chunk_size+i] * src[j];
 
           dst[i] += sum;
@@ -149,7 +149,7 @@ namespace internal
              typename SrcIterator2>
     inline
     result_type
-    chunk_matrix_scalar_product (const unsigned int   chunk_size,
+    chunk_matrix_scalar_product (const size_type      chunk_size,
                                  const MatrixIterator matrix,
                                  const SrcIterator1   u,
                                  const SrcIterator2   v)
@@ -158,13 +158,13 @@ namespace internal
 
       MatrixIterator matrix_row = matrix;
 
-      for (unsigned int i=0; i<chunk_size;
+      for (size_type i=0; i<chunk_size;
            ++i,  matrix_row += chunk_size)
         {
           typename std::iterator_traits<SrcIterator2>::value_type
           sum = 0;
 
-          for (unsigned int j=0; j<chunk_size; ++j)
+          for (size_type j=0; j<chunk_size; ++j)
             sum += matrix_row[j] * v[j];
 
           result += u[i] * sum;
@@ -239,7 +239,7 @@ ChunkSparseMatrix<number>::ChunkSparseMatrix (const ChunkSparsityPattern &c,
   Assert (c.n_cols() == id.n(), ExcDimensionMismatch (c.n_cols(), id.n()));
 
   reinit (c);
-  for (unsigned int i=0; i<n(); ++i)
+  for (size_type i=0; i<n(); ++i)
     this->set(i,i,1.);
 }
 
@@ -268,7 +268,7 @@ ChunkSparseMatrix<number>::operator = (const double d)
 
   if (val)
     {
-      const unsigned int chunk_size = cols->get_chunk_size();
+      const size_type chunk_size = cols->get_chunk_size();
       std::fill_n (val,
                    cols->sparsity_pattern.n_nonzero_elements() *
                    chunk_size * chunk_size,
@@ -290,7 +290,7 @@ ChunkSparseMatrix<number>::operator= (const IdentityMatrix &id)
           ExcDimensionMismatch (cols->n_cols(), id.n()));
 
   *this = 0;
-  for (unsigned int i=0; i<n(); ++i)
+  for (size_type i=0; i<n(); ++i)
     this->set(i,i,1.);
 
   return *this;
@@ -317,8 +317,8 @@ ChunkSparseMatrix<number>::reinit (const ChunkSparsityPattern &sparsity)
   // enough so that we can store full
   // chunks. this entails some padding
   // elements
-  const unsigned int chunk_size = cols->get_chunk_size();
-  const unsigned int N = cols->sparsity_pattern.n_nonzero_elements() *
+  const size_type chunk_size = cols->get_chunk_size();
+  const size_type N = cols->sparsity_pattern.n_nonzero_elements() *
                          chunk_size * chunk_size;
   if (N > max_len || max_len == 0)
     {
@@ -363,7 +363,7 @@ ChunkSparseMatrix<number>::empty () const
 
 
 template <typename number>
-unsigned int
+size_type 
 ChunkSparseMatrix<number>::n_nonzero_elements () const
 {
   Assert (cols != 0, ExcNotInitialized());
@@ -373,7 +373,7 @@ ChunkSparseMatrix<number>::n_nonzero_elements () const
 
 
 template <typename number>
-unsigned int
+size_type 
 ChunkSparseMatrix<number>::n_actually_nonzero_elements () const
 {
   Assert (cols != 0, ExcNotInitialized());
@@ -383,7 +383,7 @@ ChunkSparseMatrix<number>::n_actually_nonzero_elements () const
   // the matrix. since we have the invariant
   // that padding elements are zero, nothing
   // bad can happen here
-  const unsigned int chunk_size = cols->get_chunk_size();
+  const size_type chunk_size = cols->get_chunk_size();
   return std::count_if(&val[0],
                        &val[cols->sparsity_pattern.n_nonzero_elements () *
                             chunk_size * chunk_size],
@@ -415,7 +415,7 @@ ChunkSparseMatrix<number>::copy_from (const ChunkSparseMatrix<somenumber> &matri
 
   // copy everything, including padding
   // elements
-  const unsigned int chunk_size = cols->get_chunk_size();
+  const size_type chunk_size = cols->get_chunk_size();
   std::copy (&matrix.val[0],
              &matrix.val[cols->sparsity_pattern.n_nonzero_elements()
                          * chunk_size * chunk_size],
@@ -435,8 +435,8 @@ ChunkSparseMatrix<number>::copy_from (const FullMatrix<somenumber> &matrix)
   *this = 0;
 
   // then copy old matrix
-  for (unsigned int row=0; row<matrix.m(); ++row)
-    for (unsigned int col=0; col<matrix.n(); ++col)
+  for (size_type row=0; row<matrix.m(); ++row)
+    for (size_type col=0; col<matrix.n(); ++col)
       if (matrix(row,col) != 0)
         set (row, col, matrix(row,col));
 }
@@ -455,7 +455,7 @@ ChunkSparseMatrix<number>::add (const number factor,
 
   // add everything, including padding
   // elements
-  const unsigned int chunk_size = cols->get_chunk_size();
+  const size_type     chunk_size = cols->get_chunk_size();
   number             *val_ptr    = &val[0];
   const somenumber   *matrix_ptr = &matrix.val[0];
   const number *const end_ptr    = &val[cols->sparsity_pattern.n_nonzero_elements()
@@ -532,7 +532,7 @@ ChunkSparseMatrix<number>::vmult_add (OutVector &dst,
 
   Assert (!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination());
 
-  const unsigned int n_chunk_rows = cols->sparsity_pattern.n_rows();
+  const size_type n_chunk_rows = cols->sparsity_pattern.n_rows();
 
   // loop over all chunks. note that we need
   // to treat the last chunk row and column
@@ -541,16 +541,16 @@ ChunkSparseMatrix<number>::vmult_add (OutVector &dst,
   const bool rows_have_padding = (m() % cols->chunk_size != 0),
              cols_have_padding = (n() % cols->chunk_size != 0);
 
-  const unsigned int n_regular_chunk_rows
+  const size_type n_regular_chunk_rows
     = (rows_have_padding ?
        n_chunk_rows-1 :
        n_chunk_rows);
 
-  const number       *val_ptr    = val;
-  const unsigned int *colnum_ptr = cols->sparsity_pattern.colnums;
+  const number    *val_ptr    = val;
+  const size_type *colnum_ptr = cols->sparsity_pattern.colnums;
   typename OutVector::iterator dst_ptr = dst.begin();
 
-  for (unsigned int chunk_row=0; chunk_row<n_regular_chunk_rows; ++chunk_row)
+  for (size_type chunk_row=0; chunk_row<n_regular_chunk_rows; ++chunk_row)
     {
       const number *const val_end_of_row = &val[cols->sparsity_pattern.rowstart[chunk_row+1]
                                                 * cols->chunk_size
@@ -568,8 +568,8 @@ ChunkSparseMatrix<number>::vmult_add (OutVector &dst,
           else
             // we're at a chunk column that
             // has padding
-            for (unsigned int r=0; r<cols->chunk_size; ++r)
-              for (unsigned int c=0; c<n() % cols->chunk_size; ++c)
+            for (size_type r=0; r<cols->chunk_size; ++r)
+              for (size_type c=0; c<n() % cols->chunk_size; ++c)
                 dst(chunk_row * cols->chunk_size + r)
                 += (val_ptr[r*cols->chunk_size + c] *
                     src(*colnum_ptr * cols->chunk_size + c));
@@ -586,7 +586,7 @@ ChunkSparseMatrix<number>::vmult_add (OutVector &dst,
   // necessary
   if (rows_have_padding)
     {
-      const unsigned int chunk_row = n_chunk_rows - 1;
+      const size_type chunk_row = n_chunk_rows - 1;
 
       const number *const val_end_of_row = &val[cols->sparsity_pattern.rowstart[chunk_row+1]
                                                 * cols->chunk_size
@@ -599,8 +599,8 @@ ChunkSparseMatrix<number>::vmult_add (OutVector &dst,
             {
               // we're at a chunk row but not
               // column that has padding
-              for (unsigned int r=0; r<m() % cols->chunk_size; ++r)
-                for (unsigned int c=0; c<cols->chunk_size; ++c)
+              for (size_type r=0; r<m() % cols->chunk_size; ++r)
+                for (size_type c=0; c<cols->chunk_size; ++c)
                   dst(chunk_row * cols->chunk_size + r)
                   += (val_ptr[r*cols->chunk_size + c] *
                       src(*colnum_ptr * cols->chunk_size + c));
@@ -608,8 +608,8 @@ ChunkSparseMatrix<number>::vmult_add (OutVector &dst,
           else
             // we're at a chunk row and
             // column that has padding
-            for (unsigned int r=0; r<m() % cols->chunk_size; ++r)
-              for (unsigned int c=0; c<n() % cols->chunk_size; ++c)
+            for (size_type r=0; r<m() % cols->chunk_size; ++r)
+              for (size_type c=0; c<n() % cols->chunk_size; ++c)
                 dst(chunk_row * cols->chunk_size + r)
                 += (val_ptr[r*cols->chunk_size + c] *
                     src(*colnum_ptr * cols->chunk_size + c));
@@ -634,7 +634,7 @@ ChunkSparseMatrix<number>::Tvmult_add (OutVector &dst,
 
   Assert (!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination());
 
-  const unsigned int n_chunk_rows = cols->sparsity_pattern.n_rows();
+  const size_type n_chunk_rows = cols->sparsity_pattern.n_rows();
 
   // loop over all chunks. note that we need
   // to treat the last chunk row and column
@@ -643,7 +643,7 @@ ChunkSparseMatrix<number>::Tvmult_add (OutVector &dst,
   const bool rows_have_padding = (m() % cols->chunk_size != 0),
              cols_have_padding = (n() % cols->chunk_size != 0);
 
-  const unsigned int n_regular_chunk_rows
+  const size_type n_regular_chunk_rows
     = (rows_have_padding ?
        n_chunk_rows-1 :
        n_chunk_rows);
@@ -651,10 +651,10 @@ ChunkSparseMatrix<number>::Tvmult_add (OutVector &dst,
   // like in vmult_add, but don't keep an
   // iterator into dst around since we're not
   // traversing it sequentially this time
-  const number       *val_ptr    = val;
-  const unsigned int *colnum_ptr = cols->sparsity_pattern.colnums;
+  const number    *val_ptr    = val;
+  const size_type *colnum_ptr = cols->sparsity_pattern.colnums;
 
-  for (unsigned int chunk_row=0; chunk_row<n_regular_chunk_rows; ++chunk_row)
+  for (size_type chunk_row=0; chunk_row<n_regular_chunk_rows; ++chunk_row)
     {
       const number *const val_end_of_row = &val[cols->sparsity_pattern.rowstart[chunk_row+1]
                                                 * cols->chunk_size
@@ -672,8 +672,8 @@ ChunkSparseMatrix<number>::Tvmult_add (OutVector &dst,
           else
             // we're at a chunk column that
             // has padding
-            for (unsigned int r=0; r<cols->chunk_size; ++r)
-              for (unsigned int c=0; c<n() % cols->chunk_size; ++c)
+            for (size_type r=0; r<cols->chunk_size; ++r)
+              for (size_type c=0; c<n() % cols->chunk_size; ++c)
                 dst(*colnum_ptr * cols->chunk_size + c)
                 += (val_ptr[r*cols->chunk_size + c] *
                     src(chunk_row * cols->chunk_size + r));
@@ -687,7 +687,7 @@ ChunkSparseMatrix<number>::Tvmult_add (OutVector &dst,
   // necessary
   if (rows_have_padding)
     {
-      const unsigned int chunk_row = n_chunk_rows - 1;
+      const size_type chunk_row = n_chunk_rows - 1;
 
       const number *const val_end_of_row = &val[cols->sparsity_pattern.rowstart[chunk_row+1]
                                                 * cols->chunk_size
@@ -700,8 +700,8 @@ ChunkSparseMatrix<number>::Tvmult_add (OutVector &dst,
             {
               // we're at a chunk row but not
               // column that has padding
-              for (unsigned int r=0; r<m() % cols->chunk_size; ++r)
-                for (unsigned int c=0; c<cols->chunk_size; ++c)
+              for (size_type r=0; r<m() % cols->chunk_size; ++r)
+                for (size_type c=0; c<cols->chunk_size; ++c)
                   dst(*colnum_ptr * cols->chunk_size + c)
                   += (val_ptr[r*cols->chunk_size + c] *
                       src(chunk_row * cols->chunk_size + r));
@@ -709,8 +709,8 @@ ChunkSparseMatrix<number>::Tvmult_add (OutVector &dst,
           else
             // we're at a chunk row and
             // column that has padding
-            for (unsigned int r=0; r<m() % cols->chunk_size; ++r)
-              for (unsigned int c=0; c<n() % cols->chunk_size; ++c)
+            for (size_type r=0; r<m() % cols->chunk_size; ++r)
+              for (size_type c=0; c<n() % cols->chunk_size; ++c)
                 dst(*colnum_ptr * cols->chunk_size + c)
                 += (val_ptr[r*cols->chunk_size + c] *
                     src(chunk_row * cols->chunk_size + r));
@@ -738,7 +738,7 @@ ChunkSparseMatrix<number>::matrix_norm_square (const Vector<somenumber> &v) cons
   // like matrix_scalar_product, except that
   // the two vectors are now the same
 
-  const unsigned int n_chunk_rows = cols->sparsity_pattern.n_rows();
+  const size_type n_chunk_rows = cols->sparsity_pattern.n_rows();
 
   // loop over all chunks. note that we need
   // to treat the last chunk row and column
@@ -747,16 +747,16 @@ ChunkSparseMatrix<number>::matrix_norm_square (const Vector<somenumber> &v) cons
   const bool rows_have_padding = (m() % cols->chunk_size != 0),
              cols_have_padding = (n() % cols->chunk_size != 0);
 
-  const unsigned int n_regular_chunk_rows
+  const size_type n_regular_chunk_rows
     = (rows_have_padding ?
        n_chunk_rows-1 :
        n_chunk_rows);
 
-  const number       *val_ptr    = val;
-  const unsigned int *colnum_ptr = cols->sparsity_pattern.colnums;
+  const number    *val_ptr    = val;
+  const size_type *colnum_ptr = cols->sparsity_pattern.colnums;
   typename Vector<somenumber>::const_iterator v_ptr = v.begin();
 
-  for (unsigned int chunk_row=0; chunk_row<n_regular_chunk_rows; ++chunk_row)
+  for (size_type chunk_row=0; chunk_row<n_regular_chunk_rows; ++chunk_row)
     {
       const number *const val_end_of_row = &val[cols->sparsity_pattern.rowstart[chunk_row+1]
                                                 * cols->chunk_size
@@ -776,8 +776,8 @@ ChunkSparseMatrix<number>::matrix_norm_square (const Vector<somenumber> &v) cons
           else
             // we're at a chunk column that
             // has padding
-            for (unsigned int r=0; r<cols->chunk_size; ++r)
-              for (unsigned int c=0; c<n() % cols->chunk_size; ++c)
+            for (size_type r=0; r<cols->chunk_size; ++r)
+              for (size_type c=0; c<n() % cols->chunk_size; ++c)
                 result
                 +=
                   v(chunk_row * cols->chunk_size + r)
@@ -796,7 +796,7 @@ ChunkSparseMatrix<number>::matrix_norm_square (const Vector<somenumber> &v) cons
   // necessary
   if (rows_have_padding)
     {
-      const unsigned int chunk_row = n_chunk_rows - 1;
+      const size_type chunk_row = n_chunk_rows - 1;
 
       const number *const val_end_of_row = &val[cols->sparsity_pattern.rowstart[chunk_row+1]
                                                 * cols->chunk_size
@@ -809,8 +809,8 @@ ChunkSparseMatrix<number>::matrix_norm_square (const Vector<somenumber> &v) cons
             {
               // we're at a chunk row but not
               // column that has padding
-              for (unsigned int r=0; r<m() % cols->chunk_size; ++r)
-                for (unsigned int c=0; c<cols->chunk_size; ++c)
+              for (size_type r=0; r<m() % cols->chunk_size; ++r)
+                for (size_type c=0; c<cols->chunk_size; ++c)
                   result
                   +=
                     v(chunk_row * cols->chunk_size + r)
@@ -820,8 +820,8 @@ ChunkSparseMatrix<number>::matrix_norm_square (const Vector<somenumber> &v) cons
           else
             // we're at a chunk row and
             // column that has padding
-            for (unsigned int r=0; r<m() % cols->chunk_size; ++r)
-              for (unsigned int c=0; c<n() % cols->chunk_size; ++c)
+            for (size_type r=0; r<m() % cols->chunk_size; ++r)
+              for (size_type c=0; c<n() % cols->chunk_size; ++c)
                 result
                 +=
                   v(chunk_row * cols->chunk_size + r)
@@ -853,7 +853,7 @@ ChunkSparseMatrix<number>::matrix_scalar_product (const Vector<somenumber> &u,
   // function
   somenumber result = 0;
 
-  const unsigned int n_chunk_rows = cols->sparsity_pattern.n_rows();
+  const size_type n_chunk_rows = cols->sparsity_pattern.n_rows();
 
   // loop over all chunks. note that we need
   // to treat the last chunk row and column
@@ -862,16 +862,16 @@ ChunkSparseMatrix<number>::matrix_scalar_product (const Vector<somenumber> &u,
   const bool rows_have_padding = (m() % cols->chunk_size != 0),
              cols_have_padding = (n() % cols->chunk_size != 0);
 
-  const unsigned int n_regular_chunk_rows
+  const size_type n_regular_chunk_rows
     = (rows_have_padding ?
        n_chunk_rows-1 :
        n_chunk_rows);
 
-  const number       *val_ptr    = val;
-  const unsigned int *colnum_ptr = cols->sparsity_pattern.colnums;
+  const number    *val_ptr    = val;
+  const size_type *colnum_ptr = cols->sparsity_pattern.colnums;
   typename Vector<somenumber>::const_iterator u_ptr = u.begin();
 
-  for (unsigned int chunk_row=0; chunk_row<n_regular_chunk_rows; ++chunk_row)
+  for (size_type chunk_row=0; chunk_row<n_regular_chunk_rows; ++chunk_row)
     {
       const number *const val_end_of_row = &val[cols->sparsity_pattern.rowstart[chunk_row+1]
                                                 * cols->chunk_size
@@ -891,8 +891,8 @@ ChunkSparseMatrix<number>::matrix_scalar_product (const Vector<somenumber> &u,
           else
             // we're at a chunk column that
             // has padding
-            for (unsigned int r=0; r<cols->chunk_size; ++r)
-              for (unsigned int c=0; c<n() % cols->chunk_size; ++c)
+            for (size_type r=0; r<cols->chunk_size; ++r)
+              for (size_type c=0; c<n() % cols->chunk_size; ++c)
                 result
                 +=
                   u(chunk_row * cols->chunk_size + r)
@@ -911,7 +911,7 @@ ChunkSparseMatrix<number>::matrix_scalar_product (const Vector<somenumber> &u,
   // necessary
   if (rows_have_padding)
     {
-      const unsigned int chunk_row = n_chunk_rows - 1;
+      const size_type chunk_row = n_chunk_rows - 1;
 
       const number *const val_end_of_row = &val[cols->sparsity_pattern.rowstart[chunk_row+1]
                                                 * cols->chunk_size
@@ -924,8 +924,8 @@ ChunkSparseMatrix<number>::matrix_scalar_product (const Vector<somenumber> &u,
             {
               // we're at a chunk row but not
               // column that has padding
-              for (unsigned int r=0; r<m() % cols->chunk_size; ++r)
-                for (unsigned int c=0; c<cols->chunk_size; ++c)
+              for (size_type r=0; r<m() % cols->chunk_size; ++r)
+                for (size_type c=0; c<cols->chunk_size; ++c)
                   result
                   +=
                     u(chunk_row * cols->chunk_size + r)
@@ -935,8 +935,8 @@ ChunkSparseMatrix<number>::matrix_scalar_product (const Vector<somenumber> &u,
           else
             // we're at a chunk row and
             // column that has padding
-            for (unsigned int r=0; r<m() % cols->chunk_size; ++r)
-              for (unsigned int c=0; c<n() % cols->chunk_size; ++c)
+            for (size_type r=0; r<m() % cols->chunk_size; ++r)
+              for (size_type c=0; c<n() % cols->chunk_size; ++c)
                 result
                 +=
                   u(chunk_row * cols->chunk_size + r)
@@ -960,7 +960,7 @@ ChunkSparseMatrix<number>::l1_norm () const
   Assert (cols != 0, ExcNotInitialized());
   Assert (val != 0, ExcNotInitialized());
 
-  const unsigned int n_chunk_rows = cols->sparsity_pattern.n_rows();
+  const size_type n_chunk_rows = cols->sparsity_pattern.n_rows();
 
   // loop over all rows and columns; it is
   // safe to also loop over the padding
@@ -970,11 +970,11 @@ ChunkSparseMatrix<number>::l1_norm () const
   Vector<real_type> column_sums(cols->sparsity_pattern.n_cols() *
                                 cols->chunk_size);
 
-  for (unsigned int chunk_row=0; chunk_row<n_chunk_rows; ++chunk_row)
-    for (unsigned int j=cols->sparsity_pattern.rowstart[chunk_row];
+  for (size_type chunk_row=0; chunk_row<n_chunk_rows; ++chunk_row)
+    for (size_type j=cols->sparsity_pattern.rowstart[chunk_row];
          j<cols->sparsity_pattern.rowstart[chunk_row+1] ; ++j)
-      for (unsigned int r=0; r<cols->chunk_size; ++r)
-        for (unsigned int s=0; s<cols->chunk_size; ++s)
+      for (size_type r=0; r<cols->chunk_size; ++r)
+        for (size_type s=0; s<cols->chunk_size; ++s)
           column_sums(cols->sparsity_pattern.colnums[j] *
                       cols->chunk_size + s) +=
                         numbers::NumberTraits<number>::abs(val[j * cols->chunk_size *
@@ -1000,7 +1000,7 @@ ChunkSparseMatrix<number>::linfty_norm () const
   // done in the SparseMatrix class but since
   // it is rarely called in time critical
   // places it is probably not worth it
-  const unsigned int n_chunk_rows = cols->sparsity_pattern.n_rows();
+  const size_type n_chunk_rows = cols->sparsity_pattern.n_rows();
 
   // loop over all rows and columns; it is
   // safe to also loop over the padding
@@ -1010,11 +1010,11 @@ ChunkSparseMatrix<number>::linfty_norm () const
   Vector<real_type> row_sums(cols->sparsity_pattern.n_rows() *
                              cols->chunk_size);
 
-  for (unsigned int chunk_row=0; chunk_row<n_chunk_rows; ++chunk_row)
-    for (unsigned int j=cols->sparsity_pattern.rowstart[chunk_row];
+  for (size_type chunk_row=0; chunk_row<n_chunk_rows; ++chunk_row)
+    for (size_type j=cols->sparsity_pattern.rowstart[chunk_row];
          j<cols->sparsity_pattern.rowstart[chunk_row+1] ; ++j)
-      for (unsigned int r=0; r<cols->chunk_size; ++r)
-        for (unsigned int s=0; s<cols->chunk_size; ++s)
+      for (size_type r=0; r<cols->chunk_size; ++r)
+        for (size_type s=0; s<cols->chunk_size; ++s)
           row_sums(chunk_row * cols->chunk_size + r) +=
             numbers::NumberTraits<number>::abs(val[j * cols->chunk_size *
                                                    cols->chunk_size +
@@ -1073,7 +1073,7 @@ ChunkSparseMatrix<number>::residual (Vector<somenumber>       &dst,
   // vmult_add, except that we subtract
   // rather than add A*u
   /////////
-  const unsigned int n_chunk_rows = cols->sparsity_pattern.n_rows();
+  const size_type n_chunk_rows = cols->sparsity_pattern.n_rows();
 
   // loop over all chunks. note that we need
   // to treat the last chunk row and column
@@ -1082,16 +1082,16 @@ ChunkSparseMatrix<number>::residual (Vector<somenumber>       &dst,
   const bool rows_have_padding = (m() % cols->chunk_size != 0),
              cols_have_padding = (n() % cols->chunk_size != 0);
 
-  const unsigned int n_regular_chunk_rows
+  const size_type n_regular_chunk_rows
     = (rows_have_padding ?
        n_chunk_rows-1 :
        n_chunk_rows);
 
   const number       *val_ptr    = val;
-  const unsigned int *colnum_ptr = cols->sparsity_pattern.colnums;
+  const size_type *colnum_ptr = cols->sparsity_pattern.colnums;
   typename Vector<somenumber>::iterator dst_ptr = dst.begin();
 
-  for (unsigned int chunk_row=0; chunk_row<n_regular_chunk_rows; ++chunk_row)
+  for (size_type chunk_row=0; chunk_row<n_regular_chunk_rows; ++chunk_row)
     {
       const number *const val_end_of_row = &val[cols->sparsity_pattern.rowstart[chunk_row+1]
                                                 * cols->chunk_size
@@ -1109,8 +1109,8 @@ ChunkSparseMatrix<number>::residual (Vector<somenumber>       &dst,
           else
             // we're at a chunk column that
             // has padding
-            for (unsigned int r=0; r<cols->chunk_size; ++r)
-              for (unsigned int c=0; c<n() % cols->chunk_size; ++c)
+            for (size_type r=0; r<cols->chunk_size; ++r)
+              for (size_type c=0; c<n() % cols->chunk_size; ++c)
                 dst(chunk_row * cols->chunk_size + r)
                 -= (val_ptr[r*cols->chunk_size + c] *
                     u(*colnum_ptr * cols->chunk_size + c));
@@ -1127,7 +1127,7 @@ ChunkSparseMatrix<number>::residual (Vector<somenumber>       &dst,
   // necessary
   if (rows_have_padding)
     {
-      const unsigned int chunk_row = n_chunk_rows - 1;
+      const size_type chunk_row = n_chunk_rows - 1;
 
       const number *const val_end_of_row = &val[cols->sparsity_pattern.rowstart[chunk_row+1]
                                                 * cols->chunk_size
@@ -1140,8 +1140,8 @@ ChunkSparseMatrix<number>::residual (Vector<somenumber>       &dst,
             {
               // we're at a chunk row but not
               // column that has padding
-              for (unsigned int r=0; r<m() % cols->chunk_size; ++r)
-                for (unsigned int c=0; c<cols->chunk_size; ++c)
+              for (size_type r=0; r<m() % cols->chunk_size; ++r)
+                for (size_type c=0; c<cols->chunk_size; ++c)
                   dst(chunk_row * cols->chunk_size + r)
                   -= (val_ptr[r*cols->chunk_size + c] *
                       u(*colnum_ptr * cols->chunk_size + c));
@@ -1149,8 +1149,8 @@ ChunkSparseMatrix<number>::residual (Vector<somenumber>       &dst,
           else
             // we're at a chunk row and
             // column that has padding
-            for (unsigned int r=0; r<m() % cols->chunk_size; ++r)
-              for (unsigned int c=0; c<n() % cols->chunk_size; ++c)
+            for (size_type r=0; r<m() % cols->chunk_size; ++r)
+              for (size_type c=0; c<n() % cols->chunk_size; ++c)
                 dst(chunk_row * cols->chunk_size + r)
                 -= (val_ptr[r*cols->chunk_size + c] *
                     u(*colnum_ptr * cols->chunk_size + c));
@@ -1278,8 +1278,8 @@ template <typename number>
 template <typename somenumber>
 void
 ChunkSparseMatrix<number>::PSOR (Vector<somenumber> &dst,
-                                 const std::vector<unsigned int> &permutation,
-                                 const std::vector<unsigned int> &inverse_permutation,
+                                 const std::vector<size_type> &permutation,
+                                 const std::vector<size_type> &inverse_permutation,
                                  const number /*om*/) const
 {
   Assert (cols != 0, ExcNotInitialized());
@@ -1300,8 +1300,8 @@ template <typename number>
 template <typename somenumber>
 void
 ChunkSparseMatrix<number>::TPSOR (Vector<somenumber> &dst,
-                                  const std::vector<unsigned int> &permutation,
-                                  const std::vector<unsigned int> &inverse_permutation,
+                                  const std::vector<size_type> &permutation,
+                                  const std::vector<size_type> &inverse_permutation,
                                   const number /*om*/) const
 {
   Assert (cols != 0, ExcNotInitialized());
@@ -1444,9 +1444,9 @@ void ChunkSparseMatrix<number>::print_formatted (std::ostream &out,
         width = precision+2;
     }
 
-  for (unsigned int i=0; i<m(); ++i)
+  for (size_type i=0; i<m(); ++i)
     {
-      for (unsigned int j=0; j<n(); ++j)
+      for (size_type j=0; j<n(); ++j)
         if (cols->sparsity_pattern(i,j) != SparsityPattern::invalid_entry)
           out << std::setw(width)
               << val[cols->sparsity_pattern(i,j)] * denominator << ' ';
@@ -1472,28 +1472,28 @@ void ChunkSparseMatrix<number>::print_pattern (std::ostream &out,
   Assert (cols != 0, ExcNotInitialized());
   Assert (val != 0, ExcNotInitialized());
 
-  const unsigned int chunk_size = cols->get_chunk_size();
+  const size_type chunk_size = cols->get_chunk_size();
 
   // loop over all chunk rows and columns,
   // and each time we find something repeat
   // it chunk_size times in both directions
-  for (unsigned int i=0; i<cols->sparsity_pattern.n_rows(); ++i)
+  for (size_type i=0; i<cols->sparsity_pattern.n_rows(); ++i)
     {
-      for (unsigned int d=0; d<chunk_size; ++d)
-        for (unsigned int j=0; j<cols->sparsity_pattern.n_cols(); ++j)
+      for (size_type d=0; d<chunk_size; ++d)
+        for (size_type j=0; j<cols->sparsity_pattern.n_cols(); ++j)
           if (cols->sparsity_pattern(i,j) == SparsityPattern::invalid_entry)
             {
-              for (unsigned int e=0; e<chunk_size; ++e)
+              for (size_type e=0; e<chunk_size; ++e)
                 out << '.';
             }
           else if (std::fabs(val[cols->sparsity_pattern(i,j)]) > threshold)
             {
-              for (unsigned int e=0; e<chunk_size; ++e)
+              for (size_type e=0; e<chunk_size; ++e)
                 out << '*';
             }
           else
             {
-              for (unsigned int e=0; e<chunk_size; ++e)
+              for (size_type e=0; e<chunk_size; ++e)
                 out << ':';
             }
       out << std::endl;
index 2490f7041cef6e3c0fb1bad8a3e0ec9394678d26..f6a2b24e9fb3d37d5a18c95e516bcc17e34a873d 100644 (file)
@@ -46,6 +46,10 @@ template <typename> class ChunkSparseMatrix;
 class ChunkSparsityPattern : public Subscriptor
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std::size_t size_type;
 
   /**
    * Define a value which is used
@@ -71,7 +75,7 @@ public:
    * but the actual value of the
    * variable may change over time.
    */
-  static const unsigned int invalid_entry = SparsityPattern::invalid_entry;
+  static const size_type invalid_entry = SparsityPattern::invalid_entry;
 
   /**
    * Initialize the matrix empty,
@@ -127,19 +131,19 @@ public:
    * @arg max_per_row maximum
    * number of nonzero entries per row
    */
-  ChunkSparsityPattern (const types::global_dof_index m,
-                        const types::global_dof_index n,
-                        const unsigned int max_chunks_per_row,
-                        const unsigned int chunk_size);
+  ChunkSparsityPattern (const size_type m,
+                        const size_type n,
+                        const size_type max_chunks_per_row,
+                        const size_type chunk_size);
 
   /**
    * @deprecated This constructor is deprecated. Use the version
    * without the last argument
    */
-  ChunkSparsityPattern (const unsigned int m,
-                        const unsigned int n,
-                        const unsigned int max_chunks_per_row,
-                        const unsigned int chunk_size,
+  ChunkSparsityPattern (const size_type m,
+                        const size_type n,
+                        const size_type max_chunks_per_row,
+                        const size_type chunk_size,
                         const bool optimize_diagonal) DEAL_II_DEPRECATED;
 
   /**
@@ -154,19 +158,19 @@ public:
    * each row.  This vector must
    * have one entry for each row.
    */
-  ChunkSparsityPattern (const types::global_dof_index m,
-                        const types::global_dof_index n,
-                        const std::vector<unsigned int> &row_lengths,
-                        const unsigned int chunk_size);
+  ChunkSparsityPattern (const size_type m,
+                        const size_type n,
+                        const std::vector<size_type> &row_lengths,
+                        const size_type chunk_size);
 
   /**
    * @deprecated This constructor is deprecated. Use the version
    * without the last argument
    */
-  ChunkSparsityPattern (const unsigned int               m,
-                        const unsigned int               n,
-                        const std::vector<unsigned int> &row_lengths,
-                        const unsigned int chunk_size,
+  ChunkSparsityPattern (const size_type               m,
+                        const size_type               n,
+                        const std::vector<size_type> &row_lengths,
+                        const size_type chunk_size,
                         const bool optimize_diagonal) DEAL_II_DEPRECATED;
 
   /**
@@ -182,9 +186,9 @@ public:
    * taking row and column numbers
    * separately.
    */
-  ChunkSparsityPattern (const types::global_dof_index n,
-                        const unsigned int            max_per_row,
-                        const unsigned int            chunk_size);
+  ChunkSparsityPattern (const size_type n,
+                        const size_type max_per_row,
+                        const size_type chunk_size);
 
   /**
    * Initialize a quadratic matrix.
@@ -196,17 +200,17 @@ public:
    * each row.  This vector must
    * have one entry for each row.
    */
-  ChunkSparsityPattern (const types::global_dof_index    m,
-                        const std::vector<unsigned int> &row_lengths,
-                        const unsigned int               chunk_size);
+  ChunkSparsityPattern (const size_type                m,
+                        const std::vector<size_type>  &row_lengths,
+                        const size_type                chunk_size);
 
   /**
    * @deprecated This constructor is deprecated. Use the version
    * without the last argument
    */
-  ChunkSparsityPattern (const unsigned int               m,
-                        const std::vector<unsigned int> &row_lengths,
-                        const unsigned int               chunk_size,
+  ChunkSparsityPattern (const size_type               m,
+                        const std::vector<size_type> &row_lengths,
+                        const size_type               chunk_size,
                         const bool optimize_diagonal) DEAL_II_DEPRECATED;
 
   /**
@@ -235,19 +239,19 @@ public:
    * operations to the other
    * <tt>reinit</tt> function.
    */
-  void reinit (const types::global_dof_index m,
-               const types::global_dof_index n,
-               const unsigned int max_per_row,
-               const unsigned int chunk_size);
+  void reinit (const size_type m,
+               const size_type n,
+               const size_type max_per_row,
+               const size_type chunk_size);
 
   /**
    * @deprecated This function is deprecated. Use the function
    * without the last argument
    */
-  void reinit (const unsigned int m,
-               const unsigned int n,
-               const unsigned int max_per_row,
-               const unsigned int chunk_size,
+  void reinit (const size_type m,
+               const size_type n,
+               const size_type max_per_row,
+               const size_type chunk_size,
                const bool optimize_diagonal) DEAL_II_DEPRECATED;
 
   /**
@@ -274,38 +278,38 @@ public:
    * optimized access in relaxation
    * methods of SparseMatrix.
    */
-  void reinit (const types::global_dof_index m,
-               const types::global_dof_index n,
-               const std::vector<unsigned int> &row_lengths,
-               const unsigned int chunk_size);
+  void reinit (const size_type m,
+               const size_type n,
+               const std::vector<size_type> &row_lengths,
+               const size_type chunk_size);
 
   /**
    * @deprecated This function is deprecated. Use the function
    * without the last argument
    */
-  void reinit (const unsigned int               m,
-               const unsigned int               n,
-               const std::vector<unsigned int> &row_lengths,
-               const unsigned int chunk_size,
-               const bool optimize_diagonal) DEAL_II_DEPRECATED;
+  void reinit (const size_type                m,
+               const size_type                n,
+               const std::vector<size_type > &row_lengths,
+               const size_type                chunk_size,
+               const bool                     optimize_diagonal) DEAL_II_DEPRECATED;
 
   /**
    * Same as above, but with a
    * VectorSlice argument instead.
    */
-  void reinit (const types::global_dof_index m,
-               const types::global_dof_index n,
-               const VectorSlice<const std::vector<unsigned int> > &row_lengths,
-               const unsigned int chunk_size);
+  void reinit (const size_type m,
+               const size_type n,
+               const VectorSlice<const std::vector<size_type> > &row_lengths,
+               const size_type chunk_size);
 
   /**
    * @deprecated This function is deprecated. Use the function
    * without the last argument
    */
-  void reinit (const unsigned int               m,
-               const unsigned int               n,
-               const VectorSlice<const std::vector<unsigned int> > &row_lengths,
-               const unsigned int chunk_size,
+  void reinit (const size_type m,
+               const size_type n,
+               const VectorSlice<const std::vector<size_type> > &row_lengths,
+               const size_type chunk_size,
                const bool optimize_diagonal) DEAL_II_DEPRECATED;
 
   /**
@@ -376,13 +380,13 @@ public:
    * contents of one
    * line. Dereferencing these
    * inner iterators must either
-   * yield a pair of an unsigned
-   * integer as column index and a
+   * yield a pair of a size_type 
+   * as column index and a
    * value of arbitrary type (such
    * a type would be used if we
    * wanted to describe a sparse
    * matrix with one such object),
-   * or simply an unsigned integer
+   * or simply a size_type
    * (of we only wanted to describe
    * a sparsity pattern). The
    * function is able to determine
@@ -407,8 +411,8 @@ public:
    * may be used to fill a sparsity
    * pattern:
    * @code
-   * std::vector<std::vector<unsigned int> > column_indices (n_rows);
-   * for (unsigned int row=0; row<n_rows; ++row)
+   * std::vector<std::vector<size_type> > column_indices (n_rows);
+   * for (size_type row=0; row<n_rows; ++row)
    *         // generate necessary columns in this row
    *   fill_row (column_indices[row]);
    *
@@ -424,7 +428,7 @@ public:
    * <tt>end</tt> (namely
    * <tt>std::vector</tt>s), and the
    * inner iterators dereferenced
-   * yield unsigned integers as
+   * yield size_type as
    * column indices. Note that we
    * could have replaced each of
    * the two <tt>std::vector</tt>
@@ -437,8 +441,8 @@ public:
    * whole matrix, not only a
    * sparsity pattern:
    * @code
-   * std::vector<std::map<unsigned int,double> > entries (n_rows);
-   * for (unsigned int row=0; row<n_rows; ++row)
+   * std::vector<std::map<size_type,double> > entries (n_rows);
+   * for (size_type row=0; row<n_rows; ++row)
    *         // generate necessary pairs of columns
    *         // and corresponding values in this row
    *   fill_row (entries[row]);
@@ -454,37 +458,37 @@ public:
    * This example works because
    * dereferencing iterators of the
    * inner type yields a pair of
-   * unsigned integers and a value,
+   * size_type and a value,
    * the first of which we take as
    * column index. As previously,
    * the outer <tt>std::vector</tt>
    * could be replaced by
    * <tt>std::list</tt>, and the inner
-   * <tt>std::map<unsigned int,double></tt>
+   * <tt>std::map<size_type,double></tt>
    * could be replaced by
-   * <tt>std::vector<std::pair<unsigned int,double> ></tt>,
+   * <tt>std::vector<std::pair<size_type,double> ></tt>,
    * or a list or set of such
    * pairs, as they all return
    * iterators that point to such
    * pairs.
    */
   template <typename ForwardIterator>
-  void copy_from (const types::global_dof_index n_rows,
-                  const types::global_dof_index n_cols,
+  void copy_from (const size_type n_rows,
+                  const size_type n_cols,
                   const ForwardIterator begin,
                   const ForwardIterator end,
-                  const unsigned int chunk_size);
+                  const size_type chunk_size);
 
    /**
     * @deprecated This function is deprecated. Use the function
     * without the last argument
     */
   template <typename ForwardIterator>
-  void copy_from (const unsigned int    n_rows,
-                  const unsigned int    n_cols,
+  void copy_from (const size_type       n_rows,
+                  const size_type       n_cols,
                   const ForwardIterator begin,
                   const ForwardIterator end,
-                  const unsigned int chunk_size,
+                  const size_type       chunk_size,
                   const bool optimize_diagonal) DEAL_II_DEPRECATED;
 
   /**
@@ -498,7 +502,7 @@ public:
    */
   template <typename SparsityType>
   void copy_from (const SparsityType &csp,
-                  const unsigned int  chunk_size);
+                  const size_type     chunk_size);
 
   /**
    * @deprecated This function is deprecated. Use the function
@@ -506,7 +510,7 @@ public:
    */
   template <typename SparsityType>
   void copy_from (const SparsityType &csp,
-                  const unsigned int  chunk_size,
+                  const size_type     chunk_size,
                   const bool          optimize_diagonal) DEAL_II_DEPRECATED;
 
   /**
@@ -522,7 +526,7 @@ public:
    */
   template <typename number>
   void copy_from (const FullMatrix<number> &matrix,
-                  const unsigned int chunk_size);
+                  const size_type chunk_size);
 
   /**
    * @deprecated This function is deprecated. Use the function
@@ -530,7 +534,7 @@ public:
    */
   template <typename number>
   void copy_from (const FullMatrix<number> &matrix,
-                  const unsigned int chunk_size,
+                  const size_type chunk_size,
                   const bool optimize_diagonal) DEAL_II_DEPRECATED;
 
   /**
@@ -546,7 +550,7 @@ public:
    * argument when constructing this
    * object.
    */
-  unsigned int get_chunk_size () const;
+  size_type get_chunk_size () const;
 
   /**
    * Return the maximum number of entries per
@@ -556,7 +560,7 @@ public:
    * number of entries actually allocated by
    * the user.
    */
-  unsigned int max_entries_per_row () const;
+  size_type max_entries_per_row () const;
 
   /**
    * Add a nonzero entry to the matrix.
@@ -566,8 +570,8 @@ public:
    * If the entry already exists, nothing
    * bad happens.
    */
-  void add (const types::global_dof_index i,
-            const types::global_dof_index j);
+  void add (const size_type i,
+            const size_type j);
 
   /**
    * Make the sparsity pattern
@@ -587,26 +591,26 @@ public:
    * matrix, which equals the dimension
    * of the image space.
    */
-  inline types::global_dof_index n_rows () const;
+  inline size_type n_rows () const;
 
   /**
    * Return number of columns of this
    * matrix, which equals the dimension
    * of the range space.
    */
-  inline types::global_dof_index n_cols () const;
+  inline size_type n_cols () const;
 
   /**
    * Check if a value at a certain
    * position may be non-zero.
    */
-  bool exists (const types::global_dof_index i,
-               const types::global_dof_index j) const;
+  bool exists (const size_type i,
+               const size_type j) const;
 
   /**
    * Number of entries in a specific row.
    */
-  unsigned int row_length (const types::global_dof_index row) const;
+  size_type row_length (const size_type row) const;
 
   /**
    * Compute the bandwidth of the matrix
@@ -618,7 +622,7 @@ public:
    * bandwidth a $n\times m$ matrix can
    * have is $\max\{n-1,m-1\}$.
    */
-  unsigned int bandwidth () const;
+  size_type bandwidth () const;
 
   /**
    * Return the number of nonzero elements of
@@ -632,7 +636,7 @@ public:
    * matrix struct is compressed. It does not
    * make too much sense otherwise anyway.
    */
-  unsigned int n_nonzero_elements () const;
+  size_type n_nonzero_elements () const;
 
   /**
    * Return whether the structure is
@@ -825,18 +829,18 @@ private:
    * Number of rows that this sparsity
    * structure shall represent.
    */
-  types::global_dof_index rows;
+  size_type rows;
 
   /**
    * Number of columns that this sparsity
    * structure shall represent.
    */
-  types::global_dof_index cols;
+  size_type cols;
 
   /**
    * The size of chunks.
    */
-  unsigned int chunk_size;
+  size_type chunk_size;
 
   /**
    * The reduced sparsity pattern. We store
@@ -861,7 +865,7 @@ private:
 
 
 inline
-types::global_dof_index
+size_type
 ChunkSparsityPattern::n_rows () const
 {
   return rows;
@@ -869,7 +873,7 @@ ChunkSparsityPattern::n_rows () const
 
 
 inline
-types::global_dof_index
+size_type
 ChunkSparsityPattern::n_cols () const
 {
   return cols;
@@ -878,7 +882,7 @@ ChunkSparsityPattern::n_cols () const
 
 
 inline
-unsigned int
+size_type 
 ChunkSparsityPattern::get_chunk_size () const
 {
   return chunk_size;
@@ -905,11 +909,11 @@ ChunkSparsityPattern::optimize_diagonal () const
 
 template <typename ForwardIterator>
 void
-ChunkSparsityPattern::copy_from (const types::global_dof_index n_rows,
-                                 const types::global_dof_index n_cols,
+ChunkSparsityPattern::copy_from (const size_type n_rows,
+                                 const size_type n_cols,
                                  const ForwardIterator begin,
                                  const ForwardIterator end,
-                                 const unsigned int    chunk_size,
+                                 const size_type chunk_size,
                                  const bool)
 {
   copy_from (n_rows, n_cols, begin, end, chunk_size);
@@ -919,13 +923,13 @@ ChunkSparsityPattern::copy_from (const types::global_dof_index n_rows,
 
 template <typename ForwardIterator>
 void
-ChunkSparsityPattern::copy_from (const unsigned int    n_rows,
-                                 const unsigned int    n_cols,
+ChunkSparsityPattern::copy_from (const size_type       n_rows,
+                                 const size_type       n_cols,
                                  const ForwardIterator begin,
                                  const ForwardIterator end,
-                                 const unsigned int    chunk_size)
+                                 const size_type       chunk_size)
 {
-  Assert (static_cast<unsigned int>(std::distance (begin, end)) == n_rows,
+  Assert (static_cast<size_type>(std::distance (begin, end)) == n_rows,
           ExcIteratorRange (std::distance (begin, end), n_rows));
 
   // first determine row lengths for
@@ -939,7 +943,7 @@ ChunkSparsityPattern::copy_from (const unsigned int    n_rows,
   // diagonal entry is in a certain
   // row or not
   const bool is_square = (n_rows == n_cols);
-  std::vector<unsigned int> row_lengths;
+  std::vector<size_type> row_lengths;
   row_lengths.reserve(n_rows);
   for (ForwardIterator i=begin; i!=end; ++i)
     row_lengths.push_back (std::distance (i->begin(), i->end())
@@ -949,14 +953,14 @@ ChunkSparsityPattern::copy_from (const unsigned int    n_rows,
 
   // now enter all the elements into
   // the matrix
-  unsigned int row = 0;
+  size_type row = 0;
   typedef typename std::iterator_traits<ForwardIterator>::value_type::const_iterator inner_iterator;
   for (ForwardIterator i=begin; i!=end; ++i, ++row)
     {
       const inner_iterator end_of_row = i->end();
       for (inner_iterator j=i->begin(); j!=end_of_row; ++j)
         {
-          const unsigned int col
+          const size_type col
             = internal::SparsityPatternTools::get_column_index_from_iterator(*j);
           Assert (col < n_cols, ExcInvalidIndex(col,n_cols));
 
index 7ef7288685715a5f0377b88166d7e62bc113d466..4bca0c0f1b24a84179c5d07aa1dcb343297a222b 100644 (file)
@@ -106,13 +106,18 @@ template <typename number> class SparseMatrix;
 class CompressedSetSparsityPattern : public Subscriptor
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std::size_t size_type;
+
   /**
    * An iterator that can be used to
    * iterate over the elements of a single
    * row. The result of dereferencing such
    * an iterator is a column index.
    */
-  typedef std::set<unsigned int>::const_iterator row_iterator;
+  typedef std::set<size_type>::const_iterator row_iterator;
 
 
   /**
@@ -150,14 +155,14 @@ public:
    * matrix with @p m rows and
    * @p n columns.
    */
-  CompressedSetSparsityPattern (const types::global_dof_index m,
-                                const types::global_dof_index n);
+  CompressedSetSparsityPattern (const size_type m,
+                                const size_type n);
 
   /**
    * Initialize a square matrix of
    * dimension @p n.
    */
-  CompressedSetSparsityPattern (const types::global_dof_index n);
+  CompressedSetSparsityPattern (const size_type n);
 
   /**
    * Copy operator. For this the
@@ -177,8 +182,8 @@ public:
    * max_entries_per_row() nonzero
    * entries per row.
    */
-  void reinit (const types::global_dof_index m,
-               const types::global_dof_index n);
+  void reinit (const size_type m,
+               const size_type n);
 
   /**
    * Since this object is kept
@@ -206,15 +211,15 @@ public:
    * this number may change as
    * entries are added.
    */
-  unsigned int max_entries_per_row () const;
+  size_type max_entries_per_row () const;
 
   /**
    * Add a nonzero entry to the
    * matrix. If the entry already
    * exists, nothing bad happens.
    */
-  void add (const types::global_dof_index i,
-            const types::global_dof_index j);
+  void add (const size_type i,
+            const size_type j);
 
   /**
    * Add several nonzero entries to the
@@ -223,17 +228,17 @@ public:
    * happens.
    */
   template <typename ForwardIterator>
-  void add_entries (const types::global_dof_index row,
-                    ForwardIterator               begin,
-                    ForwardIterator               end,
-                    const bool                    indices_are_sorted = false);
+  void add_entries (const size_type row,
+                    ForwardIterator begin,
+                    ForwardIterator end,
+                    const bool      indices_are_sorted = false);
 
   /**
    * Check if a value at a certain
    * position may be non-zero.
    */
-  bool exists (const types::global_dof_index i,
-               const types::global_dof_index j) const;
+  bool exists (const size_type i,
+               const size_type j) const;
 
   /**
    * Make the sparsity pattern
@@ -289,19 +294,19 @@ public:
    * matrix, which equals the dimension
    * of the image space.
    */
-  types::global_dof_index n_rows () const;
+  size_type n_rows () const;
 
   /**
    * Return number of columns of this
    * matrix, which equals the dimension
    * of the range space.
    */
-  types::global_dof_index n_cols () const;
+  size_type n_cols () const;
 
   /**
    * Number of entries in a specific row.
    */
-  unsigned int row_length (const types::global_dof_index row) const;
+  size_type row_length (const size_type row) const;
 
   /**
    * Return an iterator that can loop over
@@ -309,12 +314,12 @@ public:
    * row. Dereferencing the iterator yields
    * a column index.
    */
-  row_iterator row_begin (const types::global_dof_index row) const;
+  row_iterator row_begin (const size_type row) const;
 
   /**
    * End iterator for the given row.
    */
-  row_iterator row_end (const types::global_dof_index row) const;
+  row_iterator row_end (const size_type row) const;
 
 
   /**
@@ -325,14 +330,14 @@ public:
    * $(i,j)$ represents a nonzero entry
    * of the matrix.
    */
-  unsigned int bandwidth () const;
+  size_type bandwidth () const;
 
   /**
    * Return the number of nonzero elements
    * allocated through this sparsity
    * pattern.
    */
-  unsigned int n_nonzero_elements () const;
+  size_type n_nonzero_elements () const;
 
   /**
    * Return whether this object stores only
@@ -357,13 +362,13 @@ private:
    * Number of rows that this sparsity
    * structure shall represent.
    */
-  types::global_dof_index rows;
+  size_type rows;
 
   /**
    * Number of columns that this sparsity
    * structure shall represent.
    */
-  types::global_dof_index cols;
+  size_type cols;
 
   /**
    * For each row of the matrix, store the
@@ -374,7 +379,7 @@ private:
    */
   struct Line
   {
-    std::set<unsigned int> entries;
+    std::set<size_type> entries;
 
     /**
      * Constructor.
@@ -385,7 +390,7 @@ private:
      * Add the given column number to
      * this line.
      */
-    void add (const types::global_dof_index col_num);
+    void add (const size_type col_num);
 
     /**
      * Add the columns specified by the
@@ -417,7 +422,7 @@ CompressedSetSparsityPattern::Line::Line ()
 
 inline
 void
-CompressedSetSparsityPattern::Line::add (const types::global_dof_index j)
+CompressedSetSparsityPattern::Line::add (const size_type j)
 {
   entries.insert (j);
 }
@@ -436,7 +441,7 @@ CompressedSetSparsityPattern::Line::add_entries (ForwardIterator begin,
 
 
 inline
-types::global_dof_index
+size_type
 CompressedSetSparsityPattern::n_rows () const
 {
   return rows;
@@ -445,7 +450,7 @@ CompressedSetSparsityPattern::n_rows () const
 
 
 inline
-types::global_dof_index
+size_type
 CompressedSetSparsityPattern::n_cols () const
 {
   return cols;
@@ -455,8 +460,8 @@ CompressedSetSparsityPattern::n_cols () const
 
 inline
 void
-CompressedSetSparsityPattern::add (const types::global_dof_index i,
-                                   const types::global_dof_index j)
+CompressedSetSparsityPattern::add (const size_type i,
+                                   const size_type j)
 {
   Assert (i<rows, ExcIndexRange(i, 0, rows));
   Assert (j<cols, ExcIndexRange(j, 0, cols));
@@ -469,7 +474,7 @@ CompressedSetSparsityPattern::add (const types::global_dof_index i,
 template <typename ForwardIterator>
 inline
 void
-CompressedSetSparsityPattern::add_entries (const types::global_dof_index row,
+CompressedSetSparsityPattern::add_entries (const size_type row,
                                            ForwardIterator begin,
                                            ForwardIterator end,
                                            const bool         /*indices_are_sorted*/)
@@ -482,8 +487,8 @@ CompressedSetSparsityPattern::add_entries (const types::global_dof_index row,
 
 
 inline
-unsigned int
-CompressedSetSparsityPattern::row_length (const types::global_dof_index row) const
+size_type 
+CompressedSetSparsityPattern::row_length (const size_type row) const
 {
   Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
 
@@ -494,7 +499,7 @@ CompressedSetSparsityPattern::row_length (const types::global_dof_index row) con
 
 inline
 CompressedSetSparsityPattern::row_iterator
-CompressedSetSparsityPattern::row_begin (const types::global_dof_index row) const
+CompressedSetSparsityPattern::row_begin (const size_type row) const
 {
   return (lines[row].entries.begin ());
 }
@@ -503,7 +508,7 @@ CompressedSetSparsityPattern::row_begin (const types::global_dof_index row) cons
 
 inline
 CompressedSetSparsityPattern::row_iterator
-CompressedSetSparsityPattern::row_end (const types::global_dof_index row) const
+CompressedSetSparsityPattern::row_end (const size_type row) const
 {
   return (lines[row].entries.end ());
 }
index 78209fde07e5459fba30f6651f157af2b6a8e3cc..6ebde752c4a4c199bfc2d842f072ab63de0150e7 100644 (file)
@@ -87,13 +87,18 @@ template <typename number> class SparseMatrix;
 class CompressedSimpleSparsityPattern : public Subscriptor
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std::size_t size_type;
+
   /**
    * An iterator that can be used to
    * iterate over the elements of a single
    * row. The result of dereferencing such
    * an iterator is a column index.
    */
-  typedef std::vector<unsigned int>::const_iterator row_iterator;
+  typedef std::vector<size_type>::const_iterator row_iterator;
 
   /**
    * Initialize the matrix empty,
@@ -136,15 +141,15 @@ public:
    * default argument keeps all
    * entries.
    */
-  CompressedSimpleSparsityPattern (const types::global_dof_index m,
-                                   const types::global_dof_index n,
+  CompressedSimpleSparsityPattern (const size_type m,
+                                   const size_type n,
                                    const IndexSet &rowset = IndexSet());
 
   /**
    * Initialize a square matrix of
    * dimension @p n.
    */
-  CompressedSimpleSparsityPattern (const types::global_dof_index n);
+  CompressedSimpleSparsityPattern (const size_type n);
 
   /**
    * Copy operator. For this the
@@ -170,8 +175,8 @@ public:
    * default argument keeps all
    * entries.
    */
-  void reinit (const types::global_dof_index m,
-               const types::global_dof_index n,
+  void reinit (const size_type m,
+               const size_type n,
                const IndexSet &rowset = IndexSet());
 
   /**
@@ -200,15 +205,15 @@ public:
    * this number may change as
    * entries are added.
    */
-  unsigned int max_entries_per_row () const;
+  size_type max_entries_per_row () const;
 
   /**
    * Add a nonzero entry to the
    * matrix. If the entry already
    * exists, nothing bad happens.
    */
-  void add (const types::global_dof_index i,
-            const types::global_dof_index j);
+  void add (const size_type i,
+            const size_type j);
 
   /**
    * Add several nonzero entries to the
@@ -217,17 +222,17 @@ public:
    * happens.
    */
   template <typename ForwardIterator>
-  void add_entries (const types::global_dof_index row,
-                    ForwardIterator               begin,
-                    ForwardIterator               end,
-                    const bool                    indices_are_unique_and_sorted = false);
+  void add_entries (const size_type row,
+                    ForwardIterator begin,
+                    ForwardIterator end,
+                    const bool      indices_are_unique_and_sorted = false);
 
   /**
    * Check if a value at a certain
    * position may be non-zero.
    */
-  bool exists (const types::global_dof_index i,
-               const types::global_dof_index j) const;
+  bool exists (const size_type i,
+               const size_type j) const;
 
   /**
    * Make the sparsity pattern
@@ -283,14 +288,14 @@ public:
    * matrix, which equals the dimension
    * of the image space.
    */
-  types::global_dof_index n_rows () const;
+  size_type n_rows () const;
 
   /**
    * Return number of columns of this
    * matrix, which equals the dimension
    * of the range space.
    */
-  types::global_dof_index n_cols () const;
+  size_type n_cols () const;
 
   /**
    * Number of entries in a
@@ -300,15 +305,15 @@ public:
    * index set of rows that we want
    * to store.
    */
-  unsigned int row_length (const types::global_dof_index row) const;
+  size_type row_length (const size_type row) const;
 
   /**
    * Access to column number field.
    * Return the column number of
    * the @p indexth entry in @p row.
    */
-  unsigned int column_number (const types::global_dof_index row,
-                              const types::global_dof_index index) const;
+  size_type column_number (const size_type row,
+                           const size_type index) const;
 
   /**
    * Return an iterator that can loop over
@@ -316,12 +321,12 @@ public:
    * row. Dereferencing the iterator yields
    * a column index.
    */
-  row_iterator row_begin (const types::global_dof_index row) const;
+  row_iterator row_begin (const size_type row) const;
 
   /**
    * Returns the end of the current row.
    */
-  row_iterator row_end (const types::global_dof_index row) const;
+  row_iterator row_end (const size_type row) const;
   /**
    * Compute the bandwidth of the matrix
    * represented by this structure. The
@@ -330,13 +335,13 @@ public:
    * $(i,j)$ represents a nonzero entry
    * of the matrix.
    */
-  unsigned int bandwidth () const;
+  size_type bandwidth () const;
 
   /**
    * Return the number of nonzero elements
    * allocated through this sparsity pattern.
    */
-  unsigned int n_nonzero_elements () const;
+  size_type n_nonzero_elements () const;
 
   /**
    * Return the IndexSet that sets which
@@ -370,20 +375,20 @@ public:
    * memory consumption (in bytes)
    * of this object.
    */
-  std::size_t memory_consumption () const;
+  size_type memory_consumption () const;
 
 private:
   /**
    * Number of rows that this sparsity
    * structure shall represent.
    */
-  types::global_dof_index rows;
+  size_type rows;
 
   /**
    * Number of columns that this sparsity
    * structure shall represent.
    */
-  types::global_dof_index cols;
+  size_type cols;
 
   /**
    * A set that contains the valid rows.
@@ -409,7 +414,7 @@ private:
      * this row. This array is always
      * kept sorted.
      */
-    std::vector<unsigned int> entries;
+    std::vector<size_type> entries;
 
     /**
      * Constructor.
@@ -420,7 +425,7 @@ private:
      * Add the given column number to
      * this line.
      */
-    void add (const types::global_dof_index col_num);
+    void add (const size_type col_num);
 
     /**
      * Add the columns specified by the
@@ -434,7 +439,7 @@ private:
     /**
      * estimates memory consumption.
      */
-    std::size_t memory_consumption () const;
+    size_type memory_consumption () const;
   };
 
 
@@ -452,7 +457,7 @@ private:
 
 inline
 void
-CompressedSimpleSparsityPattern::Line::add (const types::global_dof_index j)
+CompressedSimpleSparsityPattern::Line::add (const size_type j)
 {
   // first check the last element (or if line
   // is still empty)
@@ -464,7 +469,7 @@ CompressedSimpleSparsityPattern::Line::add (const types::global_dof_index j)
 
   // do a binary search to find the place
   // where to insert:
-  std::vector<unsigned int>::iterator
+  std::vector<size_type>::iterator
   it = Utilities::lower_bound(entries.begin(),
                               entries.end(),
                               j);
@@ -483,7 +488,7 @@ CompressedSimpleSparsityPattern::Line::add (const types::global_dof_index j)
 
 
 inline
-types::global_dof_index
+size_type
 CompressedSimpleSparsityPattern::n_rows () const
 {
   return rows;
@@ -492,7 +497,7 @@ CompressedSimpleSparsityPattern::n_rows () const
 
 
 inline
-types::global_dof_index
+size_type
 CompressedSimpleSparsityPattern::n_cols () const
 {
   return cols;
@@ -502,8 +507,8 @@ CompressedSimpleSparsityPattern::n_cols () const
 
 inline
 void
-CompressedSimpleSparsityPattern::add (const types::global_dof_index i,
-                                      const types::global_dof_index j)
+CompressedSimpleSparsityPattern::add (const size_type i,
+                                      const size_type j)
 {
   Assert (i<rows, ExcIndexRange(i, 0, rows));
   Assert (j<cols, ExcIndexRange(j, 0, cols));
@@ -511,7 +516,7 @@ CompressedSimpleSparsityPattern::add (const types::global_dof_index i,
   if (rowset.size() > 0 && !rowset.is_element(i))
     return;
 
-  const unsigned int rowindex =
+  const size_type rowindex =
     rowset.size()==0 ? i : rowset.index_within_set(i);
   lines[rowindex].add (j);
 }
@@ -521,7 +526,7 @@ CompressedSimpleSparsityPattern::add (const types::global_dof_index i,
 template <typename ForwardIterator>
 inline
 void
-CompressedSimpleSparsityPattern::add_entries (const types::global_dof_index row,
+CompressedSimpleSparsityPattern::add_entries (const size_type row,
                                               ForwardIterator begin,
                                               ForwardIterator end,
                                               const bool      indices_are_sorted)
@@ -531,7 +536,7 @@ CompressedSimpleSparsityPattern::add_entries (const types::global_dof_index row,
   if (rowset.size() > 0 && !rowset.is_element(row))
     return;
 
-  const unsigned int rowindex =
+  const size_type rowindex =
     rowset.size()==0 ? row : rowset.index_within_set(row);
   lines[rowindex].add_entries (begin, end, indices_are_sorted);
 }
@@ -545,14 +550,14 @@ CompressedSimpleSparsityPattern::Line::Line ()
 
 
 inline
-unsigned int
-CompressedSimpleSparsityPattern::row_length (const types::global_dof_index row) const
+size_type 
+CompressedSimpleSparsityPattern::row_length (const size_type row) const
 {
   Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
   if (rowset.size() > 0 && !rowset.is_element(row))
     return 0;
 
-  const unsigned int rowindex =
+  const size_type rowindex =
     rowset.size()==0 ? row : rowset.index_within_set(row);
   return lines[rowindex].entries.size();
 }
@@ -560,14 +565,14 @@ CompressedSimpleSparsityPattern::row_length (const types::global_dof_index row)
 
 
 inline
-unsigned int
-CompressedSimpleSparsityPattern::column_number (const types::global_dof_index row,
-                                                const types::global_dof_index index) const
+size_type 
+CompressedSimpleSparsityPattern::column_number (const size_type row,
+                                                const size_type index) const
 {
   Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
   Assert( rowset.size() == 0 || rowset.is_element(row), ExcInternalError());
 
-  const unsigned int local_row = rowset.size() ? rowset.index_within_set(row) : row;
+  const size_type local_row = rowset.size() ? rowset.index_within_set(row) : row;
   Assert (index < lines[local_row].entries.size(),
           ExcIndexRange (index, 0, lines[local_row].entries.size()));
   return lines[local_row].entries[index];
@@ -577,10 +582,10 @@ CompressedSimpleSparsityPattern::column_number (const types::global_dof_index ro
 
 inline
 CompressedSimpleSparsityPattern::row_iterator
-CompressedSimpleSparsityPattern::row_begin (const types::global_dof_index row) const
+CompressedSimpleSparsityPattern::row_begin (const size_type row) const
 {
   Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
-  const unsigned int local_row = rowset.size() ? rowset.index_within_set(row) : row;
+  const size_type local_row = rowset.size() ? rowset.index_within_set(row) : row;
   return lines[local_row].entries.begin();
 }
 
@@ -588,10 +593,10 @@ CompressedSimpleSparsityPattern::row_begin (const types::global_dof_index row) c
 
 inline
 CompressedSimpleSparsityPattern::row_iterator
-CompressedSimpleSparsityPattern::row_end (const types::global_dof_index row) const
+CompressedSimpleSparsityPattern::row_end (const size_type row) const
 {
   Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
-  const unsigned int local_row = rowset.size() ? rowset.index_within_set(row) : row;
+  const size_type local_row = rowset.size() ? rowset.index_within_set(row) : row;
   return lines[local_row].entries.end();
 }
 
index d0bbf926d86951644accd93a900d050d02643afe..f0a77f0b0a926abfd45608a35e140c8bdfecaf80 100644 (file)
@@ -88,13 +88,18 @@ template <typename number> class SparseMatrix;
 class CompressedSparsityPattern : public Subscriptor
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std::size_t size_type;
+
   /**
    * An iterator that can be used to
    * iterate over the elements of a single
    * row. The result of dereferencing such
    * an iterator is a column index.
    */
-  typedef std::vector<unsigned int>::const_iterator row_iterator;
+  typedef std::vector<size_type>::const_iterator row_iterator;
 
   /**
    * Initialize the matrix empty,
@@ -131,14 +136,14 @@ public:
    * matrix with @p m rows and
    * @p n columns.
    */
-  CompressedSparsityPattern (const types::global_dof_index m,
-                             const types::global_dof_index n);
+  CompressedSparsityPattern (const size_type m,
+                             const size_type n);
 
   /**
    * Initialize a square matrix of
    * dimension @p n.
    */
-  CompressedSparsityPattern (const types::global_dof_index n);
+  CompressedSparsityPattern (const size_type n);
 
   /**
    * Copy operator. For this the
@@ -158,8 +163,8 @@ public:
    * max_entries_per_row() nonzero
    * entries per row.
    */
-  void reinit (const types::global_dof_index m,
-               const types::global_dof_index n);
+  void reinit (const size_type m,
+               const size_type n);
 
   /**
    * Since this object is kept
@@ -187,15 +192,15 @@ public:
    * this number may change as
    * entries are added.
    */
-  unsigned int max_entries_per_row () const;
+  size_type max_entries_per_row () const;
 
   /**
    * Add a nonzero entry to the
    * matrix. If the entry already
    * exists, nothing bad happens.
    */
-  void add (const types::global_dof_index i,
-            const types::global_dof_index j);
+  void add (const size_type i,
+            const size_type j);
 
   /**
    * Add several nonzero entries to the
@@ -204,17 +209,17 @@ public:
    * happens.
    */
   template <typename ForwardIterator>
-  void add_entries (const types::global_dof_index row,
-                    ForwardIterator               begin,
-                    ForwardIterator               end,
-                    const bool                    indices_are_unique_and_sorted = false);
+  void add_entries (const size_type row,
+                    ForwardIterator begin,
+                    ForwardIterator end,
+                    const bool      indices_are_unique_and_sorted = false);
 
   /**
    * Check if a value at a certain
    * position may be non-zero.
    */
-  bool exists (const types::global_dof_index i,
-               const types::global_dof_index j) const;
+  bool exists (const size_type i,
+               const size_type j) const;
 
   /**
    * Make the sparsity pattern
@@ -270,27 +275,27 @@ public:
    * matrix, which equals the dimension
    * of the image space.
    */
-  types::global_dof_index n_rows () const;
+  size_type n_rows () const;
 
   /**
    * Return number of columns of this
    * matrix, which equals the dimension
    * of the range space.
    */
-  types::global_dof_index n_cols () const;
+  size_type n_cols () const;
 
   /**
    * Number of entries in a specific row.
    */
-  unsigned int row_length (const types::global_dof_index row) const;
+  size_type row_length (const size_type row) const;
 
   /**
    * Access to column number field.
    * Return the column number of
    * the @p indexth entry in @p row.
    */
-  unsigned int column_number (const types::global_dof_index row,
-                              const unsigned int            index) const;
+  size_type column_number (const size_type row,
+                           const size_type index) const;
 
   /**
    * Return an iterator that can loop over
@@ -298,12 +303,12 @@ public:
    * row. Dereferencing the iterator yields
    * a column index.
    */
-  row_iterator row_begin (const types::global_dof_index row) const;
+  row_iterator row_begin (const size_type row) const;
 
   /**
    * Returns the end of the current row.
    */
-  row_iterator row_end (const types::global_dof_index row) const;
+  row_iterator row_end (const size_type row) const;
 
   /**
    * Compute the bandwidth of the matrix
@@ -313,14 +318,14 @@ public:
    * $(i,j)$ represents a nonzero entry
    * of the matrix.
    */
-  unsigned int bandwidth () const;
+  size_type bandwidth () const;
 
   /**
    * Return the number of nonzero elements
    * allocated through this sparsity
    * pattern.
    */
-  unsigned int n_nonzero_elements () const;
+  size_type n_nonzero_elements () const;
 
   /**
    * Return whether this object stores only
@@ -345,13 +350,13 @@ private:
    * Number of rows that this sparsity
    * structure shall represent.
    */
-  types::global_dof_index rows;
+  size_type rows;
 
   /**
    * Number of columns that this sparsity
    * structure shall represent.
    */
-  types::global_dof_index cols;
+  size_type cols;
 
   /**
    * Store some data for each row
@@ -447,7 +452,7 @@ private:
      * Add the given column number to
      * this line.
      */
-    void add (const types::global_dof_index col_num);
+    void add (const size_type col_num);
 
     /**
      * Add the columns specified by the
@@ -480,7 +485,7 @@ private:
 
 inline
 void
-CompressedSparsityPattern::Line::add (const types::global_dof_index j)
+CompressedSparsityPattern::Line::add (const size_type j)
 {
   // first check whether this entry is
   // already in the cache. if so, we can
@@ -502,7 +507,7 @@ CompressedSparsityPattern::Line::add (const types::global_dof_index j)
 
 
 inline
-types::global_dof_index
+size_type
 CompressedSparsityPattern::n_rows () const
 {
   return rows;
@@ -511,7 +516,7 @@ CompressedSparsityPattern::n_rows () const
 
 
 inline
-types::global_dof_index
+size_type
 CompressedSparsityPattern::n_cols () const
 {
   return cols;
@@ -521,8 +526,8 @@ CompressedSparsityPattern::n_cols () const
 
 inline
 void
-CompressedSparsityPattern::add (const types::global_dof_index i,
-                                const types::global_dof_index j)
+CompressedSparsityPattern::add (const size_type i,
+                                const size_type j)
 {
   Assert (i<rows, ExcIndexRange(i, 0, rows));
   Assert (j<cols, ExcIndexRange(j, 0, cols));
@@ -535,7 +540,7 @@ CompressedSparsityPattern::add (const types::global_dof_index i,
 template <typename ForwardIterator>
 inline
 void
-CompressedSparsityPattern::add_entries (const types::global_dof_index row,
+CompressedSparsityPattern::add_entries (const size_type row,
                                         ForwardIterator begin,
                                         ForwardIterator end,
                                         const bool      indices_are_sorted)
@@ -556,8 +561,8 @@ CompressedSparsityPattern::Line::Line ()
 
 
 inline
-unsigned int
-CompressedSparsityPattern::row_length (const types::global_dof_index row) const
+size_type 
+CompressedSparsityPattern::row_length (const size_type row) const
 {
   Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
 
@@ -569,9 +574,9 @@ CompressedSparsityPattern::row_length (const types::global_dof_index row) const
 
 
 inline
-unsigned int
-CompressedSparsityPattern::column_number (const types::global_dof_index row,
-                                          const unsigned int            index) const
+size_type 
+CompressedSparsityPattern::column_number (const size_type row,
+                                          const size_type index) const
 {
   Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
   Assert (index < lines[row].entries.size(),
@@ -586,7 +591,7 @@ CompressedSparsityPattern::column_number (const types::global_dof_index row,
 
 inline
 CompressedSparsityPattern::row_iterator
-CompressedSparsityPattern::row_begin (const types::global_dof_index row) const
+CompressedSparsityPattern::row_begin (const size_type row) const
 {
   Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
 
@@ -599,7 +604,7 @@ CompressedSparsityPattern::row_begin (const types::global_dof_index row) const
 
 inline
 CompressedSparsityPattern::row_iterator
-CompressedSparsityPattern::row_end (const types::global_dof_index row) const
+CompressedSparsityPattern::row_end (const size_type row) const
 {
   Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
   return lines[row].entries.end();
index 3f7f3eb56cb75c378d6f9ba9fa71caf5053c9fe5..e8a1c7cf8e478d0f36cacb2bc71530b6dc0fc3c6 100644 (file)
@@ -54,8 +54,8 @@ namespace internals
 
 
 //TODO[WB]: We should have a function of the kind
-//   ConstraintMatrix::add_constraint (const types::global_dof_index constrained_dof,
-//                const std::vector<std::pair<types::global_dof_index, double> > &entries,
+//   ConstraintMatrix::add_constraint (const size_type constrained_dof,
+//                const std::vector<std::pair<size_type, double> > &entries,
 //                const double inhomogeneity = 0);
 // rather than building up constraints piecemeal through add_line/add_entry
 // etc. This would also eliminate the possibility of accidentally changing
@@ -139,6 +139,11 @@ namespace internals
 class ConstraintMatrix : public Subscriptor
 {
 public:
+  /**
+   * Declare the type for container size.
+   */
+  typedef std::size_t size_type;
+
   /**
    * An enum that describes what should
    * happen if the two ConstraintMatrix
@@ -221,7 +226,7 @@ public:
    * line. Always returns true if not in
    * the distributed case.
    */
-  bool can_store_line (const types::global_dof_index line_index) const;
+  bool can_store_line (const size_type line_index) const;
 
   /**
    * This function copies the content of @p
@@ -271,7 +276,7 @@ public:
    * line already exists, then the function
    * simply returns without doing anything.
    */
-  void add_line (const types::global_dof_index line);
+  void add_line (const size_type line);
 
   /**
    * Call the first add_line() function for
@@ -315,7 +320,7 @@ public:
    * inhomogeneities using
    * set_inhomogeneity().
    */
-  void add_lines (const std::set<types::global_dof_index> &lines);
+  void add_lines (const std::set<size_type> &lines);
 
   /**
    * Call the first add_line() function for
@@ -360,8 +365,8 @@ public:
    * same. Thus, it does no harm to
    * enter a constraint twice.
    */
-  void add_entry (const types::global_dof_index line,
-                  const types::global_dof_index column,
+  void add_entry (const size_type line,
+                  const size_type column,
                   const double value);
 
   /**
@@ -373,8 +378,8 @@ public:
    * function several times, but is
    * faster.
    */
-  void add_entries (const types::global_dof_index                                  line,
-                    const std::vector<std::pair<types::global_dof_index,double> > &col_val_pairs);
+  void add_entries (const size_type                                  line,
+                    const std::vector<std::pair<size_type,double> > &col_val_pairs);
 
   /**
    * Set an imhomogeneity to the
@@ -385,8 +390,8 @@ public:
    * @note the line needs to be added with
    * one of the add_line() calls first.
    */
-  void set_inhomogeneity (const types::global_dof_index line,
-                          const double       value);
+  void set_inhomogeneity (const size_type line,
+                          const double    value);
 
   /**
    * Close the filling of entries. Since
@@ -471,7 +476,7 @@ public:
    * finally merge() them together
    * again.
    */
-  void shift (const types::global_dof_index offset);
+  void shift (const size_type offset);
 
   /**
    * Clear all entries of this
@@ -499,7 +504,7 @@ public:
    * Return number of constraints stored in
    * this matrix.
    */
-  unsigned int n_constraints () const;
+  size_type n_constraints () const;
 
   /**
    * Return whether the degree of freedom
@@ -515,7 +520,7 @@ public:
    * called, we have to perform a linear
    * search through all entries.
    */
-  bool is_constrained (const types::global_dof_index index) const;
+  bool is_constrained (const size_type index) const;
 
   /**
    * Return whether the dof is
@@ -536,7 +541,7 @@ public:
    * freedom but with a weight different
    * from one.
    */
-  bool is_identity_constrained (const types::global_dof_index index) const;
+  bool is_identity_constrained (const size_type index) const;
 
   /**
    * Return the maximum number of other
@@ -555,7 +560,7 @@ public:
    * constrained node are indirected to
    * the nodes it is constrained to.
    */
-  unsigned int max_constraint_indirections () const;
+  size_type max_constraint_indirections () const;
 
   /**
    * Returns <tt>true</tt> in case the
@@ -563,7 +568,7 @@ public:
    * non-trivial inhomogeneous valeus set
    * to the dof.
    */
-  bool is_inhomogeneously_constrained (const types::global_dof_index index) const;
+  bool is_inhomogeneously_constrained (const size_type index) const;
 
   /**
    * Returns <tt>false</tt> if all
@@ -580,8 +585,8 @@ public:
    * zero pointer in case the dof is not
    * constrained.
    */
-  const std::vector<std::pair<types::global_dof_index,double> > *
-  get_constraint_entries (const types::global_dof_index line) const;
+  const std::vector<std::pair<size_type,double> > *
+  get_constraint_entries (const size_type line) const;
 
   /**
    * Returns the value of the inhomogeneity
@@ -589,7 +594,7 @@ public:
    * line. Unconstrained dofs also return a
    * zero value.
    */
-  double get_inhomogeneity (const types::global_dof_index line) const;
+  double get_inhomogeneity (const size_type line) const;
 
   /**
    * Print the constraint lines. Mainly
@@ -631,7 +636,7 @@ public:
    * consumption (in bytes) of this
    * object.
    */
-  std::size_t memory_consumption () const;
+  size_type memory_consumption () const;
 
   /**
    * @}
@@ -985,9 +990,9 @@ public:
    */
   template <class InVector, class OutVector>
   void
-  distribute_local_to_global (const InVector                  &local_vector,
-                              const std::vector<types::global_dof_index> &local_dof_indices,
-                              OutVector                       &global_vector) const;
+  distribute_local_to_global (const InVector               &local_vector,
+                              const std::vector<size_type> &local_dof_indices,
+                              OutVector                    &global_vector) const;
 
   /**
    * This function takes a vector of
@@ -1062,10 +1067,10 @@ public:
    */
   template <typename VectorType>
   void
-  distribute_local_to_global (const Vector<double>            &local_vector,
-                              const std::vector<types::global_dof_index> &local_dof_indices,
-                              VectorType                      &global_vector,
-                              const FullMatrix<double>        &local_matrix) const;
+  distribute_local_to_global (const Vector<double>         &local_vector,
+                              const std::vector<size_type> &local_dof_indices,
+                              VectorType                   &global_vector,
+                              const FullMatrix<double>     &local_matrix) const;
 
   /**
    * Enter a single value into a
@@ -1073,9 +1078,9 @@ public:
    */
   template <class VectorType>
   void
-  distribute_local_to_global (const unsigned int index,
-                              const double       value,
-                              VectorType        &global_vector) const;
+  distribute_local_to_global (const size_type index,
+                              const double    value,
+                              VectorType     &global_vector) const;
 
   /**
    * This function takes a pointer to a
@@ -1195,9 +1200,9 @@ public:
    */
   template <typename MatrixType>
   void
-  distribute_local_to_global (const FullMatrix<double>        &local_matrix,
-                              const std::vector<types::global_dof_index> &local_dof_indices,
-                              MatrixType                      &global_matrix) const;
+  distribute_local_to_global (const FullMatrix<double>     &local_matrix,
+                              const std::vector<size_type> &local_dof_indices,
+                              MatrixType                   &global_matrix) const;
 
   /**
    * Does the same as the function
@@ -1206,10 +1211,10 @@ public:
    */
   template <typename MatrixType>
   void
-  distribute_local_to_global (const FullMatrix<double>        &local_matrix,
-                              const std::vector<types::global_dof_index> &row_indices,
-                              const std::vector<types::global_dof_index> &col_indices,
-                              MatrixType                      &global_matrix) const;
+  distribute_local_to_global (const FullMatrix<double>     &local_matrix,
+                              const std::vector<size_type> &row_indices,
+                              const std::vector<size_type> &col_indices,
+                              MatrixType                   &global_matrix) const;
 
   /**
    * This function simultaneously
@@ -1231,12 +1236,12 @@ public:
    */
   template <typename MatrixType, typename VectorType>
   void
-  distribute_local_to_global (const FullMatrix<double>        &local_matrix,
-                              const Vector<double>            &local_vector,
-                              const std::vector<types::global_dof_index> &local_dof_indices,
-                              MatrixType                      &global_matrix,
-                              VectorType                      &global_vector,
-                              bool                            use_inhomogeneities_for_rhs = false) const;
+  distribute_local_to_global (const FullMatrix<double>      &local_matrix,
+                              const Vector<double>          &local_vector,
+                              const std::vector<size_type>  &local_dof_indices,
+                              MatrixType                    &global_matrix,
+                              VectorType                    &global_vector,
+                              bool                          use_inhomogeneities_for_rhs = false) const;
 
   /**
    * Do a similar operation as the
@@ -1319,9 +1324,9 @@ public:
    */
   template <typename SparsityType>
   void
-  add_entries_local_to_global (const std::vector<types::global_dof_index> &local_dof_indices,
-                               SparsityType                    &sparsity_pattern,
-                               const bool                       keep_constrained_entries = true,
+  add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
+                               SparsityType                 &sparsity_pattern,
+                               const bool                    keep_constrained_entries = true,
                                const Table<2,bool>             &dof_mask = default_empty_table) const;
 
   /**
@@ -1332,11 +1337,11 @@ public:
 
   template <typename SparsityType>
   void
-  add_entries_local_to_global (const std::vector<types::global_dof_index> &row_indices,
-                               const std::vector<types::global_dof_index> &col_indices,
-                               SparsityType                    &sparsity_pattern,
-                               const bool                       keep_constrained_entries = true,
-                               const Table<2,bool>             &dof_mask = default_empty_table) const;
+  add_entries_local_to_global (const std::vector<size_type> &row_indices,
+                               const std::vector<size_type> &col_indices,
+                               SparsityType                 &sparsity_pattern,
+                               const bool                    keep_constrained_entries = true,
+                               const Table<2,bool>          &dof_mask = default_empty_table) const;
 
   /**
    * This function imports values from a
@@ -1451,7 +1456,7 @@ public:
    * @ingroup Exceptions
    */
   DeclException1 (ExcLineInexistant,
-                  types::global_dof_index,
+                  size_type,
                   << "The specified line " << arg1
                   << " does not exist.");
   /**
@@ -1520,7 +1525,7 @@ private:
      * of entries that make up the homogenous
      * part of a constraint.
      */
-    typedef std::vector<std::pair<types::global_dof_index,double> > Entries;
+    typedef std::vector<std::pair<size_type,double> > Entries;
 
     /**
      * Number of this line. Since only
@@ -1529,7 +1534,7 @@ private:
      * and have to store the line
      * number explicitly.
      */
-    types::global_dof_index line;
+    size_type line;
 
     /**
      * Row numbers and values of the
@@ -1601,7 +1606,7 @@ private:
   std::vector<ConstraintLine> lines;
 
   /**
-   * A list of unsigned integers that
+   * A list of size_type that
    * contains the position of the
    * ConstraintLine of a constrained degree
    * of freedom, or
@@ -1658,7 +1663,7 @@ private:
    * contributions into vectors and
    * matrices.
    */
-  std::vector<types::global_dof_index> lines_cache;
+  std::vector<size_type> lines_cache;
 
   /**
    * This IndexSet is used to limit the
@@ -1681,7 +1686,7 @@ private:
    * index of line @p line in the vector
    * lines_cache using local_lines.
    */
-  unsigned int calculate_line_index (const types::global_dof_index line) const;
+  size_type calculate_line_index (const size_type line) const;
 
   /**
    * Return @p true if the weight of an
@@ -1690,7 +1695,7 @@ private:
    * used to delete entries with zero
    * weight.
    */
-  static bool check_zero_weight (const std::pair<types::global_dof_index, double> &p);
+  static bool check_zero_weight (const std::pair<size_type, double> &p);
 
   /**
    * Dummy table that serves as default
@@ -1706,12 +1711,12 @@ private:
    */
   template <typename MatrixType, typename VectorType>
   void
-  distribute_local_to_global (const FullMatrix<double>        &local_matrix,
-                              const Vector<double>            &local_vector,
-                              const std::vector<types::global_dof_index> &local_dof_indices,
-                              MatrixType                      &global_matrix,
-                              VectorType                      &global_vector,
-                              bool                            use_inhomogeneities_for_rhs,
+  distribute_local_to_global (const FullMatrix<double>     &local_matrix,
+                              const Vector<double>         &local_vector,
+                              const std::vector<size_type> &local_dof_indices,
+                              MatrixType                   &global_matrix,
+                              VectorType                   &global_vector,
+                              bool                          use_inhomogeneities_for_rhs,
                               internal::bool2type<false>) const;
 
   /**
@@ -1721,12 +1726,12 @@ private:
    */
   template <typename MatrixType, typename VectorType>
   void
-  distribute_local_to_global (const FullMatrix<double>        &local_matrix,
-                              const Vector<double>            &local_vector,
-                              const std::vector<types::global_dof_index> &local_dof_indices,
-                              MatrixType                      &global_matrix,
-                              VectorType                      &global_vector,
-                              bool                            use_inhomogeneities_for_rhs,
+  distribute_local_to_global (const FullMatrix<double>     &local_matrix,
+                              const Vector<double>         &local_vector,
+                              const std::vector<size_type> &local_dof_indices,
+                              MatrixType                   &global_matrix,
+                              VectorType                   &global_vector,
+                              bool                          use_inhomogeneities_for_rhs,
                               internal::bool2type<true>) const;
 
   /**
@@ -1736,10 +1741,10 @@ private:
    */
   template <typename SparsityType>
   void
-  add_entries_local_to_global (const std::vector<types::global_dof_index> &local_dof_indices,
-                               SparsityType                    &sparsity_pattern,
-                               const bool                       keep_constrained_entries,
-                               const Table<2,bool>             &dof_mask,
+  add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
+                               SparsityType                 &sparsity_pattern,
+                               const bool                    keep_constrained_entries,
+                               const Table<2,bool>          &dof_mask,
                                internal::bool2type<false>) const;
 
   /**
@@ -1749,10 +1754,10 @@ private:
    */
   template <typename SparsityType>
   void
-  add_entries_local_to_global (const std::vector<types::global_dof_index> &local_dof_indices,
-                               SparsityType                    &sparsity_pattern,
-                               const bool                       keep_constrained_entries,
-                               const Table<2,bool>             &dof_mask,
+  add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
+                               SparsityType                 &sparsity_pattern,
+                               const bool                    keep_constrained_entries,
+                               const Table<2,bool>          &dof_mask,
                                internal::bool2type<true>) const;
 
   /**
@@ -1766,7 +1771,7 @@ private:
    * row indices.
    */
   void
-  make_sorted_row_list (const std::vector<types::global_dof_index> &local_dof_indices,
+  make_sorted_row_list (const std::vector<size_type> &local_dof_indices,
                         internals::GlobalRowsFromLocal &global_rows) const;
 
   /**
@@ -1780,18 +1785,18 @@ private:
    * function.
    */
   void
-  make_sorted_row_list (const std::vector<types::global_dof_index> &local_dof_indices,
-                        std::vector<types::global_dof_index>       &active_dofs) const;
+  make_sorted_row_list (const std::vector<size_type> &local_dof_indices,
+                        std::vector<size_type>       &active_dofs) const;
 
   /**
    * Internal helper function for
    * distribute_local_to_global function.
    */
   double
-  resolve_vector_entry (const types::global_dof_index                    i,
+  resolve_vector_entry (const size_type                       i,
                         const internals::GlobalRowsFromLocal &global_rows,
                         const Vector<double>                 &local_vector,
-                        const std::vector<types::global_dof_index>      &local_dof_indices,
+                        const std::vector<size_type>         &local_dof_indices,
                         const FullMatrix<double>             &local_matrix) const;
 };
 
@@ -1822,7 +1827,7 @@ ConstraintMatrix::ConstraintMatrix (const ConstraintMatrix &constraint_matrix)
 
 inline
 void
-ConstraintMatrix::add_line (const types::global_dof_index line)
+ConstraintMatrix::add_line (const size_type line)
 {
   Assert (sorted==false, ExcMatrixIsClosed());
 
@@ -1838,7 +1843,7 @@ ConstraintMatrix::add_line (const types::global_dof_index line)
   // :-)
   Assert (line != numbers::invalid_unsigned_int,
           ExcInternalError());
-  const unsigned int line_index = calculate_line_index (line);
+  const size_type line_index = calculate_line_index (line);
 
   // check whether line already exists; it
   // may, in which case we can just quit
@@ -1848,7 +1853,7 @@ ConstraintMatrix::add_line (const types::global_dof_index line)
   // if necessary enlarge vector of
   // existing entries for cache
   if (line_index >= lines_cache.size())
-    lines_cache.resize (std::max(2*static_cast<unsigned int>(lines_cache.size()),
+    lines_cache.resize (std::max(2*static_cast<size_type>(lines_cache.size()),
                                  line_index+1),
                         numbers::invalid_unsigned_int);
 
@@ -1864,9 +1869,9 @@ ConstraintMatrix::add_line (const types::global_dof_index line)
 
 inline
 void
-ConstraintMatrix::add_entry (const types::global_dof_index line,
-                             const types::global_dof_index column,
-                             const double       value)
+ConstraintMatrix::add_entry (const size_type line,
+                             const size_type column,
+                             const double    value)
 {
   Assert (sorted==false, ExcMatrixIsClosed());
   Assert (line != column,
@@ -1901,10 +1906,10 @@ ConstraintMatrix::add_entry (const types::global_dof_index line,
 
 inline
 void
-ConstraintMatrix::set_inhomogeneity (const types::global_dof_index line,
-                                     const double       value)
+ConstraintMatrix::set_inhomogeneity (const size_type line,
+                                     const double    value)
 {
-  const unsigned int line_index = calculate_line_index(line);
+  const size_type line_index = calculate_line_index(line);
   Assert( line_index < lines_cache.size() &&
           lines_cache[line_index] != numbers::invalid_unsigned_int,
           ExcMessage("call add_line() before calling set_inhomogeneity()"));
@@ -1916,7 +1921,7 @@ ConstraintMatrix::set_inhomogeneity (const types::global_dof_index line,
 
 
 inline
-unsigned int
+size_type 
 ConstraintMatrix::n_constraints () const
 {
   return lines.size();
@@ -1926,9 +1931,9 @@ ConstraintMatrix::n_constraints () const
 
 inline
 bool
-ConstraintMatrix::is_constrained (const types::global_dof_index index) const
+ConstraintMatrix::is_constrained (const size_type index) const
 {
-  const unsigned int line_index = calculate_line_index(index);
+  const size_type line_index = calculate_line_index(index);
   return ((line_index < lines_cache.size())
           &&
           (lines_cache[line_index] != numbers::invalid_unsigned_int));
@@ -1938,12 +1943,12 @@ ConstraintMatrix::is_constrained (const types::global_dof_index index) const
 
 inline
 bool
-ConstraintMatrix::is_inhomogeneously_constrained (const types::global_dof_index index) const
+ConstraintMatrix::is_inhomogeneously_constrained (const size_type index) const
 {
   // check whether the entry is
   // constrained. could use is_constrained, but
   // that means computing the line index twice
-  const unsigned int line_index = calculate_line_index(index);
+  const size_type line_index = calculate_line_index(index);
   if (line_index >= lines_cache.size() ||
       lines_cache[line_index] == numbers::invalid_unsigned_int)
     return false;
@@ -1957,13 +1962,13 @@ ConstraintMatrix::is_inhomogeneously_constrained (const types::global_dof_index
 
 
 inline
-const std::vector<std::pair<types::global_dof_index,double> > *
-ConstraintMatrix::get_constraint_entries (const types::global_dof_index line) const
+const std::vector<std::pair<size_type,double> > *
+ConstraintMatrix::get_constraint_entries (const size_type line) const
 {
   // check whether the entry is
   // constrained. could use is_constrained, but
   // that means computing the line index twice
-  const unsigned int line_index = calculate_line_index(line);
+  const size_type line_index = calculate_line_index(line);
   if (line_index >= lines_cache.size() ||
       lines_cache[line_index] == numbers::invalid_unsigned_int)
     return 0;
@@ -1975,12 +1980,12 @@ ConstraintMatrix::get_constraint_entries (const types::global_dof_index line) co
 
 inline
 double
-ConstraintMatrix::get_inhomogeneity (const types::global_dof_index line) const
+ConstraintMatrix::get_inhomogeneity (const size_type line) const
 {
   // check whether the entry is
   // constrained. could use is_constrained, but
   // that means computing the line index twice
-  const unsigned int line_index = calculate_line_index(line);
+  const size_type line_index = calculate_line_index(line);
   if (line_index >= lines_cache.size() ||
       lines_cache[line_index] == numbers::invalid_unsigned_int)
     return 0;
@@ -1990,8 +1995,8 @@ ConstraintMatrix::get_inhomogeneity (const types::global_dof_index line) const
 
 
 
-inline unsigned int
-ConstraintMatrix::calculate_line_index (const types::global_dof_index line) const
+inline size_type 
+ConstraintMatrix::calculate_line_index (const size_type line) const
 {
   //IndexSet is unused (serial case)
   if (!local_lines.size())
@@ -2006,7 +2011,7 @@ ConstraintMatrix::calculate_line_index (const types::global_dof_index line) cons
 
 
 inline bool
-ConstraintMatrix::can_store_line (types::global_dof_index line_index) const
+ConstraintMatrix::can_store_line (size_type line_index) const
 {
   return !local_lines.size() || local_lines.is_element(line_index);
 }
@@ -2016,9 +2021,9 @@ ConstraintMatrix::can_store_line (types::global_dof_index line_index) const
 template <class VectorType>
 inline
 void ConstraintMatrix::distribute_local_to_global (
-  const types::global_dof_index index,
-  const double       value,
-  VectorType        &global_vector) const
+  const size_type index,
+  const double    value,
+  VectorType     &global_vector) const
 {
   Assert (lines.empty() || sorted == true, ExcMatrixNotClosed());
 
@@ -2028,7 +2033,7 @@ void ConstraintMatrix::distribute_local_to_global (
     {
       const ConstraintLine &position =
         lines[lines_cache[calculate_line_index(index)]];
-      for (unsigned int j=0; j<position.entries.size(); ++j)
+      for (size_type j=0; j<position.entries.size(); ++j)
         global_vector(position.entries[j].first)
         += value * position.entries[j].second;
     }
@@ -2054,7 +2059,7 @@ void ConstraintMatrix::distribute_local_to_global (
         {
           const ConstraintLine &position =
             lines[lines_cache[calculate_line_index(*local_indices_begin)]];
-          for (unsigned int j=0; j<position.entries.size(); ++j)
+          for (size_type j=0; j<position.entries.size(); ++j)
             global_vector(position.entries[j].first)
             += *local_vector_begin * position.entries[j].second;
         }
@@ -2066,9 +2071,9 @@ template <class InVector, class OutVector>
 inline
 void
 ConstraintMatrix::distribute_local_to_global (
-  const InVector                  &local_vector,
-  const std::vector<unsigned int> &local_dof_indices,
-  OutVector                       &global_vector) const
+  const InVector               &local_vector,
+  const std::vector<size_type> &local_dof_indices,
+  OutVector                    &global_vector) const
 {
   Assert (local_vector.size() == local_dof_indices.size(),
           ExcDimensionMismatch(local_vector.size(), local_dof_indices.size()));
@@ -2097,7 +2102,7 @@ void ConstraintMatrix::get_dof_values (const VectorType &global_vector,
           const ConstraintLine &position =
             lines[lines_cache[calculate_line_index(*local_indices_begin)]];
           typename VectorType::value_type value = position.inhomogeneity;
-          for (unsigned int j=0; j<position.entries.size(); ++j)
+          for (size_type j=0; j<position.entries.size(); ++j)
             value += (global_vector(position.entries[j].first) *
                       position.entries[j].second);
           *local_vector_begin = value;
@@ -2111,9 +2116,9 @@ template <typename MatrixType>
 inline
 void
 ConstraintMatrix::
-distribute_local_to_global (const FullMatrix<double>        &local_matrix,
-                            const std::vector<types::global_dof_index> &local_dof_indices,
-                            MatrixType                      &global_matrix) const
+distribute_local_to_global (const FullMatrix<double>     &local_matrix,
+                            const std::vector<size_type> &local_dof_indices,
+                            MatrixType                   &global_matrix) const
 {
   // create a dummy and hand on to the
   // function actually implementing this
@@ -2130,12 +2135,12 @@ template <typename MatrixType, typename VectorType>
 inline
 void
 ConstraintMatrix::
-distribute_local_to_global (const FullMatrix<double>        &local_matrix,
-                            const Vector<double>            &local_vector,
-                            const std::vector<types::global_dof_index> &local_dof_indices,
-                            MatrixType                      &global_matrix,
-                            VectorType                      &global_vector,
-                            bool                            use_inhomogeneities_for_rhs) const
+distribute_local_to_global (const FullMatrix<double>     &local_matrix,
+                            const Vector<double>         &local_vector,
+                            const std::vector<size_type> &local_dof_indices,
+                            MatrixType                   &global_matrix,
+                            VectorType                   &global_vector,
+                            bool                          use_inhomogeneities_for_rhs) const
 {
   // enter the internal function with the
   // respective block information set, the
@@ -2152,10 +2157,10 @@ template <typename SparsityType>
 inline
 void
 ConstraintMatrix::
-add_entries_local_to_global (const std::vector<types::global_dof_index> &local_dof_indices,
-                             SparsityType                    &sparsity_pattern,
-                             const bool                       keep_constrained_entries,
-                             const Table<2,bool>             &dof_mask) const
+add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
+                             SparsityType                 &sparsity_pattern,
+                             const bool                    keep_constrained_entries,
+                             const Table<2,bool>          &dof_mask) const
 {
   // enter the internal function with the
   // respective block information set, the
index 29aa3e2da0ac60d1059228d31e2f771245e7e3cb..7dc2082af79eb42096c34477073e96ff12b44216 100644 (file)
@@ -80,15 +80,15 @@ ConstraintMatrix::condense (const VectorType &uncondensed,
   new_line.reserve (uncondensed.size());
 
   std::vector<ConstraintLine>::const_iterator next_constraint = lines.begin();
-  unsigned int                                shift           = 0;
-  unsigned int n_rows = uncondensed.size();
+  size_type                                   shift           = 0;
+  size_type n_rows = uncondensed.size();
 
   if (next_constraint == lines.end())
     // if no constraint is to be handled
-    for (unsigned int row=0; row!=n_rows; ++row)
+    for (size_type row=0; row!=n_rows; ++row)
       new_line.push_back (row);
   else
-    for (unsigned int row=0; row!=n_rows; ++row)
+    for (size_type row=0; row!=n_rows; ++row)
       if (row == next_constraint->line)
         {
           // this line is constrained
@@ -100,7 +100,7 @@ ConstraintMatrix::condense (const VectorType &uncondensed,
             // nothing more to do; finish rest
             // of loop
             {
-              for (unsigned int i=row+1; i<n_rows; ++i)
+              for (size_type i=row+1; i<n_rows; ++i)
                 new_line.push_back (i-shift);
               break;
             };
@@ -116,7 +116,7 @@ ConstraintMatrix::condense (const VectorType &uncondensed,
   // only evaluated so often as there are
   // entries in new_line[*] which tells us
   // which constraints exist
-  for (unsigned int row=0; row<uncondensed.size(); ++row)
+  for (size_type row=0; row<uncondensed.size(); ++row)
     if (new_line[row] != -1)
       // line not constrained
       // copy entry
@@ -125,7 +125,7 @@ ConstraintMatrix::condense (const VectorType &uncondensed,
     else
       // line must be distributed
       {
-        for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
+        for (size_type q=0; q!=next_constraint->entries.size(); ++q)
           condensed(new_line[next_constraint->entries[q].first])
           +=
             uncondensed(row) * next_constraint->entries[q].second;
@@ -159,7 +159,7 @@ ConstraintMatrix::condense (VectorType &vec) const
                           "without any matrix specified."));
 
       const typename VectorType::value_type old_value = vec(constraint_line->line);
-      for (unsigned int q=0; q!=constraint_line->entries.size(); ++q)
+      for (size_type q=0; q!=constraint_line->entries.size(); ++q)
         if (vec.in_local_range(constraint_line->entries[q].first) == true)
           vec(constraint_line->entries[q].first)
           += (static_cast<typename VectorType::value_type>
@@ -219,15 +219,15 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
   new_line.reserve (uncondensed_struct.n_rows());
 
   std::vector<ConstraintLine>::const_iterator next_constraint = lines.begin();
-  unsigned int                                shift           = 0;
-  const unsigned int n_rows = uncondensed_struct.n_rows();
+  size_type                                   shift           = 0;
+  const size_type n_rows = uncondensed_struct.n_rows();
 
   if (next_constraint == lines.end())
     // if no constraint is to be handled
-    for (unsigned int row=0; row!=n_rows; ++row)
+    for (size_type row=0; row!=n_rows; ++row)
       new_line.push_back (row);
   else
-    for (unsigned int row=0; row!=n_rows; ++row)
+    for (size_type row=0; row!=n_rows; ++row)
       if (row == next_constraint->line)
         {
           // this line is constrained
@@ -239,7 +239,7 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
             // nothing more to do; finish rest
             // of loop
             {
-              for (unsigned int i=row+1; i<n_rows; ++i)
+              for (size_type i=row+1; i<n_rows; ++i)
                 new_line.push_back (i-shift);
               break;
             };
@@ -256,7 +256,7 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
   // only evaluated so often as there are
   // entries in new_line[*] which tells us
   // which constraints exist
-  for (unsigned int row=0; row<uncondensed_struct.n_rows(); ++row)
+  for (size_type row=0; row<uncondensed_struct.n_rows(); ++row)
     if (new_line[row] != -1)
       {
         // line not constrained
@@ -278,7 +278,7 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
               while (c->line != p->column())
                 ++c;
 
-              for (unsigned int q=0; q!=c->entries.size(); ++q)
+              for (size_type q=0; q!=c->entries.size(); ++q)
                 // distribute to rows with
                 // appropriate weight
                 condensed.add (new_line[row], new_line[c->entries[q].first],
@@ -307,7 +307,7 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
           // for each column: distribute
           if (new_line[p->column()] != -1)
             // column is not constrained
-            for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
+            for (size_type q=0; q!=next_constraint->entries.size(); ++q)
               condensed.add (new_line[next_constraint->entries[q].first],
                              new_line[p->column()],
                              p->value() *
@@ -323,8 +323,8 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
               while (c->line != p->column())
                 ++c;
 
-              for (unsigned int r=0; r!=c->entries.size(); ++r)
-                for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
+              for (size_type r=0; r!=c->entries.size(); ++r)
+                for (size_type q=0; q!=next_constraint->entries.size(); ++q)
                   condensed.add (new_line[next_constraint->entries[q].first],
                                  new_line[c->entries[r].first],
                                  p->value() *
@@ -332,7 +332,7 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
                                  c->entries[r].second);
 
               if (use_vectors == true)
-                for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
+                for (size_type q=0; q!=next_constraint->entries.size(); ++q)
                   condensed_vector (new_line[next_constraint->entries[q].first])
                   -= p->value() *
                      next_constraint->entries[q].second *
@@ -341,7 +341,7 @@ ConstraintMatrix::condense (const SparseMatrix<number> &uncondensed,
 
         // condense the vector
         if (use_vectors == true)
-          for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
+          for (size_type q=0; q!=next_constraint->entries.size(); ++q)
             condensed_vector(new_line[next_constraint->entries[q].first])
             +=
               uncondensed_vector(row) * next_constraint->entries[q].second;
@@ -372,33 +372,33 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed,
     AssertDimension (vec.size(), sparsity.n_rows());
 
   double average_diagonal = 0;
-  for (unsigned int i=0; i<uncondensed.m(); ++i)
+  for (size_type i=0; i<uncondensed.m(); ++i)
     average_diagonal += std::fabs (uncondensed.diag_element(i));
   average_diagonal /= uncondensed.m();
 
   // store for each index whether it must be
   // distributed or not. If entry is
-  // invalid_unsigned_int, no distribution is
+  // invalid_size_type, no distribution is
   // necessary.  otherwise, the number states
   // which line in the constraint matrix
   // handles this index
-  std::vector<unsigned int> distribute (sparsity.n_rows(),
-                                        numbers::invalid_unsigned_int);
+  std::vector<size_type> distribute (sparsity.n_rows(),
+                                        numbers::invalid_size_type);
 
-  for (unsigned int c=0; c<lines.size(); ++c)
+  for (size_type c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
-  const unsigned int n_rows = sparsity.n_rows();
-  for (unsigned int row=0; row<n_rows; ++row)
+  const size_type n_rows = sparsity.n_rows();
+  for (size_type row=0; row<n_rows; ++row)
     {
-      if (distribute[row] == numbers::invalid_unsigned_int)
+      if (distribute[row] == numbers::invalid_size_type)
         // regular line. loop over cols
         {
           for (typename SparseMatrix<number>::iterator
                entry = uncondensed.begin(row);
                entry != uncondensed.end(row); ++entry)
             {
-              const types::global_dof_index column = entry->column();
+              const size_type column = entry->column();
 
               // end of row reached?
               // this should not
@@ -408,7 +408,7 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed,
               Assert (column != SparsityPattern::invalid_entry,
                       ExcMatrixNotClosed());
 
-              if (distribute[column] != numbers::invalid_unsigned_int)
+              if (distribute[column] != numbers::invalid_size_type)
                 // distribute entry at
                 // regular row @p row
                 // and irregular column
@@ -416,7 +416,7 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed,
                 // set old entry to
                 // zero
                 {
-                  for (unsigned int q=0;
+                  for (size_type q=0;
                        q!=lines[distribute[column]].entries.size(); ++q)
                     uncondensed.add (row,
                                      lines[distribute[column]].entries[q].first,
@@ -444,7 +444,7 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed,
                entry = uncondensed.begin(row);
                entry != uncondensed.end(row); ++entry)
             {
-              const types::global_dof_index column = entry->column();
+              const size_type column = entry->column();
 
               // end of row reached?
               // this should not
@@ -454,7 +454,7 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed,
               Assert (column != SparsityPattern::invalid_entry,
                       ExcMatrixNotClosed());
 
-              if (distribute[column] == numbers::invalid_unsigned_int)
+              if (distribute[column] == numbers::invalid_size_type)
                 // distribute entry at
                 // irregular row
                 // @p row and regular
@@ -462,7 +462,7 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed,
                 // column. set
                 // old entry to zero
                 {
-                  for (unsigned int q=0;
+                  for (size_type q=0;
                        q!=lines[distribute[row]].entries.size(); ++q)
                     uncondensed.add (lines[distribute[row]].entries[q].first,
                                      column,
@@ -480,9 +480,9 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed,
                 // to one on main
                 // diagonal, zero otherwise
                 {
-                  for (unsigned int p=0; p!=lines[distribute[row]].entries.size(); ++p)
+                  for (size_type p=0; p!=lines[distribute[row]].entries.size(); ++p)
                     {
-                      for (unsigned int q=0;
+                      for (size_type q=0;
                            q!=lines[distribute[column]].entries.size(); ++q)
                         uncondensed.add (lines[distribute[row]].entries[p].first,
                                          lines[distribute[column]].entries[q].first,
@@ -505,7 +505,7 @@ ConstraintMatrix::condense (SparseMatrix<number> &uncondensed,
           // take care of vector
           if (use_vectors == true)
             {
-              for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q)
+              for (size_type q=0; q!=lines[distribute[row]].entries.size(); ++q)
                 vec(lines[distribute[row]].entries[q].first)
                 += (vec(row) * lines[distribute[row]].entries[q].second);
 
@@ -527,7 +527,7 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed,
   // the other function above.
   const bool use_vectors = vec.n_blocks() == 0 ? false : true;
 
-  const unsigned int blocks = uncondensed.n_block_rows();
+  const size_type blocks = uncondensed.n_block_rows();
 
   const BlockSparsityPattern &
   sparsity = uncondensed.get_sparsity_pattern ();
@@ -550,8 +550,8 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed,
     }
 
   double average_diagonal = 0;
-  for (unsigned int b=0; b<uncondensed.n_block_rows(); ++b)
-    for (unsigned int i=0; i<uncondensed.block(b,b).m(); ++i)
+  for (size_type b=0; b<uncondensed.n_block_rows(); ++b)
+    for (size_type i=0; i<uncondensed.block(b,b).m(); ++i)
       average_diagonal += std::fabs (uncondensed.block(b,b).diag_element(i));
   average_diagonal /= uncondensed.m();
 
@@ -560,27 +560,27 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed,
 
   // store for each index whether it must be
   // distributed or not. If entry is
-  // numbers::invalid_unsigned_int,
+  // numbers::invalid_size_type,
   // no distribution is necessary.
   // otherwise, the number states which line
   // in the constraint matrix handles this
   // index
-  std::vector<unsigned int> distribute (sparsity.n_rows(),
-                                        numbers::invalid_unsigned_int);
+  std::vector<size_type> distribute (sparsity.n_rows(),
+                                        numbers::invalid_size_type);
 
-  for (unsigned int c=0; c<lines.size(); ++c)
+  for (size_type c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
-  const unsigned int n_rows = sparsity.n_rows();
-  for (unsigned int row=0; row<n_rows; ++row)
+  const size_type n_rows = sparsity.n_rows();
+  for (size_type row=0; row<n_rows; ++row)
     {
       // get index of this row
       // within the blocks
-      const std::pair<unsigned int,unsigned int>
+      const std::pair<size_type,size_type>
       block_index = index_mapping.global_to_local(row);
-      const unsigned int block_row = block_index.first;
+      const size_type block_row = block_index.first;
 
-      if (distribute[row] == numbers::invalid_unsigned_int)
+      if (distribute[row] == numbers::invalid_size_type)
         // regular line. loop over
         // all columns and see
         // whether this column must
@@ -593,17 +593,17 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed,
           // this blockrow and the
           // corresponding row
           // therein
-          for (unsigned int block_col=0; block_col<blocks; ++block_col)
+          for (size_type block_col=0; block_col<blocks; ++block_col)
             {
               for (typename SparseMatrix<number>::iterator
                    entry = uncondensed.block(block_row, block_col).begin(block_index.second);
                    entry != uncondensed.block(block_row, block_col).end(block_index.second);
                    ++entry)
                 {
-                  const unsigned int global_col
+                  const size_type global_col
                     = index_mapping.local_to_global(block_col,entry->column());
 
-                  if (distribute[global_col] != numbers::invalid_unsigned_int)
+                  if (distribute[global_col] != numbers::invalid_size_type)
                     // distribute entry at
                     // regular row @p row
                     // and irregular column
@@ -612,7 +612,7 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed,
                     {
                       const double old_value = entry->value ();
 
-                      for (unsigned int q=0;
+                      for (size_type q=0;
                            q!=lines[distribute[global_col]].entries.size(); ++q)
                         uncondensed.add (row,
                                          lines[distribute[global_col]].entries[q].first,
@@ -640,18 +640,18 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed,
           // whole row into the
           // chunks defined by the
           // blocks
-          for (unsigned int block_col=0; block_col<blocks; ++block_col)
+          for (size_type block_col=0; block_col<blocks; ++block_col)
             {
               for (typename SparseMatrix<number>::iterator
                    entry = uncondensed.block(block_row, block_col).begin(block_index.second);
                    entry != uncondensed.block(block_row, block_col).end(block_index.second);
                    ++entry)
                 {
-                  const unsigned int global_col
+                  const size_type global_col
                     = index_mapping.local_to_global (block_col, entry->column());
 
                   if (distribute[global_col] ==
-                      numbers::invalid_unsigned_int)
+                      numbers::invalid_size_type)
                     // distribute
                     // entry at
                     // irregular
@@ -664,7 +664,7 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed,
                     {
                       const double old_value = entry->value();
 
-                      for (unsigned int q=0;
+                      for (size_type q=0;
                            q!=lines[distribute[row]].entries.size(); ++q)
                         uncondensed.add (lines[distribute[row]].entries[q].first,
                                          global_col,
@@ -684,9 +684,9 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed,
                     {
                       const double old_value = entry->value ();
 
-                      for (unsigned int p=0; p!=lines[distribute[row]].entries.size(); ++p)
+                      for (size_type p=0; p!=lines[distribute[row]].entries.size(); ++p)
                         {
-                          for (unsigned int q=0; q!=lines[distribute[global_col]].entries.size(); ++q)
+                          for (size_type q=0; q!=lines[distribute[global_col]].entries.size(); ++q)
                             uncondensed.add (lines[distribute[row]].entries[p].first,
                                              lines[distribute[global_col]].entries[q].first,
                                              old_value *
@@ -707,7 +707,7 @@ ConstraintMatrix::condense (BlockSparseMatrix<number> &uncondensed,
           // take care of vector
           if (use_vectors == true)
             {
-              for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q)
+              for (size_type q=0; q!=lines[distribute[row]].entries.size(); ++q)
                 vec(lines[distribute[row]].entries[q].first)
                 += (vec(row) * lines[distribute[row]].entries[q].second);
 
@@ -733,14 +733,14 @@ namespace internal
       // TODO: in general we should iterate over the constraints and not over all DoFs
       // for performance reasons
       template<class VEC>
-      void set_zero_parallel(const dealii::ConstraintMatrix &cm, VEC &vec, unsigned int shift = 0)
+      void set_zero_parallel(const dealii::ConstraintMatrix &cm, VEC &vec, size_type shift = 0)
       {
         Assert(!vec.has_ghost_elements(), ExcInternalError());//ExcGhostsPresent());
 
-        const unsigned int
+        const size_type 
         start = vec.local_range().first,
         end   = vec.local_range().second;
-        for (unsigned int i=start; i<end; ++i)
+        for (size_type i=start; i<end; ++i)
           if (cm.is_constrained (shift + i))
             vec(i) = 0;
       }
@@ -755,8 +755,8 @@ namespace internal
       template<class VEC>
       void set_zero_in_parallel(const dealii::ConstraintMatrix &cm, VEC &vec, internal::bool2type<true>)
       {
-        unsigned int start_shift = 0;
-        for (unsigned int j=0; j<vec.n_blocks(); ++j)
+        size_type start_shift = 0;
+        for (size_type j=0; j<vec.n_blocks(); ++j)
           {
             set_zero_parallel(cm, vec.block(j), start_shift);
             start_shift += vec.block(j).size();
@@ -770,7 +770,7 @@ namespace internal
         /* std::vector<dealii::ConstraintMatrix::ConstraintLine>::const_iterator constraint_line = cm.lines.begin();
            for (; constraint_line!=cm.lines.end(); ++constraint_line)
            vec(constraint_line->line) = 0.;*/
-        for (unsigned int i=0; i<vec.size(); ++i)
+        for (size_type i=0; i<vec.size(); ++i)
           if (cm.is_constrained (i))
             vec(i) = 0;
       }
@@ -828,7 +828,7 @@ template <typename VectorType>
 void
 ConstraintMatrix::
 distribute_local_to_global (const Vector<double>            &local_vector,
-                            const std::vector<unsigned int> &local_dof_indices,
+                            const std::vector<size_type> &local_dof_indices,
                             VectorType                      &global_vector,
                             const FullMatrix<double>        &local_matrix) const
 {
@@ -837,11 +837,11 @@ distribute_local_to_global (const Vector<double>            &local_vector,
   AssertDimension (local_matrix.m(), local_dof_indices.size());
   AssertDimension (local_matrix.n(), local_dof_indices.size());
 
-  const unsigned int n_local_dofs = local_vector.size();
+  const size_type n_local_dofs = local_vector.size();
   if (lines.empty())
     global_vector.add(local_dof_indices, local_vector);
   else
-    for (unsigned int i=0; i<n_local_dofs; ++i)
+    for (size_type i=0; i<n_local_dofs; ++i)
       {
         // check whether the current index is
         // constrained. if not, just write the entry
@@ -855,7 +855,7 @@ distribute_local_to_global (const Vector<double>            &local_vector,
 
         // find the constraint line to the given
         // global dof index
-        const unsigned int line_index = calculate_line_index (local_dof_indices[i]);
+        const size_type line_index = calculate_line_index (local_dof_indices[i]);
         const ConstraintLine *position =
           lines_cache.size() <= line_index ? 0 : &lines[lines_cache[line_index]];
 
@@ -865,7 +865,7 @@ distribute_local_to_global (const Vector<double>            &local_vector,
         // constrained. If so, distribute the constraint
         const double val = position->inhomogeneity;
         if (val != 0)
-          for (unsigned int j=0; j<n_local_dofs; ++j)
+          for (size_type j=0; j<n_local_dofs; ++j)
             if (is_constrained(local_dof_indices[j]) == false)
               global_vector(local_dof_indices[j]) -= val * local_matrix(j,i);
             else
@@ -876,7 +876,7 @@ distribute_local_to_global (const Vector<double>            &local_vector,
 
                 const ConstraintLine &position_j =
                   lines[lines_cache[calculate_line_index(local_dof_indices[j])]];
-                for (unsigned int q=0; q<position_j.entries.size(); ++q)
+                for (size_type q=0; q<position_j.entries.size(); ++q)
                   {
                     Assert (!(!local_lines.size()
                               || local_lines.is_element(position_j.entries[q].first))
@@ -890,7 +890,7 @@ distribute_local_to_global (const Vector<double>            &local_vector,
         // now distribute the constraint,
         // but make sure we don't touch
         // the entries of fixed dofs
-        for (unsigned int j=0; j<position->entries.size(); ++j)
+        for (size_type j=0; j<position->entries.size(); ++j)
           {
             Assert (!(!local_lines.size()
                       || local_lines.is_element(position->entries[j].first))
@@ -921,15 +921,15 @@ ConstraintMatrix::distribute (const VectorType &condensed,
   old_line.reserve (uncondensed.size());
 
   std::vector<ConstraintLine>::const_iterator next_constraint = lines.begin();
-  unsigned int                                shift           = 0;
-  unsigned int n_rows = uncondensed.size();
+  size_type                                   shift           = 0;
+  size_type n_rows = uncondensed.size();
 
   if (next_constraint == lines.end())
     // if no constraint is to be handled
-    for (unsigned int row=0; row!=n_rows; ++row)
+    for (size_type row=0; row!=n_rows; ++row)
       old_line.push_back (row);
   else
-    for (unsigned int row=0; row!=n_rows; ++row)
+    for (size_type row=0; row!=n_rows; ++row)
       if (row == next_constraint->line)
         {
           // this line is constrained
@@ -941,7 +941,7 @@ ConstraintMatrix::distribute (const VectorType &condensed,
             // nothing more to do; finish rest
             // of loop
             {
-              for (unsigned int i=row+1; i<n_rows; ++i)
+              for (size_type i=row+1; i<n_rows; ++i)
                 old_line.push_back (i-shift);
               break;
             };
@@ -957,7 +957,7 @@ ConstraintMatrix::distribute (const VectorType &condensed,
   // only evaluated so often as there are
   // entries in new_line[*] which tells us
   // which constraints exist
-  for (unsigned int line=0; line<uncondensed.size(); ++line)
+  for (size_type line=0; line<uncondensed.size(); ++line)
     if (old_line[line] != -1)
       // line was not condensed away
       uncondensed(line) = condensed(old_line[line]);
@@ -969,7 +969,7 @@ ConstraintMatrix::distribute (const VectorType &condensed,
         uncondensed(line) = next_constraint->inhomogeneity;
         // then add the different
         // contributions
-        for (unsigned int i=0; i<next_constraint->entries.size(); ++i)
+        for (size_type i=0; i<next_constraint->entries.size(); ++i)
           uncondensed(line) += (condensed(old_line[next_constraint->entries[i].first]) *
                                 next_constraint->entries[i].second);
         ++next_constraint;
@@ -992,7 +992,7 @@ ConstraintMatrix::distribute (VectorType &vec) const
       // different contributions
       typename VectorType::value_type
       new_value = next_constraint->inhomogeneity;
-      for (unsigned int i=0; i<next_constraint->entries.size(); ++i)
+      for (size_type i=0; i<next_constraint->entries.size(); ++i)
         new_value += (static_cast<typename VectorType::value_type>
                       (vec(next_constraint->entries[i].first)) *
                       next_constraint->entries[i].second);
@@ -1036,8 +1036,8 @@ namespace internals
   // comes from a constraint.
   struct Distributing
   {
-    Distributing (const unsigned int global_row = numbers::invalid_unsigned_int,
-                  const unsigned int local_row = numbers::invalid_unsigned_int);
+    Distributing (const size_type global_row = numbers::invalid_size_type,
+                  const size_type local_row = numbers::invalid_size_type);
     Distributing (const Distributing &in);
     Distributing &operator = (const Distributing &in);
     bool operator < (const Distributing &in) const
@@ -1045,22 +1045,22 @@ namespace internals
       return global_row<in.global_row;
     };
 
-    unsigned int global_row;
-    unsigned int local_row;
-    mutable unsigned int constraint_position;
+    size_type global_row;
+    size_type local_row;
+    mutable size_type constraint_position;
   };
 
   inline
-  Distributing::Distributing (const unsigned int global_row,
-                              const unsigned int local_row) :
+  Distributing::Distributing (const size_type global_row,
+                              const size_type local_row) :
     global_row (global_row),
     local_row (local_row),
-    constraint_position (numbers::invalid_unsigned_int) {}
+    constraint_position (numbers::invalid_size_type) {}
 
   inline
   Distributing::Distributing (const Distributing &in)
     :
-    constraint_position (numbers::invalid_unsigned_int)
+    constraint_position (numbers::invalid_size_type)
   {
     *this = (in);
   }
@@ -1072,13 +1072,13 @@ namespace internals
     local_row = in.local_row;
     // the constraints pointer should not
     // contain any data here.
-    Assert (constraint_position == numbers::invalid_unsigned_int,
+    Assert (constraint_position == numbers::invalid_size_type,
             ExcInternalError());
 
-    if (in.constraint_position != numbers::invalid_unsigned_int)
+    if (in.constraint_position != numbers::invalid_size_type)
       {
         constraint_position = in.constraint_position;
-        in.constraint_position = numbers::invalid_unsigned_int;
+        in.constraint_position = numbers::invalid_size_type;
       }
     return *this;
   }
@@ -1113,52 +1113,52 @@ namespace internals
     {
       Assert (element_size == 0, ExcInternalError());
       element_size = 6;
-      data = new std::pair<unsigned int,double> [20*6];
+      data = new std::pair<size_type,double> [20*6];
       individual_size.resize(20);
       n_used_elements = 0;
     }
 
-    unsigned int element_size;
+    size_type element_size;
 
-    std::pair<unsigned int,double> *data;
+    std::pair<size_type,double> *data;
 
-    std::vector<unsigned int> individual_size;
+    std::vector<size_type> individual_size;
 
-    unsigned int n_used_elements;
+    size_type n_used_elements;
 
-    unsigned int insert_new_index (const std::pair<unsigned int,double> &pair)
+    size_type insert_new_index (const std::pair<size_type,double> &pair)
     {
       if (element_size == 0)
         reinit();
       if (n_used_elements == individual_size.size())
         {
-          std::pair<unsigned int,double> *new_data =
-            new std::pair<unsigned int,double> [2*individual_size.size()*element_size];
+          std::pair<size_type,double> *new_data =
+            new std::pair<size_type,double> [2*individual_size.size()*element_size];
           memcpy (new_data, data, individual_size.size()*element_size*
-                  sizeof(std::pair<unsigned int,double>));
+                  sizeof(std::pair<size_type,double>));
           delete [] data;
           data = new_data;
           individual_size.resize (2*individual_size.size(), 0);
         }
-      unsigned int index = n_used_elements;
+      size_type index = n_used_elements;
       data[index*element_size] = pair;
       individual_size[index] = 1;
       ++n_used_elements;
       return index;
     }
 
-    void append_index (const unsigned int index,
-                       const std::pair<unsigned int,double> &pair)
+    void append_index (const size_type index,
+                       const std::pair<size_type,double> &pair)
     {
       AssertIndexRange (index, n_used_elements);
-      const unsigned int my_size = individual_size[index];
+      const size_type my_size = individual_size[index];
       if (my_size == element_size)
         {
-          std::pair<unsigned int,double> *new_data =
-            new std::pair<unsigned int,double> [2*individual_size.size()*element_size];
-          for (unsigned int i=0; i<n_used_elements; ++i)
+          std::pair<size_type,double> *new_data =
+            new std::pair<size_type,double> [2*individual_size.size()*element_size];
+          for (size_type i=0; i<n_used_elements; ++i)
             memcpy (&new_data[i*element_size*2], &data[i*element_size],
-                    element_size*sizeof(std::pair<unsigned int,double>));
+                    element_size*sizeof(std::pair<size_type,double>));
           delete [] data;
           data = new_data;
           element_size *= 2;
@@ -1167,14 +1167,14 @@ namespace internals
       individual_size[index]++;
     }
 
-    unsigned int
-    get_size (const unsigned int index) const
+    size_type 
+    get_size (const size_type index) const
     {
       return individual_size[index];
     }
 
-    const std::pair<unsigned int,double> *
-    get_entry (const unsigned int index) const
+    const std::pair<size_type,double> *
+    get_entry (const size_type index) const
     {
       return &data[index*element_size];
     }
@@ -1223,7 +1223,7 @@ namespace internals
   class GlobalRowsFromLocal
   {
   public:
-    GlobalRowsFromLocal (const unsigned int n_local_rows)
+    GlobalRowsFromLocal (const size_type n_local_rows)
       :
       total_row_indices (n_local_rows),
       n_active_rows (n_local_rows),
@@ -1232,8 +1232,8 @@ namespace internals
 
 
     // implemented below
-    void insert_index (const unsigned int global_row,
-                       const unsigned int local_row,
+    void insert_index (const size_type global_row,
+                       const size_type local_row,
                        const double       constraint_value);
     void sort ();
 
@@ -1245,15 +1245,15 @@ namespace internals
          << "Constr rows " << n_constraints() << std::endl
          << "Inhom  rows " << n_inhomogeneous_rows << std::endl
          << "Local: ";
-      for (unsigned int i=0 ; i<total_row_indices.size() ; ++i)
+      for (size_type i=0 ; i<total_row_indices.size() ; ++i)
         os << ' ' << std::setw(4) << total_row_indices[i].local_row;
       os << std::endl
          << "Global:";
-      for (unsigned int i=0 ; i<total_row_indices.size() ; ++i)
+      for (size_type i=0 ; i<total_row_indices.size() ; ++i)
         os << ' ' << std::setw(4) << total_row_indices[i].global_row;
       os << std::endl
          << "ConPos:";
-      for (unsigned int i=0 ; i<total_row_indices.size() ; ++i)
+      for (size_type i=0 ; i<total_row_indices.size() ; ++i)
         os << ' ' << std::setw(4) << total_row_indices[i].constraint_position;
       os << std::endl;
     }
@@ -1264,14 +1264,14 @@ namespace internals
 
     // returns the number of global indices in the
     // struct
-    unsigned int size () const
+    size_type size () const
     {
       return n_active_rows;
     }
 
     // returns the global index of the
     // counter_index-th entry in the list
-    unsigned int &global_row (const unsigned int counter_index)
+    size_type &global_row (const size_type counter_index)
     {
       return total_row_indices[counter_index].global_row;
     }
@@ -1279,10 +1279,10 @@ namespace internals
     // returns the number of constraints that are
     // associated to the counter_index-th entry in
     // the list
-    unsigned int size (const unsigned int counter_index) const
+    size_type size (const size_type counter_index) const
     {
       return (total_row_indices[counter_index].constraint_position ==
-              numbers::invalid_unsigned_int ?
+              numbers::invalid_size_type ?
               0 :
               data_cache.get_size(total_row_indices[counter_index].
                                   constraint_position));
@@ -1290,22 +1290,22 @@ namespace internals
 
     // returns the global row associated with the
     // counter_index-th entry in the list
-    const unsigned int &global_row (const unsigned int counter_index) const
+    const size_type &global_row (const size_type counter_index) const
     {
       return total_row_indices[counter_index].global_row;
     }
 
     // returns the local row in the cell matrix
     // associated with the counter_index-th entry
-    // in the list. Returns invalid_unsigned_int
-    // for invalid unsigned ints
-    const unsigned int &local_row (const unsigned int counter_index) const
+    // in the list. Returns invalid_size_type
+    // for invalid size_types
+    const size_type &local_row (const size_type counter_index) const
     {
       return total_row_indices[counter_index].local_row;
     }
 
     // writable index
-    unsigned int &local_row (const unsigned int counter_index)
+    size_type &local_row (const size_type counter_index)
     {
       return total_row_indices[counter_index].local_row;
     }
@@ -1314,8 +1314,8 @@ namespace internals
     // associated with the counter_index-th entry
     // in the list in the index_in_constraint-th
     // position of constraints
-    unsigned int local_row (const unsigned int counter_index,
-                            const unsigned int index_in_constraint) const
+    size_type local_row (const size_type counter_index,
+                         const size_type index_in_constraint) const
     {
       return (data_cache.get_entry(total_row_indices[counter_index].constraint_position)
               [index_in_constraint]).first;
@@ -1325,8 +1325,8 @@ namespace internals
     // counter_index-th entry in the list in the
     // index_in_constraint-th position of
     // constraints
-    double constraint_value (const unsigned int counter_index,
-                             const unsigned int index_in_constraint) const
+    double constraint_value (const size_type counter_index,
+                             const size_type index_in_constraint) const
     {
       return (data_cache.get_entry(total_row_indices[counter_index].constraint_position)
               [index_in_constraint]).second;
@@ -1345,7 +1345,7 @@ namespace internals
     // constrained. This means that
     // there is one less nontrivial
     // row
-    void insert_constraint (const unsigned int constrained_local_dof)
+    void insert_constraint (const size_type constrained_local_dof)
     {
       --n_active_rows;
       total_row_indices[n_active_rows].local_row = constrained_local_dof;
@@ -1357,7 +1357,7 @@ namespace internals
     // the matrix, but are needed in order
     // to set matrix diagonals and resolve
     // inhomogeneities
-    unsigned int n_constraints () const
+    size_type n_constraints () const
     {
       return total_row_indices.size()-n_active_rows;
     }
@@ -1365,7 +1365,7 @@ namespace internals
     // returns the number of constrained
     // dofs in the structure that have an
     // inhomogeneity
-    unsigned int n_inhomogeneities () const
+    size_type n_inhomogeneities () const
     {
       return n_inhomogeneous_rows;
     }
@@ -1377,7 +1377,7 @@ namespace internals
     // sides, so to have fast access to
     // them, put them before homogeneous
     // constraints
-    void set_ith_constraint_inhomogeneous (const unsigned int i)
+    void set_ith_constraint_inhomogeneous (const size_type i)
     {
       Assert (i >= n_inhomogeneous_rows, ExcInternalError());
       std::swap (total_row_indices[n_active_rows+i],
@@ -1391,7 +1391,7 @@ namespace internals
     // easily when the
     // GlobalRowsToLocal has been
     // set up
-    unsigned int constraint_origin (unsigned int i) const
+    size_type constraint_origin (size_type i) const
     {
       return total_row_indices[n_active_rows+i].local_row;
     }
@@ -1410,35 +1410,35 @@ namespace internals
 
     // how many rows there are,
     // constraints disregarded
-    unsigned int              n_active_rows;
+    size_type                 n_active_rows;
 
     // the number of rows with
     // inhomogeneous constraints
-    unsigned int              n_inhomogeneous_rows;
+    size_type                 n_inhomogeneous_rows;
   };
 
   // a function that appends an additional
   // row to the list of values, or appends a
   // value to an already existing
   // row. Similar functionality as for
-  // std::map<unsigned int,Distributing>, but
+  // std::map<size_type,Distributing>, but
   // here done for a
   // std::vector<Distributing>, much faster
   // for short lists as we have them here
   inline
   void
-  GlobalRowsFromLocal::insert_index (const unsigned int global_row,
-                                     const unsigned int local_row,
-                                     const double       constraint_value)
+  GlobalRowsFromLocal::insert_index (const size_type global_row,
+                                     const size_type local_row,
+                                     const double    constraint_value)
   {
     typedef std::vector<Distributing>::iterator index_iterator;
     index_iterator pos, pos1;
     Distributing row_value (global_row);
-    std::pair<unsigned int,double> constraint (local_row, constraint_value);
+    std::pair<size_type,double> constraint (local_row, constraint_value);
 
     // check whether the list was really
     // sorted before entering here
-    for (unsigned int i=1; i<n_active_rows; ++i)
+    for (size_type i=1; i<n_active_rows; ++i)
       Assert (total_row_indices[i-1] < total_row_indices[i], ExcInternalError());
 
     pos = Utilities::lower_bound (total_row_indices.begin(),
@@ -1452,7 +1452,7 @@ namespace internals
         ++n_active_rows;
       }
 
-    if (pos1->constraint_position == numbers::invalid_unsigned_int)
+    if (pos1->constraint_position == numbers::invalid_size_type)
       pos1->constraint_position = data_cache.insert_new_index (constraint);
     else
       data_cache.append_index (pos1->constraint_position, constraint);
@@ -1472,19 +1472,19 @@ namespace internals
   void
   GlobalRowsFromLocal::sort ()
   {
-    unsigned int i, j, j2, temp, templ, istep;
-    unsigned int step;
+    size_type i, j, j2, temp, templ, istep;
+    size_type step;
 
     // check whether the
     // constraints are really empty.
-    const unsigned int length = size();
+    const size_type length = size();
 
     // make sure that we are in the
     // range of the vector
     AssertIndexRange (length, total_row_indices.size()+1);
-    for (unsigned int i=0; i<length; ++i)
+    for (size_type i=0; i<length; ++i)
       Assert (total_row_indices[i].constraint_position ==
-              numbers::invalid_unsigned_int,
+              numbers::invalid_size_type,
               ExcInternalError());
 
     step = length/2;
@@ -1527,21 +1527,21 @@ namespace internals
   template <class BlockType>
   inline
   void
-  make_block_starts (const BlockType           &block_object,
-                     GlobalRowsFromLocal       &global_rows,
-                     std::vector<unsigned int> &block_starts)
+  make_block_starts (const BlockType        &block_object,
+                     GlobalRowsFromLocal    &global_rows,
+                     std::vector<size_type> &block_starts)
   {
     AssertDimension (block_starts.size(), block_object.n_block_rows()+1);
 
     typedef std::vector<Distributing>::iterator row_iterator;
     row_iterator block_indices = global_rows.total_row_indices.begin();
 
-    const unsigned int num_blocks = block_object.n_block_rows();
-    const unsigned int n_active_rows = global_rows.size();
+    const size_type num_blocks = block_object.n_block_rows();
+    const size_type n_active_rows = global_rows.size();
 
     // find end of rows.
     block_starts[0] = 0;
-    for (unsigned int i=1; i<num_blocks; ++i)
+    for (size_type i=1; i<num_blocks; ++i)
       {
         row_iterator first_block =
           Utilities::lower_bound (block_indices,
@@ -1553,7 +1553,7 @@ namespace internals
 
     // transform row indices to block-local
     // index space
-    for (unsigned int i=block_starts[1]; i<n_active_rows; ++i)
+    for (size_type i=block_starts[1]; i<n_active_rows; ++i)
       global_rows.global_row(i) = block_object.get_row_indices().
                                   global_to_local(global_rows.global_row(i)).second;
   }
@@ -1567,20 +1567,20 @@ namespace internals
   template <class BlockType>
   inline
   void
-  make_block_starts (const BlockType           &block_object,
-                     std::vector<unsigned int> &row_indices,
-                     std::vector<unsigned int> &block_starts)
+  make_block_starts (const BlockType        &block_object,
+                     std::vector<size_type> &row_indices,
+                     std::vector<size_type> &block_starts)
   {
     AssertDimension (block_starts.size(), block_object.n_block_rows()+1);
 
-    typedef std::vector<unsigned int>::iterator row_iterator;
+    typedef std::vector<size_type>::iterator row_iterator;
     row_iterator col_indices = row_indices.begin();
 
-    const unsigned int num_blocks = block_object.n_block_rows();
+    const size_type num_blocks = block_object.n_block_rows();
 
     // find end of rows.
     block_starts[0] = 0;
-    for (unsigned int i=1; i<num_blocks; ++i)
+    for (size_type i=1; i<num_blocks; ++i)
       {
         row_iterator first_block =
           Utilities::lower_bound (col_indices,
@@ -1592,7 +1592,7 @@ namespace internals
 
     // transform row indices to local index
     // space
-    for (unsigned int i=block_starts[1]; i<row_indices.size(); ++i)
+    for (size_type i=block_starts[1]; i<row_indices.size(); ++i)
       row_indices[i] = block_object.get_row_indices().
                        global_to_local(row_indices[i]).second;
   }
@@ -1606,26 +1606,26 @@ namespace internals
   static inline
   double resolve_matrix_entry (const GlobalRowsFromLocal &global_rows,
                                const GlobalRowsFromLocal &global_cols,
-                               const unsigned int        i,
-                               const unsigned int        j,
-                               const unsigned int        loc_row,
+                               const size_type            i,
+                               const size_type            j,
+                               const size_type            loc_row,
                                const FullMatrix<double> &local_matrix)
   {
-    const unsigned int loc_col = global_cols.local_row(j);
+    const size_type loc_col = global_cols.local_row(j);
     double col_val;
 
     // case 1: row has direct contribution in
     // local matrix. decide whether col has a
     // direct contribution. if not,
     // set the value to zero.
-    if (loc_row != numbers::invalid_unsigned_int)
+    if (loc_row != numbers::invalid_size_type)
       {
-        col_val = ((loc_col != numbers::invalid_unsigned_int) ?
+        col_val = ((loc_col != numbers::invalid_size_type) ?
                    local_matrix(loc_row, loc_col) : 0);
 
         // account for indirect contributions by
         // constraints in column
-        for (unsigned int p=0; p<global_cols.size(j); ++p)
+        for (size_type p=0; p<global_cols.size(j); ++p)
           col_val += (local_matrix(loc_row, global_cols.local_row(j,p)) *
                       global_cols.constraint_value(j,p));
       }
@@ -1639,12 +1639,12 @@ namespace internals
     // constraints in row, going trough the
     // direct and indirect references in the
     // given column.
-    for (unsigned int q=0; q<global_rows.size(i); ++q)
+    for (size_type q=0; q<global_rows.size(i); ++q)
       {
-        double add_this = (loc_col != numbers::invalid_unsigned_int)
+        double add_this = (loc_col != numbers::invalid_size_type)
                           ? local_matrix(global_rows.local_row(i,q), loc_col) : 0;
 
-        for (unsigned int p=0; p<global_cols.size(j); ++p)
+        for (size_type p=0; p<global_cols.size(j); ++p)
           add_this += (local_matrix(global_rows.local_row(i,q),
                                     global_cols.local_row(j,p))
                        *
@@ -1665,18 +1665,18 @@ namespace internals
   void
   resolve_matrix_row (const GlobalRowsFromLocal &global_rows,
                       const GlobalRowsFromLocal &global_cols,
-                      const unsigned int        i,
-                      const unsigned int        column_start,
-                      const unsigned int        column_end,
-                      const FullMatrix<double> &local_matrix,
-                      unsigned int         *&col_ptr,
-                      number             *&val_ptr)
+                      const size_type            i,
+                      const size_type            column_start,
+                      const size_type            column_end,
+                      const FullMatrix<double>  &local_matrix,
+                      size_type                *&col_ptr,
+                      number                   *&val_ptr)
   {
     if (column_end == column_start)
       return;
 
     AssertIndexRange (column_end-1, global_cols.size());
-    const unsigned int loc_row = global_rows.local_row(i);
+    const size_type loc_row = global_rows.local_row(i);
 
     // fast function if there are no indirect
     // references to any of the local rows at
@@ -1690,9 +1690,9 @@ namespace internals
         AssertIndexRange(loc_row, local_matrix.m());
         const double *matrix_ptr = &local_matrix(loc_row, 0);
 
-        for (unsigned int j=column_start; j<column_end; ++j)
+        for (size_type j=column_start; j<column_end; ++j)
           {
-            const unsigned int loc_col = global_cols.local_row(j);
+            const size_type loc_col = global_cols.local_row(j);
             AssertIndexRange(loc_col, local_matrix.n());
             const double col_val = matrix_ptr[loc_col];
             if (col_val != 0.)
@@ -1708,7 +1708,7 @@ namespace internals
     // to do some more checks.
     else
       {
-        for (unsigned int j=column_start; j<column_end; ++j)
+        for (size_type j=column_start; j<column_end; ++j)
           {
             double col_val = resolve_matrix_entry (global_rows, global_cols, i, j,
                                                    loc_row, local_matrix);
@@ -1733,8 +1733,8 @@ namespace internals
     template <typename SparseMatrixIterator>
     static inline
     void add_value (const double          value,
-                    const unsigned int    row,
-                    const unsigned int    column,
+                    const size_type       row,
+                    const size_type       column,
                     SparseMatrixIterator &matrix_values)
     {
       if (value != 0.)
@@ -1758,11 +1758,11 @@ namespace internals
   inline
   void
   resolve_matrix_row (const GlobalRowsFromLocal &global_rows,
-                      const unsigned int        i,
-                      const unsigned int        column_start,
-                      const unsigned int        column_end,
-                      const FullMatrix<double> &local_matrix,
-                      SparseMatrix<number>     *sparse_matrix)
+                      const size_type            i,
+                      const size_type            column_start,
+                      const size_type            column_end,
+                      const FullMatrix<double>  &local_matrix,
+                      SparseMatrix<number>      *sparse_matrix)
   {
     if (column_end == column_start)
       return;
@@ -1773,8 +1773,8 @@ namespace internals
     if (sparsity.n_nonzero_elements() == 0)
       return;
 
-    const unsigned int row = global_rows.global_row(i);
-    const unsigned int loc_row = global_rows.local_row(i);
+    const size_type row = global_rows.global_row(i);
+    const size_type loc_row = global_rows.local_row(i);
 
     typename SparseMatrix<number>::iterator
       matrix_values = sparse_matrix->begin(row);
@@ -1793,9 +1793,9 @@ namespace internals
             AssertIndexRange (loc_row, local_matrix.m());
             const double *matrix_ptr = &local_matrix(loc_row, 0);
 
-            for (unsigned int j=column_start; j<column_end; ++j)
+            for (size_type j=column_start; j<column_end; ++j)
               {
-                const unsigned int loc_col = global_rows.local_row(j);
+                const size_type loc_col = global_rows.local_row(j);
                 const double col_val = matrix_ptr[loc_col];
                 dealiiSparseMatrix::add_value (col_val, row,
                                                global_rows.global_row(j),
@@ -1804,7 +1804,7 @@ namespace internals
           }
         else
           {
-            for (unsigned int j=column_start; j<column_end; ++j)
+            for (size_type j=column_start; j<column_end; ++j)
               {
                 double col_val = resolve_matrix_entry (global_rows, global_rows, i, j,
                                                        loc_row, local_matrix);
@@ -1823,17 +1823,17 @@ namespace internals
             const double *matrix_ptr = &local_matrix(loc_row, 0);
 
             sparse_matrix->begin(row)->value() += matrix_ptr[loc_row];
-            for (unsigned int j=column_start; j<i; ++j)
+            for (size_type j=column_start; j<i; ++j)
               {
-                const unsigned int loc_col = global_rows.local_row(j);
+                const size_type loc_col = global_rows.local_row(j);
                 const double col_val = matrix_ptr[loc_col];
                 dealiiSparseMatrix::add_value(col_val, row,
                                               global_rows.global_row(j),
                                               matrix_values);
               }
-            for (unsigned int j=i+1; j<column_end; ++j)
+            for (size_type j=i+1; j<column_end; ++j)
               {
-                const unsigned int loc_col = global_rows.local_row(j);
+                const size_type loc_col = global_rows.local_row(j);
                 const double col_val = matrix_ptr[loc_col];
                 dealiiSparseMatrix::add_value(col_val, row,
                                               global_rows.global_row(j),
@@ -1845,7 +1845,7 @@ namespace internals
             sparse_matrix->begin(row)->value() +=
               resolve_matrix_entry (global_rows, global_rows, i, i,
                                     loc_row, local_matrix);
-            for (unsigned int j=column_start; j<i; ++j)
+            for (size_type j=column_start; j<i; ++j)
               {
                 double col_val = resolve_matrix_entry (global_rows, global_rows, i, j,
                                                        loc_row, local_matrix);
@@ -1853,7 +1853,7 @@ namespace internals
                                                global_rows.global_row(j),
                                                matrix_values);
               }
-            for (unsigned int j=i+1; j<column_end; ++j)
+            for (size_type j=i+1; j<column_end; ++j)
               {
                 double col_val = resolve_matrix_entry (global_rows, global_rows, i, j,
                                                        loc_row, local_matrix);
@@ -1871,9 +1871,9 @@ namespace internals
         AssertIndexRange (loc_row, local_matrix.m());
         const double *matrix_ptr = &local_matrix(loc_row, 0);
 
-        for (unsigned int j=column_start; j<column_end; ++j)
+        for (size_type j=column_start; j<column_end; ++j)
           {
-            const unsigned int loc_col = global_rows.local_row(j);
+            const size_type loc_col = global_rows.local_row(j);
             const double col_val = matrix_ptr[loc_col];
             if (row==global_rows.global_row(j))
               sparse_matrix->begin(row)->value() += col_val;
@@ -1886,7 +1886,7 @@ namespace internals
     else
       {
         ++matrix_values; // jump over diagonal element
-        for (unsigned int j=column_start; j<column_end; ++j)
+        for (size_type j=column_start; j<column_end; ++j)
           {
             double col_val = resolve_matrix_entry (global_rows, global_rows, i,
                                                    j, loc_row, local_matrix);
@@ -1909,16 +1909,16 @@ namespace internals
   inline
   void
   resolve_matrix_row (const GlobalRowsFromLocal     &global_rows,
-                      const unsigned int             i,
-                      const unsigned int             column_start,
-                      const unsigned int             column_end,
+                      const size_type                i,
+                      const size_type                column_start,
+                      const size_type                column_end,
                       const Table<2,bool>           &dof_mask,
-                      std::vector<unsigned int>::iterator &col_ptr)
+                      std::vector<size_type>::iterator &col_ptr)
   {
     if (column_end == column_start)
       return;
 
-    const unsigned int loc_row = global_rows.local_row(i);
+    const size_type loc_row = global_rows.local_row(i);
 
     // fast function if there are no indirect
     // references to any of the local rows at
@@ -1928,9 +1928,9 @@ namespace internals
         Assert(loc_row < dof_mask.n_rows(),
                ExcInternalError());
 
-        for (unsigned int j=column_start; j<column_end; ++j)
+        for (size_type j=column_start; j<column_end; ++j)
           {
-            const unsigned int loc_col = global_rows.local_row(j);
+            const size_type loc_col = global_rows.local_row(j);
             Assert(loc_col < dof_mask.n_cols(), ExcInternalError());
 
             if (dof_mask(loc_row,loc_col) == true)
@@ -1943,34 +1943,34 @@ namespace internals
     // to do some more checks.
     else
       {
-        for (unsigned int j=column_start; j<column_end; ++j)
+        for (size_type j=column_start; j<column_end; ++j)
           {
-            const unsigned int loc_col = global_rows.local_row(j);
-            if (loc_row != numbers::invalid_unsigned_int)
+            const size_type loc_col = global_rows.local_row(j);
+            if (loc_row != numbers::invalid_size_type)
               {
                 Assert (loc_row < dof_mask.n_rows(), ExcInternalError());
-                if (loc_col != numbers::invalid_unsigned_int)
+                if (loc_col != numbers::invalid_size_type)
                   {
                     Assert (loc_col < dof_mask.n_cols(), ExcInternalError());
                     if (dof_mask(loc_row,loc_col) == true)
                       goto add_this_index;
                   }
 
-                for (unsigned int p=0; p<global_rows.size(j); ++p)
+                for (size_type p=0; p<global_rows.size(j); ++p)
                   if (dof_mask(loc_row,global_rows.local_row(j,p)) == true)
                     goto add_this_index;
               }
 
-            for (unsigned int q=0; q<global_rows.size(i); ++q)
+            for (size_type q=0; q<global_rows.size(i); ++q)
               {
-                if (loc_col != numbers::invalid_unsigned_int)
+                if (loc_col != numbers::invalid_size_type)
                   {
                     Assert (loc_col < dof_mask.n_cols(), ExcInternalError());
                     if (dof_mask(global_rows.local_row(i,q),loc_col) == true)
                       goto add_this_index;
                   }
 
-                for (unsigned int p=0; p<global_rows.size(j); ++p)
+                for (size_type p=0; p<global_rows.size(j); ++p)
                   if (dof_mask(global_rows.local_row(i,q),
                                global_rows.local_row(j,p)) == true)
                     goto add_this_index;
@@ -2017,7 +2017,7 @@ add_this_index:
   template <typename MatrixType, typename VectorType>
   inline void
   set_matrix_diagonals (const internals::GlobalRowsFromLocal &global_rows,
-                        const std::vector<unsigned int>      &local_dof_indices,
+                        const std::vector<size_type>         &local_dof_indices,
                         const FullMatrix<double>             &local_matrix,
                         const ConstraintMatrix               &constraints,
                         MatrixType                           &global_matrix,
@@ -2027,14 +2027,14 @@ add_this_index:
     if (global_rows.n_constraints() > 0)
       {
         double average_diagonal = 0;
-        for (unsigned int i=0; i<local_matrix.m(); ++i)
+        for (size_type i=0; i<local_matrix.m(); ++i)
           average_diagonal += std::fabs (local_matrix(i,i));
         average_diagonal /= static_cast<double>(local_matrix.m());
 
-        for (unsigned int i=0; i<global_rows.n_constraints(); i++)
+        for (size_type i=0; i<global_rows.n_constraints(); i++)
           {
-            const unsigned int local_row = global_rows.constraint_origin(i);
-            const unsigned int global_row = local_dof_indices[local_row];
+            const size_type local_row = global_rows.constraint_origin(i);
+            const size_type global_row = local_dof_indices[local_row];
             const typename MatrixType::value_type new_diagonal
               = (std::fabs(local_matrix(local_row,local_row)) != 0 ?
                  std::fabs(local_matrix(local_row,local_row)) : average_diagonal);
@@ -2065,7 +2065,7 @@ add_this_index:
   template <typename SparsityType>
   inline void
   set_sparsity_diagonals (const internals::GlobalRowsFromLocal &global_rows,
-                          const std::vector<unsigned int>      &local_dof_indices,
+                          const std::vector<size_type>      &local_dof_indices,
                           const Table<2,bool>                  &dof_mask,
                           const bool                            keep_constrained_entries,
                           SparsityType                         &sparsity_pattern)
@@ -2077,13 +2077,13 @@ add_this_index:
     // that have been left out above
     if (global_rows.n_constraints() > 0)
       {
-        for (unsigned int i=0; i<global_rows.n_constraints(); i++)
+        for (size_type i=0; i<global_rows.n_constraints(); i++)
           {
-            const unsigned int local_row = global_rows.constraint_origin(i);
-            const unsigned int global_row = local_dof_indices[local_row];
+            const size_type local_row = global_rows.constraint_origin(i);
+            const size_type global_row = local_dof_indices[local_row];
             if (keep_constrained_entries == true)
               {
-                for (unsigned int j=0; j<local_dof_indices.size(); ++j)
+                for (size_type j=0; j<local_dof_indices.size(); ++j)
                   {
                     if (dof_mask(local_row,j) == true)
                       sparsity_pattern.add(global_row,
@@ -2113,10 +2113,10 @@ add_this_index:
 // are related to it.
 void
 ConstraintMatrix::
-make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
+make_sorted_row_list (const std::vector<size_type> &local_dof_indices,
                       internals::GlobalRowsFromLocal &global_rows) const
 {
-  const unsigned int n_local_dofs = local_dof_indices.size();
+  const size_type n_local_dofs = local_dof_indices.size();
   AssertDimension (n_local_dofs, global_rows.size());
 
   // when distributing the local data to
@@ -2149,13 +2149,13 @@ make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
   // cache whether we have to resolve any
   // indirect rows generated from resolving
   // constrained dofs.
-  unsigned int added_rows = 0;
+  size_type added_rows = 0;
 
   // first add the indices in an unsorted
   // way and only keep track of the
   // constraints that appear. They are
   // resolved in a second step.
-  for (unsigned int i = 0; i<n_local_dofs; ++i)
+  for (size_type i = 0; i<n_local_dofs; ++i)
     {
       if (is_constrained(local_dof_indices[i]) == false)
         {
@@ -2167,18 +2167,18 @@ make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
     }
   global_rows.sort();
 
-  const unsigned int n_constrained_rows = n_local_dofs-added_rows;
-  for (unsigned int i=0; i<n_constrained_rows; ++i)
+  const size_type n_constrained_rows = n_local_dofs-added_rows;
+  for (size_type i=0; i<n_constrained_rows; ++i)
     {
-      const unsigned int local_row = global_rows.constraint_origin(i);
+      const size_type local_row = global_rows.constraint_origin(i);
       AssertIndexRange(local_row, n_local_dofs);
-      const unsigned int global_row = local_dof_indices[local_row];
+      const size_type global_row = local_dof_indices[local_row];
       Assert (is_constrained(global_row), ExcInternalError());
       const ConstraintLine &position =
         lines[lines_cache[calculate_line_index(global_row)]];
       if (position.inhomogeneity != 0)
         global_rows.set_ith_constraint_inhomogeneous (i);
-      for (unsigned int q=0; q<position.entries.size(); ++q)
+      for (size_type q=0; q<position.entries.size(); ++q)
         global_rows.insert_index (position.entries[q].first,
                                   local_row,
                                   position.entries[q].second);
@@ -2195,12 +2195,12 @@ make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
 inline
 void
 ConstraintMatrix::
-make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
-                      std::vector<unsigned int>       &active_dofs) const
+make_sorted_row_list (const std::vector<size_type> &local_dof_indices,
+                      std::vector<size_type>       &active_dofs) const
 {
-  const unsigned int n_local_dofs = local_dof_indices.size();
-  unsigned int added_rows = 0;
-  for (unsigned int i = 0; i<n_local_dofs; ++i)
+  const size_type n_local_dofs = local_dof_indices.size();
+  size_type added_rows = 0;
+  for (size_type i = 0; i<n_local_dofs; ++i)
     {
       if (is_constrained(local_dof_indices[i]) == false)
         {
@@ -2212,20 +2212,20 @@ make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
     }
   std::sort (active_dofs.begin(), active_dofs.begin()+added_rows);
 
-  const unsigned int n_constrained_dofs = n_local_dofs-added_rows;
-  for (unsigned int i=n_constrained_dofs; i>0; --i)
+  const size_type n_constrained_dofs = n_local_dofs-added_rows;
+  for (size_type i=n_constrained_dofs; i>0; --i)
     {
-      const unsigned int local_row = active_dofs.back();
+      const size_type local_row = active_dofs.back();
 
       // remove constrained entry since we
       // are going to resolve it in place
       active_dofs.pop_back();
-      const unsigned int global_row = local_dof_indices[local_row];
+      const size_type global_row = local_dof_indices[local_row];
       const ConstraintLine &position =
         lines[lines_cache[calculate_line_index(global_row)]];
-      for (unsigned int q=0; q<position.entries.size(); ++q)
+      for (size_type q=0; q<position.entries.size(); ++q)
         {
-          const unsigned int new_index = position.entries[q].first;
+          const size_type new_index = position.entries[q].first;
           if (active_dofs[active_dofs.size()-i] < new_index)
             active_dofs.insert(active_dofs.end()-i+1,new_index);
 
@@ -2234,7 +2234,7 @@ make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
           // the list sorted
           else
             {
-              std::vector<unsigned int>::iterator it =
+              std::vector<size_type>::iterator it =
                 Utilities::lower_bound(active_dofs.begin(),
                                        active_dofs.end()-i+1,
                                        new_index);
@@ -2252,23 +2252,23 @@ make_sorted_row_list (const std::vector<unsigned int> &local_dof_indices,
 inline
 double
 ConstraintMatrix::
-resolve_vector_entry (const unsigned int                    i,
+resolve_vector_entry (const size_type                       i,
                       const internals::GlobalRowsFromLocal &global_rows,
                       const Vector<double>                 &local_vector,
-                      const std::vector<unsigned int>      &local_dof_indices,
+                      const std::vector<size_type>         &local_dof_indices,
                       const FullMatrix<double>             &local_matrix) const
 {
-  const unsigned int loc_row = global_rows.local_row(i);
-  const unsigned int n_inhomogeneous_rows = global_rows.n_inhomogeneities();
+  const size_type loc_row = global_rows.local_row(i);
+  const size_type n_inhomogeneous_rows = global_rows.n_inhomogeneities();
   double val = 0;
   // has a direct contribution from some local
   // entry. If we have inhomogeneous
   // constraints, compute the contribution of
   // the inhomogeneity in the current row.
-  if (loc_row != numbers::invalid_unsigned_int)
+  if (loc_row != numbers::invalid_size_type)
     {
       val = local_vector(loc_row);
-      for (unsigned int i=0; i<n_inhomogeneous_rows; ++i)
+      for (size_type i=0; i<n_inhomogeneous_rows; ++i)
         val -= (lines[lines_cache[calculate_line_index(local_dof_indices
                                                        [global_rows.constraint_origin(i)])]].
                 inhomogeneity *
@@ -2276,11 +2276,11 @@ resolve_vector_entry (const unsigned int                    i,
     }
 
   // go through the indirect contributions
-  for (unsigned int q=0; q<global_rows.size(i); ++q)
+  for (size_type q=0; q<global_rows.size(i); ++q)
     {
-      const unsigned int loc_row_q = global_rows.local_row(i,q);
+      const size_type loc_row_q = global_rows.local_row(i,q);
       double add_this = local_vector (loc_row_q);
-      for (unsigned int k=0; k<n_inhomogeneous_rows; ++k)
+      for (size_type k=0; k<n_inhomogeneous_rows; ++k)
         add_this -= (lines[lines_cache[calculate_line_index
                                        (local_dof_indices
                                         [global_rows.constraint_origin(k)])]].
@@ -2300,7 +2300,7 @@ void
 ConstraintMatrix::distribute_local_to_global (
   const FullMatrix<double>        &local_matrix,
   const Vector<double>            &local_vector,
-  const std::vector<unsigned int> &local_dof_indices,
+  const std::vector<size_type>    &local_dof_indices,
   MatrixType                      &global_matrix,
   VectorType                      &global_vector,
   bool                            use_inhomogeneities_for_rhs,
@@ -2325,18 +2325,18 @@ ConstraintMatrix::distribute_local_to_global (
     }
   Assert (lines.empty() || sorted == true, ExcMatrixNotClosed());
 
-  const unsigned int n_local_dofs = local_dof_indices.size();
+  const size_type n_local_dofs = local_dof_indices.size();
   internals::GlobalRowsFromLocal global_rows (n_local_dofs);
   make_sorted_row_list (local_dof_indices, global_rows);
 
-  const unsigned int n_actual_dofs = global_rows.size();
+  const size_type n_actual_dofs = global_rows.size();
 
   // create arrays for the column data
   // (indices and values) that will then be
   // written into the matrix. Shortcut for
   // deal.II sparse matrix
-  std::vector<unsigned int> cols;
-  std::vector<number>       vals;
+  std::vector<size_type>  cols;
+  std::vector<number>     vals;
   SparseMatrix<number> *sparse_matrix
     = dynamic_cast<SparseMatrix<number> *>(&global_matrix);
   if (use_dealii_matrix == false)
@@ -2351,21 +2351,21 @@ ConstraintMatrix::distribute_local_to_global (
   // the global rows that we will touch and
   // call resolve_matrix_row for each of
   // those.
-  for (unsigned int i=0; i<n_actual_dofs; ++i)
+  for (size_type i=0; i<n_actual_dofs; ++i)
     {
-      const unsigned int row = global_rows.global_row(i);
+      const size_type row = global_rows.global_row(i);
 
       // calculate all the data that will be
       // written into the matrix row.
       if (use_dealii_matrix == false)
         {
-          unsigned int *col_ptr = &cols[0];
+          size_type *col_ptr = &cols[0];
           number *val_ptr = &vals[0];
           internals::resolve_matrix_row (global_rows, global_rows, i, 0,
                                          n_actual_dofs,
                                          local_matrix, col_ptr, val_ptr);
-          const unsigned int n_values = col_ptr - &cols[0];
-          Assert (n_values == (unsigned int)(val_ptr - &vals[0]),
+          const size_type n_values = col_ptr - &cols[0];
+          Assert (n_values == (size_type)(val_ptr - &vals[0]),
                   ExcInternalError());
           if (n_values > 0)
             global_matrix.add(row, n_values, &cols[0], &vals[0], false, true);
@@ -2404,10 +2404,10 @@ ConstraintMatrix::distribute_local_to_global (
 template <typename MatrixType>
 void
 ConstraintMatrix::distribute_local_to_global (
-  const FullMatrix<double>        &local_matrix,
-  const std::vector<unsigned int> &row_indices,
-  const std::vector<unsigned int> &col_indices,
-  MatrixType                      &global_matrix) const
+  const FullMatrix<double>     &local_matrix,
+  const std::vector<size_type> &row_indices,
+  const std::vector<size_type> &col_indices,
+  MatrixType                   &global_matrix) const
 {
   typedef double number;
 
@@ -2415,37 +2415,37 @@ ConstraintMatrix::distribute_local_to_global (
   AssertDimension (local_matrix.n(), col_indices.size());
   //Assert (sorted == true, ExcMatrixNotClosed());
 
-  const unsigned int n_local_row_dofs = row_indices.size();
-  const unsigned int n_local_col_dofs = col_indices.size();
+  const size_type n_local_row_dofs = row_indices.size();
+  const size_type n_local_col_dofs = col_indices.size();
   internals::GlobalRowsFromLocal global_rows (n_local_row_dofs);
   internals::GlobalRowsFromLocal global_cols (n_local_col_dofs);
   make_sorted_row_list (row_indices, global_rows);
   make_sorted_row_list (col_indices, global_cols);
 
-  const unsigned int n_actual_row_dofs = global_rows.size();
-  const unsigned int n_actual_col_dofs = global_cols.size();
+  const size_type n_actual_row_dofs = global_rows.size();
+  const size_type n_actual_col_dofs = global_cols.size();
 
   // create arrays for the column data
   // (indices and values) that will then be
   // written into the matrix. Shortcut for
   // deal.II sparse matrix
-  std::vector<unsigned int> cols (n_actual_col_dofs);
+  std::vector<size_type> cols (n_actual_col_dofs);
   std::vector<number>       vals (n_actual_col_dofs);
 
   // now do the actual job.
-  for (unsigned int i=0; i<n_actual_row_dofs; ++i)
+  for (size_type i=0; i<n_actual_row_dofs; ++i)
     {
-      const unsigned int row = global_rows.global_row(i);
+      const size_type row = global_rows.global_row(i);
 
       // calculate all the data that will be
       // written into the matrix row.
-      unsigned int *col_ptr = &cols[0];
+      size_type *col_ptr = &cols[0];
       number *val_ptr = &vals[0];
       internals::resolve_matrix_row (global_rows, global_cols, i, 0,
                                      n_actual_col_dofs,
                                      local_matrix, col_ptr, val_ptr);
-      const unsigned int n_values = col_ptr - &cols[0];
-      Assert (n_values == (unsigned int)(val_ptr - &vals[0]),
+      const size_type n_values = col_ptr - &cols[0];
+      Assert (n_values == (size_type)(val_ptr - &vals[0]),
               ExcInternalError());
       if (n_values > 0)
         global_matrix.add(row, n_values, &cols[0], &vals[0], false, true);
@@ -2460,12 +2460,12 @@ ConstraintMatrix::distribute_local_to_global (
 template <typename MatrixType, typename VectorType>
 void
 ConstraintMatrix::
-distribute_local_to_global (const FullMatrix<double>        &local_matrix,
-                            const Vector<double>            &local_vector,
-                            const std::vector<unsigned int> &local_dof_indices,
-                            MatrixType                      &global_matrix,
-                            VectorType                      &global_vector,
-                            bool                            use_inhomogeneities_for_rhs,
+distribute_local_to_global (const FullMatrix<double>     &local_matrix,
+                            const Vector<double>         &local_vector,
+                            const std::vector<size_type> &local_dof_indices,
+                            MatrixType                   &global_matrix,
+                            VectorType                   &global_vector,
+                            bool                          use_inhomogeneities_for_rhs,
                             internal::bool2type<true>) const
 {
   const bool use_vectors = (local_vector.size() == 0 &&
@@ -2486,26 +2486,26 @@ distribute_local_to_global (const FullMatrix<double>        &local_matrix,
     }
   Assert (sorted == true, ExcMatrixNotClosed());
 
-  const unsigned int n_local_dofs = local_dof_indices.size();
+  const size_type n_local_dofs = local_dof_indices.size();
   internals::GlobalRowsFromLocal global_rows (n_local_dofs);
   make_sorted_row_list (local_dof_indices, global_rows);
-  const unsigned int n_actual_dofs = global_rows.size();
+  const size_type n_actual_dofs = global_rows.size();
 
-  std::vector<unsigned int> global_indices;
+  std::vector<size_type> global_indices;
   if (use_vectors == true)
     {
       global_indices.resize(n_actual_dofs);
-      for (unsigned int i=0; i<n_actual_dofs; ++i)
+      for (size_type i=0; i<n_actual_dofs; ++i)
         global_indices[i] = global_rows.global_row(i);
     }
 
   // additional construct that also takes
   // care of block indices.
-  const unsigned int num_blocks   = global_matrix.n_block_rows();
-  std::vector<unsigned int> block_starts(num_blocks+1, n_actual_dofs);
+  const size_type num_blocks   = global_matrix.n_block_rows();
+  std::vector<size_type> block_starts(num_blocks+1, n_actual_dofs);
   internals::make_block_starts (global_matrix, global_rows, block_starts);
 
-  std::vector<unsigned int> cols;
+  std::vector<size_type> cols;
   std::vector<number>       vals;
   if (use_dealii_matrix == false)
     {
@@ -2518,26 +2518,26 @@ distribute_local_to_global (const FullMatrix<double>        &local_matrix,
   // through the blocks of the matrix
   // separately, which allows us to set the
   // block entries individually
-  for (unsigned int block=0; block<num_blocks; ++block)
+  for (size_type block=0; block<num_blocks; ++block)
     {
-      const unsigned int next_block = block_starts[block+1];
-      for (unsigned int i=block_starts[block]; i<next_block; ++i)
+      const size_type next_block = block_starts[block+1];
+      for (size_type i=block_starts[block]; i<next_block; ++i)
         {
-          const unsigned int row = global_rows.global_row(i);
+          const size_type row = global_rows.global_row(i);
 
-          for (unsigned int block_col=0; block_col<num_blocks; ++block_col)
+          for (size_type block_col=0; block_col<num_blocks; ++block_col)
             {
-              const unsigned int start_block = block_starts[block_col],
+              const size_type start_block = block_starts[block_col],
                                  end_block = block_starts[block_col+1];
               if (use_dealii_matrix == false)
                 {
-                  unsigned int *col_ptr = &cols[0];
+                  size_type *col_ptr = &cols[0];
                   number *val_ptr = &vals[0];
                   internals::resolve_matrix_row (global_rows, global_rows, i,
                                                  start_block, end_block,
                                                  local_matrix, col_ptr, val_ptr);
-                  const unsigned int n_values = col_ptr - &cols[0];
-                  Assert (n_values == (unsigned int)(val_ptr - &vals[0]),
+                  const size_type n_values = col_ptr - &cols[0];
+                  Assert (n_values == (size_type )(val_ptr - &vals[0]),
                           ExcInternalError());
                   if (n_values > 0)
                     global_matrix.block(block, block_col).add(row, n_values,
@@ -2579,15 +2579,15 @@ distribute_local_to_global (const FullMatrix<double>        &local_matrix,
 template <typename SparsityType>
 void
 ConstraintMatrix::
-add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
-                             SparsityType                    &sparsity_pattern,
-                             const bool                       keep_constrained_entries,
-                             const Table<2,bool>             &dof_mask,
+add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
+                             SparsityType                 &sparsity_pattern,
+                             const bool                    keep_constrained_entries,
+                             const Table<2,bool>          &dof_mask,
                              internal::bool2type<false> ) const
 {
   Assert (sparsity_pattern.n_rows() == sparsity_pattern.n_cols(), ExcNotQuadratic());
 
-  const unsigned int n_local_dofs = local_dof_indices.size();
+  const size_type n_local_dofs = local_dof_indices.size();
   bool dof_mask_is_active = false;
   if (dof_mask.n_rows() == n_local_dofs)
     {
@@ -2604,15 +2604,15 @@ add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
   // indices that come from constraints.
   if (dof_mask_is_active == false)
     {
-      std::vector<unsigned int> actual_dof_indices (n_local_dofs);
+      std::vector<size_type> actual_dof_indices (n_local_dofs);
       make_sorted_row_list (local_dof_indices, actual_dof_indices);
-      const unsigned int n_actual_dofs = actual_dof_indices.size();
+      const size_type n_actual_dofs = actual_dof_indices.size();
 
       // now add the indices we collected above
       // to the sparsity pattern. Very easy
       // here - just add the same array to all
       // the rows...
-      for (unsigned int i=0; i<n_actual_dofs; ++i)
+      for (size_type i=0; i<n_actual_dofs; ++i)
         sparsity_pattern.add_entries(actual_dof_indices[i],
                                      actual_dof_indices.begin(),
                                      actual_dof_indices.end(),
@@ -2624,11 +2624,11 @@ add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
       // the nice matrix structure we use
       // elsewhere, so manually add those
       // indices one by one.
-      for (unsigned int i=0; i<n_local_dofs; i++)
+      for (size_type i=0; i<n_local_dofs; i++)
         if (is_constrained(local_dof_indices[i]))
           {
             if (keep_constrained_entries == true)
-              for (unsigned int j=0; j<n_local_dofs; j++)
+              for (size_type j=0; j<n_local_dofs; j++)
                 {
                   sparsity_pattern.add (local_dof_indices[i], local_dof_indices[j]);
                   sparsity_pattern.add (local_dof_indices[j], local_dof_indices[i]);
@@ -2648,17 +2648,17 @@ add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
   // for additional comments.
   internals::GlobalRowsFromLocal global_rows (n_local_dofs);
   make_sorted_row_list (local_dof_indices, global_rows);
-  const unsigned int n_actual_dofs = global_rows.size();
+  const size_type n_actual_dofs = global_rows.size();
 
   // create arrays for the column indices
   // that will then be written into the
   // sparsity pattern.
-  std::vector<unsigned int> cols (n_actual_dofs);
+  std::vector<size_type> cols (n_actual_dofs);
 
-  for (unsigned int i=0; i<n_actual_dofs; ++i)
+  for (size_type i=0; i<n_actual_dofs; ++i)
     {
-      std::vector<unsigned int>::iterator col_ptr = cols.begin();
-      const unsigned int row = global_rows.global_row(i);
+      std::vector<size_type>::iterator col_ptr = cols.begin();
+      const size_type row = global_rows.global_row(i);
       internals::resolve_matrix_row (global_rows, i, 0, n_actual_dofs,
                                      dof_mask, col_ptr);
 
@@ -2681,14 +2681,14 @@ add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
 template <typename SparsityType>
 void
 ConstraintMatrix::
-add_entries_local_to_global (const std::vector<unsigned int> &row_indices,
-                             const std::vector<unsigned int> &col_indices,
+add_entries_local_to_global (const std::vector<size_type> &row_indices,
+                             const std::vector<size_type> &col_indices,
                              SparsityType                    &sparsity_pattern,
                              const bool                       keep_constrained_entries,
                              const Table<2,bool>             &dof_mask) const
 {
-  const unsigned int n_local_rows = row_indices.size();
-  const unsigned int n_local_cols = col_indices.size();
+  const size_type n_local_rows = row_indices.size();
+  const size_type n_local_cols = col_indices.size();
   bool dof_mask_is_active = false;
   if (dof_mask.n_rows() == n_local_rows && dof_mask.n_cols() == n_local_cols)
     dof_mask_is_active = true;
@@ -2702,17 +2702,17 @@ add_entries_local_to_global (const std::vector<unsigned int> &row_indices,
   // indices that come from constraints.
   if (dof_mask_is_active == false)
     {
-      std::vector<unsigned int> actual_row_indices (n_local_rows);
-      std::vector<unsigned int> actual_col_indices (n_local_cols);
+      std::vector<size_type> actual_row_indices (n_local_rows);
+      std::vector<size_type> actual_col_indices (n_local_cols);
       make_sorted_row_list (row_indices, actual_row_indices);
       make_sorted_row_list (col_indices, actual_col_indices);
-      const unsigned int n_actual_rows = actual_row_indices.size();
+      const size_type n_actual_rows = actual_row_indices.size();
 
       // now add the indices we collected above
       // to the sparsity pattern. Very easy
       // here - just add the same array to all
       // the rows...
-      for (unsigned int i=0; i<n_actual_rows; ++i)
+      for (size_type i=0; i<n_actual_rows; ++i)
         sparsity_pattern.add_entries(actual_row_indices[i],
                                      actual_col_indices.begin(),
                                      actual_col_indices.end(),
@@ -2725,13 +2725,13 @@ add_entries_local_to_global (const std::vector<unsigned int> &row_indices,
   // of those to the sparsity pattern
   if (keep_constrained_entries == true)
     {
-      for (unsigned int i=0; i<row_indices.size(); i++)
+      for (size_type i=0; i<row_indices.size(); i++)
         if (is_constrained(row_indices[i]))
-          for (unsigned int j=0; j<col_indices.size(); j++)
+          for (size_type j=0; j<col_indices.size(); j++)
             sparsity_pattern.add (row_indices[i], col_indices[j]);
-      for (unsigned int i=0; i<col_indices.size(); i++)
+      for (size_type i=0; i<col_indices.size(); i++)
         if (is_constrained(col_indices[i]))
-          for (unsigned int j=0; j<row_indices.size(); j++)
+          for (size_type j=0; j<row_indices.size(); j++)
             sparsity_pattern.add (row_indices[j], col_indices[i]);
     }
 
@@ -2746,10 +2746,10 @@ add_entries_local_to_global (const std::vector<unsigned int> &row_indices,
 template <typename SparsityType>
 void
 ConstraintMatrix::
-add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
-                             SparsityType                    &sparsity_pattern,
-                             const bool                       keep_constrained_entries,
-                             const Table<2,bool>             &dof_mask,
+add_entries_local_to_global (const std::vector<size_type> &local_dof_indices,
+                             SparsityType                 &sparsity_pattern,
+                             const bool                    keep_constrained_entries,
+                             const Table<2,bool>          &dof_mask,
                              internal::bool2type<true> ) const
 {
   // just as the other
@@ -2760,8 +2760,8 @@ add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
   Assert (sparsity_pattern.n_block_rows() == sparsity_pattern.n_block_cols(),
           ExcNotQuadratic());
 
-  const unsigned int n_local_dofs = local_dof_indices.size();
-  const unsigned int num_blocks = sparsity_pattern.n_block_rows();
+  const size_type n_local_dofs = local_dof_indices.size();
+  const size_type num_blocks = sparsity_pattern.n_block_rows();
 
   bool dof_mask_is_active = false;
   if (dof_mask.n_rows() == n_local_dofs)
@@ -2772,29 +2772,29 @@ add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
 
   if (dof_mask_is_active == false)
     {
-      std::vector<unsigned int> actual_dof_indices (n_local_dofs);
+      std::vector<size_type> actual_dof_indices (n_local_dofs);
       make_sorted_row_list (local_dof_indices, actual_dof_indices);
-      const unsigned int n_actual_dofs = actual_dof_indices.size();
+      const size_type n_actual_dofs = actual_dof_indices.size();
 
       // additional construct that also takes
       // care of block indices.
-      std::vector<unsigned int> block_starts(num_blocks+1, n_actual_dofs);
+      std::vector<size_type> block_starts(num_blocks+1, n_actual_dofs);
       internals::make_block_starts (sparsity_pattern, actual_dof_indices,
                                     block_starts);
 
-      for (unsigned int block=0; block<num_blocks; ++block)
+      for (size_type block=0; block<num_blocks; ++block)
         {
-          const unsigned int next_block = block_starts[block+1];
-          for (unsigned int i=block_starts[block]; i<next_block; ++i)
+          const size_type next_block = block_starts[block+1];
+          for (size_type i=block_starts[block]; i<next_block; ++i)
             {
               Assert (i<n_actual_dofs, ExcInternalError());
-              const unsigned int row = actual_dof_indices[i];
+              const size_type row = actual_dof_indices[i];
               Assert (row < sparsity_pattern.block(block,0).n_rows(),
                       ExcInternalError());
-              std::vector<unsigned int>::iterator index_it = actual_dof_indices.begin();
-              for (unsigned int block_col = 0; block_col<num_blocks; ++block_col)
+              std::vector<size_type>::iterator index_it = actual_dof_indices.begin();
+              for (size_type block_col = 0; block_col<num_blocks; ++block_col)
                 {
-                  const unsigned int next_block_col = block_starts[block_col+1];
+                  const size_type next_block_col = block_starts[block_col+1];
                   sparsity_pattern.block(block,block_col).
                   add_entries(row,
                               index_it,
@@ -2805,11 +2805,11 @@ add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
             }
         }
 
-      for (unsigned int i=0; i<n_local_dofs; i++)
+      for (size_type i=0; i<n_local_dofs; i++)
         if (is_constrained(local_dof_indices[i]))
           {
             if (keep_constrained_entries == true)
-              for (unsigned int j=0; j<n_local_dofs; j++)
+              for (size_type j=0; j<n_local_dofs; j++)
                 {
                   sparsity_pattern.add (local_dof_indices[i], local_dof_indices[j]);
                   sparsity_pattern.add (local_dof_indices[j], local_dof_indices[i]);
@@ -2826,31 +2826,31 @@ add_entries_local_to_global (const std::vector<unsigned int> &local_dof_indices,
   // function for block matrices
   internals::GlobalRowsFromLocal global_rows (n_local_dofs);
   make_sorted_row_list (local_dof_indices, global_rows);
-  const unsigned int n_actual_dofs = global_rows.size();
+  const size_type n_actual_dofs = global_rows.size();
 
   // additional construct that also takes
   // care of block indices.
-  std::vector<unsigned int> block_starts(num_blocks+1, n_actual_dofs);
+  std::vector<size_type> block_starts(num_blocks+1, n_actual_dofs);
   internals::make_block_starts(sparsity_pattern, global_rows,
                                block_starts);
 
-  std::vector<unsigned int> cols (n_actual_dofs);
+  std::vector<size_type> cols (n_actual_dofs);
 
   // the basic difference to the
   // non-block variant from now onwards
   // is that we go through the blocks
   // of the matrix separately.
-  for (unsigned int block=0; block<num_blocks; ++block)
+  for (size_type block=0; block<num_blocks; ++block)
     {
-      const unsigned int next_block = block_starts[block+1];
-      for (unsigned int i=block_starts[block]; i<next_block; ++i)
+      const size_type next_block = block_starts[block+1];
+      for (size_type i=block_starts[block]; i<next_block; ++i)
         {
-          const unsigned int row = global_rows.global_row(i);
-          for (unsigned int block_col=0; block_col<num_blocks; ++block_col)
+          const size_type row = global_rows.global_row(i);
+          for (size_type block_col=0; block_col<num_blocks; ++block_col)
             {
-              const unsigned int begin_block = block_starts[block_col],
+              const size_type begin_block = block_starts[block_col],
                                  end_block = block_starts[block_col+1];
-              std::vector<unsigned int>::iterator col_ptr = cols.begin();
+              std::vector<size_type>::iterator col_ptr = cols.begin();
               internals::resolve_matrix_row (global_rows, i, begin_block,
                                              end_block, dof_mask, col_ptr);
 
index 221570efd034cc1c7492677538529a795e74c56a..3ddbee9d6c24f5e362d474497bf1994d1226d63a 100644 (file)
@@ -55,6 +55,11 @@ namespace parallel
     class BlockVector : public BlockVectorBase<Vector<Number> >
     {
     public:
+      /**
+       * Declare the type for container size.
+       */
+      typedef std::size_t size_type;
+
       /**
        * Typedef the base class for simpler
        * access to its own typedefs.
@@ -100,8 +105,8 @@ namespace parallel
        *  use blocks of different
        *  sizes.
        */
-      explicit BlockVector (const unsigned int num_blocks = 0,
-                            const unsigned int block_size = 0);
+      explicit BlockVector (const size_type num_blocks = 0,
+                            const size_type block_size = 0);
 
       /**
        * Copy-Constructor. Dimension set to
@@ -145,7 +150,7 @@ namespace parallel
        * <tt>block_sizes[i]</tt> zero
        * elements.
        */
-      BlockVector (const std::vector<unsigned int> &block_sizes);
+      BlockVector (const std::vector<size_type> &block_sizes);
 
       /**
        * Destructor. Clears memory
@@ -203,8 +208,8 @@ namespace parallel
        * If <tt>fast==false</tt>, the vector
        * is filled with zeros.
        */
-      void reinit (const unsigned int num_blocks,
-                   const unsigned int block_size = 0,
+      void reinit (const size_type num_blocks,
+                   const size_type block_size = 0,
                    const bool fast = false);
 
       /**
@@ -238,8 +243,8 @@ namespace parallel
        * since they may be routed to
        * the wrong block.
        */
-      void reinit (const std::vector<unsigned int> &N,
-                   const bool                       fast=false);
+      void reinit (const std::vector<size_type> &N,
+                   const bool                    fast=false);
 
       /**
        * Change the dimension to that
@@ -344,8 +349,8 @@ namespace parallel
 
     template <typename Number>
     inline
-    BlockVector<Number>::BlockVector (const unsigned int n_blocks,
-                                      const unsigned int block_size)
+    BlockVector<Number>::BlockVector (const size_type n_blocks,
+                                      const size_type block_size)
     {
       reinit (n_blocks, block_size);
     }
@@ -354,7 +359,7 @@ namespace parallel
 
     template <typename Number>
     inline
-    BlockVector<Number>::BlockVector (const std::vector<unsigned int> &n)
+    BlockVector<Number>::BlockVector (const std::vector<size_type> &n)
     {
       reinit (n, false);
     }
@@ -370,7 +375,7 @@ namespace parallel
       this->components.resize (v.n_blocks());
       this->block_indices = v.block_indices;
 
-      for (unsigned int i=0; i<this->n_blocks(); ++i)
+      for (size_type i=0; i<this->n_blocks(); ++i)
         this->components[i] = v.components[i];
     }
 
@@ -392,25 +397,25 @@ namespace parallel
 
     template <typename Number>
     inline
-    void BlockVector<Number>::reinit (const unsigned int n_bl,
-                                      const unsigned int bl_sz,
+    void BlockVector<Number>::reinit (const size_type n_bl,
+                                      const size_type bl_sz,
                                       const bool         fast)
     {
-      std::vector<unsigned int> n(n_bl, bl_sz);
+      std::vector<size_type> n(n_bl, bl_sz);
       reinit(n, fast);
     }
 
 
     template <typename Number>
     inline
-    void BlockVector<Number>::reinit (const std::vector<unsigned int> &n,
-                                      const bool                       fast)
+    void BlockVector<Number>::reinit (const std::vector<size_type> &n,
+                                      const bool                    fast)
     {
       this->block_indices.reinit (n);
       if (this->components.size() != this->n_blocks())
         this->components.resize(this->n_blocks());
 
-      for (unsigned int i=0; i<this->n_blocks(); ++i)
+      for (size_type i=0; i<this->n_blocks(); ++i)
         this->components[i].reinit(n[i], fast);
     }
 
@@ -426,7 +431,7 @@ namespace parallel
       if (this->components.size() != this->n_blocks())
         this->components.resize(this->n_blocks());
 
-      for (unsigned int i=0; i<this->n_blocks(); ++i)
+      for (size_type i=0; i<this->n_blocks(); ++i)
         this->block(i).reinit(v.block(i), fast);
     }
 
@@ -496,7 +501,7 @@ namespace parallel
       Assert (this->n_blocks() == v.n_blocks(),
               ExcDimensionMismatch(this->n_blocks(), v.n_blocks()));
 
-      for (unsigned int i=0; i<this->n_blocks(); ++i)
+      for (size_type i=0; i<this->n_blocks(); ++i)
         dealii::swap (this->components[i], v.components[i]);
       dealii::swap (this->block_indices, v.block_indices);
     }
@@ -509,7 +514,7 @@ namespace parallel
 
       Assert (numbers::is_finite(factor), ExcNumberNotFinite());
 
-      for (unsigned int i=0; i<this->n_blocks(); ++i)
+      for (size_type i=0; i<this->n_blocks(); ++i)
         this->components[i].scale(factor);
     }
 
index a99f840b488312e75662a853a4d95f1430fc9194..96a96cd17022cf2c26a883701d02e2d5cf608e2b 100644 (file)
@@ -84,6 +84,11 @@ namespace parallel
     class Vector : public Subscriptor
     {
     public:
+      /**
+       * Declare the type for container size.
+       */
+      typedef std::size_t size_type;
+
       /**
        * Declare standard types used in all
        * containers. These types parallel those in
@@ -120,7 +125,7 @@ namespace parallel
        * global size without any actual parallel
        * distribution.
        */
-      Vector (const unsigned int size);
+      Vector (const size_type size);
 
       /**
        * Constructs a parallel vector. The local
@@ -165,8 +170,8 @@ namespace parallel
        * size without any actual parallel
        * distribution.
        */
-      void reinit (const unsigned int size,
-                   const bool         fast = false);
+      void reinit (const size_type size,
+                   const bool      fast = false);
 
       /**
        * Uses the parallel layout of the input
@@ -487,13 +492,13 @@ namespace parallel
        * equal to the sum of the number of locally
        * owned indices among all the processors.
        */
-      types::global_dof_index size () const;
+      size_type size () const;
 
       /**
        * Returns the local size of the vector, i.e.,
        * the number of indices owned locally.
        */
-      unsigned int local_size() const;
+      size_type local_size() const;
 
       /**
        * Returns the half-open interval that
@@ -502,19 +507,19 @@ namespace parallel
        * local_range().second -
        * local_range().first</code>.
        */
-      std::pair<types::global_dof_index, types::global_dof_index> local_range () const;
+      std::pair<size_type, size_type> local_range () const;
 
       /**
        * Returns true if the given global index is
        * in the local range of this processor.
        */
-      bool in_local_range (const types::global_dof_index global_index) const;
+      bool in_local_range (const size_type global_index) const;
 
       /**
        * Returns the number of ghost elements
        * present on the vector.
        */
-      unsigned int n_ghost_entries () const;
+      size_type n_ghost_entries () const;
 
       /**
        * Returns whether the given global index is a
@@ -523,7 +528,7 @@ namespace parallel
        * are owned locally and for indices not
        * present at all.
        */
-      bool is_ghost_entry (const types::global_dof_index global_index) const;
+      bool is_ghost_entry (const size_type global_index) const;
 
       /**
        * Make the @p Vector class a bit like
@@ -569,7 +574,7 @@ namespace parallel
        * vector or be specified as a ghost
        * index at construction.
        */
-      Number operator () (const types::global_dof_index global_index) const;
+      Number operator () (const size_type global_index) const;
 
       /**
        * Read and write access to the data
@@ -579,7 +584,7 @@ namespace parallel
        * vector or be specified as a ghost
        * index at construction.
        */
-      Number &operator () (const types::global_dof_index global_index);
+      Number &operator () (const size_type global_index);
 
       /**
        * Read access to the data in the
@@ -592,7 +597,7 @@ namespace parallel
        * This function does the same thing
        * as operator().
        */
-      Number operator [] (const types::global_dof_index global_index) const;
+      Number operator [] (const size_type global_index) const;
 
       /**
        * Read and write access to the data
@@ -605,7 +610,7 @@ namespace parallel
        * This function does the same thing
        * as operator().
        */
-      Number &operator [] (const types::global_dof_index global_index);
+      Number &operator [] (const size_type global_index);
 
       /**
        * Read access to the data field specified by
@@ -616,7 +621,7 @@ namespace parallel
        * <code>[local_size,local_size+
        * n_ghost_entries]</code>.
        */
-      Number local_element (const unsigned int local_index) const;
+      Number local_element (const size_type local_index) const;
 
       /**
        * Read and write access to the data field
@@ -626,7 +631,7 @@ namespace parallel
        * indices with indices
        * <code>[local_size,local_size+n_ghosts]</code>.
        */
-      Number &local_element (const unsigned int local_index);
+      Number &local_element (const size_type local_index);
       //@}
 
 
@@ -656,7 +661,7 @@ namespace parallel
        * indices.
        */
       template <typename OtherNumber>
-      void add (const std::vector<unsigned int> &indices,
+      void add (const std::vector<size_type>   &indices,
                 const std::vector<OtherNumber> &values);
 
       /**
@@ -667,7 +672,7 @@ namespace parallel
        * values.
        */
       template <typename OtherNumber>
-      void add (const std::vector<unsigned int>     &indices,
+      void add (const std::vector<size_type>        &indices,
                 const ::dealii::Vector<OtherNumber> &values);
 
       /**
@@ -680,8 +685,8 @@ namespace parallel
        * functions above.
        */
       template <typename OtherNumber>
-      void add (const unsigned int  n_elements,
-                const unsigned int *indices,
+      void add (const size_type    n_elements,
+                const size_type   *indices,
                 const OtherNumber *values);
 
       /**
@@ -896,7 +901,7 @@ namespace parallel
        * The size that is currently allocated in the
        * val array.
        */
-      unsigned int    allocated_size;
+      size_type allocated_size;
 
       /**
        * Pointer to the array of
@@ -963,7 +968,7 @@ namespace parallel
        * A helper function that is used to resize
        * the val array.
        */
-      void resize_val (const unsigned int new_allocated_size);
+      void resize_val (const size_type new_allocated_size);
 
       /*
        * Make all other vector types
@@ -1026,7 +1031,7 @@ namespace parallel
 
     template <typename Number>
     inline
-    Vector<Number>::Vector (const unsigned int size)
+    Vector<Number>::Vector (const size_type size)
       :
       allocated_size (0),
       val (0),
@@ -1086,7 +1091,7 @@ namespace parallel
         reinit (c, true);
       else if (partitioner.get() != c.partitioner.get())
         {
-          unsigned int local_ranges_different_loc = (local_range() !=
+          size_type local_ranges_different_loc = (local_range() !=
                                                      c.local_range());
           if ((partitioner->n_mpi_processes() > 1 &&
                Utilities::MPI::max(local_ranges_different_loc,
@@ -1118,7 +1123,7 @@ namespace parallel
         reinit (c, true);
       else if (partitioner.get() != c.partitioner.get())
         {
-          unsigned int local_ranges_different_loc = (local_range() !=
+          size_type local_ranges_different_loc = (local_range() !=
                                                      c.local_range());
           if ((partitioner->n_mpi_processes() > 1 &&
                Utilities::MPI::max(local_ranges_different_loc,
@@ -1373,7 +1378,7 @@ namespace parallel
 
     template <typename Number>
     inline
-    types::global_dof_index Vector<Number>::size () const
+    size_type Vector<Number>::size () const
     {
       return partitioner->size();
     }
@@ -1382,7 +1387,7 @@ namespace parallel
 
     template <typename Number>
     inline
-    unsigned int Vector<Number>::local_size () const
+    size_type Vector<Number>::local_size () const
     {
       return partitioner->local_size();
     }
@@ -1391,7 +1396,7 @@ namespace parallel
 
     template <typename Number>
     inline
-    std::pair<types::global_dof_index, types::global_dof_index>
+    std::pair<size_type, size_type>
     Vector<Number>::local_range () const
     {
       return partitioner->local_range();
@@ -1403,7 +1408,7 @@ namespace parallel
     inline
     bool
     Vector<Number>::in_local_range
-    (const types::global_dof_index global_index) const
+    (const size_type global_index) const
     {
       return partitioner->in_local_range (global_index);
     }
@@ -1412,7 +1417,7 @@ namespace parallel
 
     template <typename Number>
     inline
-    unsigned int
+    size_type 
     Vector<Number>::n_ghost_entries () const
     {
       return partitioner->n_ghost_indices();
@@ -1423,7 +1428,7 @@ namespace parallel
     template <typename Number>
     inline
     bool
-    Vector<Number>::is_ghost_entry (const types::global_dof_index global_index) const
+    Vector<Number>::is_ghost_entry (const size_type global_index) const
     {
       return partitioner->is_ghost_entry (global_index);
     }
@@ -1473,7 +1478,7 @@ namespace parallel
     template <typename Number>
     inline
     Number
-    Vector<Number>::operator() (const types::global_dof_index global_index) const
+    Vector<Number>::operator() (const size_type global_index) const
     {
       return val[partitioner->global_to_local(global_index)];
     }
@@ -1483,7 +1488,7 @@ namespace parallel
     template <typename Number>
     inline
     Number &
-    Vector<Number>::operator() (const types::global_dof_index global_index)
+    Vector<Number>::operator() (const size_type global_index)
     {
       return val[partitioner->global_to_local (global_index)];
     }
@@ -1493,7 +1498,7 @@ namespace parallel
     template <typename Number>
     inline
     Number
-    Vector<Number>::operator[] (const types::global_dof_index global_index) const
+    Vector<Number>::operator[] (const size_type global_index) const
     {
       return operator()(global_index);
     }
@@ -1503,7 +1508,7 @@ namespace parallel
     template <typename Number>
     inline
     Number &
-    Vector<Number>::operator[] (const types::global_dof_index global_index)
+    Vector<Number>::operator[] (const size_type global_index)
     {
       return operator()(global_index);
     }
@@ -1513,7 +1518,7 @@ namespace parallel
     template <typename Number>
     inline
     Number
-    Vector<Number>::local_element (const unsigned int local_index) const
+    Vector<Number>::local_element (const size_type local_index) const
     {
       AssertIndexRange (local_index,
                         partitioner->local_size()+
@@ -1526,7 +1531,7 @@ namespace parallel
     template <typename Number>
     inline
     Number &
-    Vector<Number>::local_element (const unsigned int local_index)
+    Vector<Number>::local_element (const size_type local_index)
     {
       AssertIndexRange (local_index,
                         partitioner->local_size()+
@@ -1589,7 +1594,7 @@ namespace parallel
     template <typename OtherNumber>
     inline
     void
-    Vector<Number>::add (const std::vector<unsigned int> &indices,
+    Vector<Number>::add (const std::vector<size_type> &indices,
                          const std::vector<OtherNumber> &values)
     {
       AssertDimension (indices.size(), values.size());
@@ -1602,7 +1607,7 @@ namespace parallel
     template <typename OtherNumber>
     inline
     void
-    Vector<Number>::add (const std::vector<unsigned int>    &indices,
+    Vector<Number>::add (const std::vector<size_type>    &indices,
                          const ::dealii::Vector<OtherNumber> &values)
     {
       AssertDimension (indices.size(), values.size());
@@ -1615,11 +1620,11 @@ namespace parallel
     template <typename OtherNumber>
     inline
     void
-    Vector<Number>::add (const unsigned int  n_indices,
-                         const unsigned int *indices,
+    Vector<Number>::add (const size_type    n_indices,
+                         const size_type   *indices,
                          const OtherNumber *values)
     {
-      for (unsigned int i=0; i<n_indices; ++i)
+      for (size_type i=0; i<n_indices; ++i)
         {
           Assert (numbers::is_finite(values[i]),
                   ExcMessage("The given value is not finite but either infinite or Not A Number (NaN)"));
index 10b601f0cd66296f080b9768d3dbbb67e49a18b0..ec542b35bf6401e68529a890712791c49dcdc3f2 100644 (file)
@@ -29,10 +29,10 @@ namespace parallel
     Vector<Number>::clear_mpi_requests ()
     {
 #ifdef DEAL_II_COMPILER_SUPPORTS_MPI
-      for (unsigned int j=0; j<compress_requests.size(); j++)
+      for (size_type j=0; j<compress_requests.size(); j++)
         MPI_Request_free(&compress_requests[j]);
       compress_requests.clear();
-      for (unsigned int j=0; j<update_ghost_values_requests.size(); j++)
+      for (size_type j=0; j<update_ghost_values_requests.size(); j++)
         MPI_Request_free(&update_ghost_values_requests[j]);
       update_ghost_values_requests.clear();
 #endif
@@ -42,7 +42,7 @@ namespace parallel
 
     template <typename Number>
     void
-    Vector<Number>::resize_val (const unsigned int new_alloc_size)
+    Vector<Number>::resize_val (const size_type new_alloc_size)
     {
       if (new_alloc_size > allocated_size)
         {
@@ -66,8 +66,8 @@ namespace parallel
 
     template <typename Number>
     void
-    Vector<Number>::reinit (const unsigned int size,
-                            const bool         fast)
+    Vector<Number>::reinit (const size_type size,
+                            const bool      fast)
     {
       clear_mpi_requests();
       // check whether we need to reallocate
@@ -107,8 +107,8 @@ namespace parallel
       if (partitioner.get() != v.partitioner.get())
         {
           partitioner = v.partitioner;
-          const unsigned int new_allocated_size = partitioner->local_size() +
-                                                  partitioner->n_ghost_indices();
+          const size_type new_allocated_size = partitioner->local_size() +
+                                               partitioner->n_ghost_indices();
           resize_val (new_allocated_size);
           vector_view.reinit (partitioner->local_size(), val);
         }
@@ -159,8 +159,8 @@ namespace parallel
       partitioner = partitioner_in;
 
       // set vector size and allocate memory
-      const unsigned int new_allocated_size = partitioner->local_size() +
-                                              partitioner->n_ghost_indices();
+      const size_type new_allocated_size = partitioner->local_size() +
+                                           partitioner->n_ghost_indices();
       resize_val (new_allocated_size);
       vector_view.reinit (partitioner->local_size(), val);
 
@@ -213,8 +213,8 @@ namespace parallel
       // make this function thread safe
       Threads::Mutex::ScopedLock lock (mutex);
 
-      const unsigned int n_import_targets = part.import_targets().size();
-      const unsigned int n_ghost_targets  = part.ghost_targets().size();
+      const size_type n_import_targets = part.import_targets().size();
+      const size_type n_ghost_targets  = part.ghost_targets().size();
 
       // Need to send and receive the data. Use
       // non-blocking communication, where it is
@@ -232,7 +232,7 @@ namespace parallel
           // up yet
           if (import_data == 0)
             import_data = new Number[part.n_import_indices()];
-          for (unsigned int i=0; i<n_import_targets; i++)
+          for (size_type i=0; i<n_import_targets; i++)
             {
               MPI_Recv_init (&import_data[current_index_start],
                              part.import_targets()[i].second*sizeof(Number),
@@ -248,7 +248,7 @@ namespace parallel
 
           Assert (part.local_size() == vector_view.size(), ExcInternalError());
           current_index_start = part.local_size();
-          for (unsigned int i=0; i<n_ghost_targets; i++)
+          for (size_type i=0; i<n_ghost_targets; i++)
             {
               MPI_Send_init (&this->val[current_index_start],
                              part.ghost_targets()[i].second*sizeof(Number),
@@ -294,8 +294,8 @@ namespace parallel
       // make this function thread safe
       Threads::Mutex::ScopedLock lock (mutex);
 
-      const unsigned int n_import_targets = part.import_targets().size();
-      const unsigned int n_ghost_targets  = part.ghost_targets().size();
+      const size_type n_import_targets = part.import_targets().size();
+      const size_type n_ghost_targets  = part.ghost_targets().size();
 
       AssertDimension (n_ghost_targets+n_import_targets,
                        compress_requests.size());
@@ -309,7 +309,7 @@ namespace parallel
           Assert (ierr == MPI_SUCCESS, ExcInternalError());
 
           Number *read_position = import_data;
-          std::vector<std::pair<unsigned int, unsigned int> >::const_iterator
+          std::vector<std::pair<size_type, size_type> >::const_iterator
           my_imports = part.import_indices().begin();
 
           // If add_ghost_data is set, add the imported
@@ -317,11 +317,11 @@ namespace parallel
           // vector entries.
           if (add_ghost_data == true)
             for ( ; my_imports!=part.import_indices().end(); ++my_imports)
-              for (unsigned int j=my_imports->first; j<my_imports->second; j++)
+              for (size_type j=my_imports->first; j<my_imports->second; j++)
                 local_element(j) += *read_position++;
           else
             for ( ; my_imports!=part.import_indices().end(); ++my_imports)
-              for (unsigned int j=my_imports->first; j<my_imports->second; j++)
+              for (size_type j=my_imports->first; j<my_imports->second; j++)
                 local_element(j) = *read_position++;
           AssertDimension(read_position-import_data,part.n_import_indices());
         }
@@ -359,8 +359,8 @@ namespace parallel
       // make this function thread safe
       Threads::Mutex::ScopedLock lock (mutex);
 
-      const unsigned int n_import_targets = part.import_targets().size();
-      const unsigned int n_ghost_targets = part.ghost_targets().size();
+      const size_type n_import_targets = part.import_targets().size();
+      const size_type n_ghost_targets = part.ghost_targets().size();
 
       // Need to send and receive the data. Use
       // non-blocking communication, where it is
@@ -370,9 +370,9 @@ namespace parallel
         {
           Assert (part.local_size() == vector_view.size(),
                   ExcInternalError());
-          unsigned int current_index_start = part.local_size();
+          size_type current_index_start = part.local_size();
           update_ghost_values_requests.resize (n_import_targets+n_ghost_targets);
-          for (unsigned int i=0; i<n_ghost_targets; i++)
+          for (size_type i=0; i<n_ghost_targets; i++)
             {
               // allow writing into ghost indices even
               // though we are in a const function
@@ -394,7 +394,7 @@ namespace parallel
           if (import_data == 0 && part.n_import_indices() > 0)
             import_data = new Number[part.n_import_indices()];
           current_index_start = 0;
-          for (unsigned int i=0; i<n_import_targets; i++)
+          for (size_type i=0; i<n_import_targets; i++)
             {
               MPI_Send_init (&import_data[current_index_start],
                              part.import_targets()[i].second*sizeof(Number),
@@ -414,10 +414,10 @@ namespace parallel
         {
           Assert (import_data != 0, ExcInternalError());
           Number *write_position = import_data;
-          std::vector<std::pair<unsigned int, unsigned int> >::const_iterator
+          std::vector<std::pair<size_type, size_type> >::const_iterator
           my_imports = part.import_indices().begin();
           for ( ; my_imports!=part.import_indices().end(); ++my_imports)
-            for (unsigned int j=my_imports->first; j<my_imports->second; j++)
+            for (size_type j=my_imports->first; j<my_imports->second; j++)
               *write_position++ = local_element(j);
         }
 
@@ -552,19 +552,19 @@ namespace parallel
           << partitioner->size() << std::endl
           << "Vector data:" << std::endl;
       if (across)
-        for (unsigned int i=0; i<partitioner->local_size(); ++i)
+        for (size_type i=0; i<partitioner->local_size(); ++i)
           out << local_element(i) << ' ';
       else
-        for (unsigned int i=0; i<partitioner->local_size(); ++i)
+        for (size_type i=0; i<partitioner->local_size(); ++i)
           out << local_element(i) << std::endl;
       out << std::endl;
       out << "Ghost entries (global index / value):" << std::endl;
       if (across)
-        for (unsigned int i=0; i<partitioner->n_ghost_indices(); ++i)
+        for (size_type i=0; i<partitioner->n_ghost_indices(); ++i)
           out << '(' << partitioner->ghost_indices().nth_index_in_set(i)
               << '/' << local_element(partitioner->local_size()+i) << ") ";
       else
-        for (unsigned int i=0; i<partitioner->n_ghost_indices(); ++i)
+        for (size_type i=0; i<partitioner->n_ghost_indices(); ++i)
           out << '(' << partitioner->ghost_indices().nth_index_in_set(i)
               << '/' << local_element(partitioner->local_size()+i) << ")"
               << std::endl;
@@ -573,7 +573,7 @@ namespace parallel
 #ifdef DEAL_II_COMPILER_SUPPORTS_MPI
       MPI_Barrier (partitioner->get_communicator());
 
-      for (unsigned int i=partitioner->this_mpi_process()+1;
+      for (size_type i=partitioner->this_mpi_process()+1;
            i<partitioner->n_mpi_processes(); i++)
         MPI_Barrier (partitioner->get_communicator());
 #endif
index 1a5dc2d2ec61f7ca2c01af11c9c9340d8f920c5c..01b733e0b6985be7e6a5b63ce975a38fdfe58b86 100644 (file)
@@ -75,7 +75,7 @@ namespace TrilinosWrappers
      */
     typedef std::size_t size_type;
 
-#ifdef EPETRA_NO_64BIT_GLOBAL_INDICES
+#ifdef DEAL_II_EPETRA_NO_64BIT_GLOBAL_INDICES
     /**
      * Declare the type of integer.
      */
index 4c5542d5d2bda45c8e555f7504624e12c4bf20c9..a649ffb011a429ab77ebba09ae22f601a321d3e1 100644 (file)
@@ -77,7 +77,7 @@ namespace TrilinosWrappers
      */ 
     typedef std::size_t size_type;
 
-#ifdef EPETRA_NO_64BIT_GLOBAL_INDICES
+#ifdef DEAL_II_EPETRA_NO_64BIT_GLOBAL_INDICES
     /**
      * Declare type of integer.
      */
index 3b89fde249076d325319c77efc2f2623317bc9cb..931b4a385f0280b274594e6147e0ca65107baeea 100644 (file)
@@ -103,7 +103,7 @@ namespace TrilinosWrappers
        */
       typedef std::size_t size_type;
 
-#ifdef EPETRA_NO_64BIT_GLOBAL_INDICES
+#ifdef DEAL_II_EPETRA_NO_64BIT_GLOBAL_INDICES
       /**
        * Declare type of integer.
        */
index 6588ba70535351c6dd339b77839fb2aed86a8c4a..b1ec5e4c72e118ef4a8cb779c198a6831f87bd3a 100644 (file)
@@ -75,7 +75,7 @@ namespace TrilinosWrappers
        */
       typedef std::size_t size_type;
 
-#ifdef EPETRA_NO_64BIT_GLOBAL_INDICES
+#ifdef DEAL_II_EPETRA_NO_64BIT_GLOBAL_INDICES
       /**
        * Declare type of integer.
        */
index 4436f4542ee7392f3a2df78ec27fdd816d691614..e246ac093df221cdcc1fce6a397e622f04ab6b40 100644 (file)
@@ -171,7 +171,7 @@ namespace TrilinosWrappers
        */
       typedef std::size_t size_type;
 
-#ifdef EPETRA_NO_64BIT_GLOBAL_INDICES
+#ifdef DEAL_II_EPETRA_NO_64BIT_GLOBAL_INDICES
       /**
        * Declare type of integer.
        */
index 64068ae42f8f2c3fcd98073f5b9f64778de6c2c3..8ac308fbf1862075b354b72dd397c6451d02f680 100644 (file)
@@ -99,7 +99,7 @@ namespace TrilinosWrappers
        */
       typedef std::size_t size_type;
 
-#ifdef EPETRA_NO_64BIT_GLOBAL_INDICES
+#ifdef DEAL_II_EPETRA_NO_64BIT_GLOBAL_INDICES
       /**
        * Declare type of integer.
        */
index f316827928d6ba68d3dd1deb87a962c2478aacc6..98139d2966e24ea99052145a50d8916442ca2297 100644 (file)
@@ -585,7 +585,7 @@ public:
    * Since this is not a distributed
    * vector the method always returns true.
    */
-  bool in_local_range (const types::global_dof_index global_index) const;
+  bool in_local_range (const size_type global_index) const;
 
   /**
    * Return dimension of the vector.
@@ -1200,7 +1200,7 @@ size_type Vector<Number>::size () const
 template <typename Number>
 inline
 bool Vector<Number>::in_local_range
-(const types::global_dof_index) const
+(const size_type) const
 {
   return true;
 }
index e62f320d3538c07fdbca792223dd30c046abfd87..3a63bce74f65ee543436ae58a4279390b92527f6 100644 (file)
@@ -51,8 +51,8 @@ BlockMatrixArray<number>::BlockMatrixArray ()
 
 template <typename number>
 BlockMatrixArray<number>::BlockMatrixArray (
-  const unsigned int n_block_rows,
-  const unsigned int n_block_cols)
+  const size_type n_block_rows,
+  const size_type n_block_cols)
   : block_rows (n_block_rows),
     block_cols (n_block_cols)
 {}
@@ -60,8 +60,8 @@ BlockMatrixArray<number>::BlockMatrixArray (
 
 template <typename number>
 BlockMatrixArray<number>::BlockMatrixArray (
-  const unsigned int n_block_rows,
-  const unsigned int n_block_cols,
+  const size_type n_block_rows,
+  const size_type n_block_cols,
   VectorMemory<Vector<number> > &)
   : block_rows (n_block_rows),
     block_cols (n_block_cols)
@@ -71,8 +71,8 @@ BlockMatrixArray<number>::BlockMatrixArray (
 template <typename number>
 void
 BlockMatrixArray<number>::initialize (
-  const unsigned int n_block_rows,
-  const unsigned int n_block_cols,
+  const size_type n_block_rows,
+  const size_type n_block_cols,
   VectorMemory<Vector<number> > &)
 {
   block_rows = n_block_rows;
@@ -83,8 +83,8 @@ BlockMatrixArray<number>::initialize (
 template <typename number>
 void
 BlockMatrixArray<number>::initialize (
-  const unsigned int n_block_rows,
-  const unsigned int n_block_cols)
+  const size_type n_block_rows,
+  const size_type n_block_cols)
 {
   block_rows = n_block_rows;
   block_cols = n_block_cols;
@@ -95,8 +95,8 @@ BlockMatrixArray<number>::initialize (
 template <typename number>
 void
 BlockMatrixArray<number>::reinit (
-  const unsigned int n_block_rows,
-  const unsigned int n_block_cols)
+  const size_type n_block_rows,
+  const size_type n_block_cols)
 {
   clear();
   block_rows = n_block_rows;
@@ -218,7 +218,7 @@ BlockMatrixArray<number>::matrix_scalar_product (
 
   number result = 0.;
 
-  for (unsigned int i=0; i<block_rows; ++i)
+  for (size_type i=0; i<block_rows; ++i)
     {
       aux.reinit(u.block(i));
       for (m = entries.begin(); m != end ; ++m)
@@ -249,7 +249,7 @@ BlockMatrixArray<number>::matrix_norm_square (
 
 
 template <typename number>
-unsigned int
+size_type 
 BlockMatrixArray<number>::n_block_rows () const
 {
   return block_rows;
@@ -258,7 +258,7 @@ BlockMatrixArray<number>::n_block_rows () const
 
 
 template <typename number>
-unsigned int
+size_type 
 BlockMatrixArray<number>::n_block_cols () const
 {
   return block_cols;
@@ -277,7 +277,7 @@ BlockTrianglePrecondition<number>::BlockTrianglePrecondition()
 
 template <typename number>
 BlockTrianglePrecondition<number>::BlockTrianglePrecondition(
-  const unsigned int block_rows,
+  const size_type block_rows,
   VectorMemory<Vector<number> > &,
   const bool backward)
   :
@@ -288,7 +288,7 @@ BlockTrianglePrecondition<number>::BlockTrianglePrecondition(
 
 template <typename number>
 BlockTrianglePrecondition<number>::BlockTrianglePrecondition(
-  const unsigned int block_rows)
+  const size_type block_rows)
   :
   BlockMatrixArray<number> (block_rows, block_rows),
   backward(false)
@@ -298,7 +298,7 @@ BlockTrianglePrecondition<number>::BlockTrianglePrecondition(
 template <typename number>
 void
 BlockTrianglePrecondition<number>::initialize(
-  const unsigned int n_block_rows,
+  const size_type n_block_rows,
   VectorMemory<Vector<number> > &,
   const bool backward)
 {
@@ -310,7 +310,7 @@ BlockTrianglePrecondition<number>::initialize(
 template <typename number>
 void
 BlockTrianglePrecondition<number>::reinit (
-  const unsigned int n)
+  const size_type n)
 {
   BlockMatrixArray<number>::reinit(n,n);
 }
@@ -320,7 +320,7 @@ template <typename number>
 void
 BlockTrianglePrecondition<number>::do_row (
   BlockVector<number> &dst,
-  unsigned int row_num) const
+  size_type row_num) const
 {
   GrowingVectorMemory<Vector<number> > mem;
   typename std::vector<typename BlockMatrixArray<number>::Entry>::const_iterator
@@ -339,12 +339,12 @@ BlockTrianglePrecondition<number>::do_row (
   // they are not ordered by rows.
   for (; m != end ; ++m)
     {
-      const unsigned int i=m->row;
+      const size_type i=m->row;
       // Ignore everything not in
       // this row
       if (i != row_num)
         continue;
-      const unsigned int j=m->col;
+      const size_type j=m->col;
       // Only use the lower (upper)
       // triangle for forward
       // (backward) substitution
@@ -379,7 +379,7 @@ BlockTrianglePrecondition<number>::do_row (
   else
     {
       aux = 0.;
-      for (unsigned int i=0; i<diagonals.size(); ++i)
+      for (size_type i=0; i<diagonals.size(); ++i)
         {
           m = diagonals[i];
           // First, divide by the current
@@ -432,12 +432,12 @@ BlockTrianglePrecondition<number>::vmult (
 
   if (backward)
     {
-      for (unsigned int i=n_block_rows(); i>0;)
+      for (size_type i=n_block_rows(); i>0;)
         do_row(dst, --i);
     }
   else
     {
-      for (unsigned int i=0; i<n_block_rows(); ++i)
+      for (size_type i=0; i<n_block_rows(); ++i)
         do_row(dst, i);
     }
 
index d7908543ab6d52f91e52c0119bc343c873459933..0001be1ec222212f86375061293aafe98af14b4d 100644 (file)
@@ -29,8 +29,8 @@ BlockSparsityPatternBase<SparsityPatternBase>::BlockSparsityPatternBase ()
 
 template <class SparsityPatternBase>
 BlockSparsityPatternBase<SparsityPatternBase>::
-BlockSparsityPatternBase (const unsigned int n_block_rows,
-                          const unsigned int n_block_columns)
+BlockSparsityPatternBase (const size_type n_block_rows,
+                          const size_type n_block_columns)
   :
   rows (0),
   columns (0)
@@ -67,14 +67,14 @@ BlockSparsityPatternBase<SparsityPatternBase>::~BlockSparsityPatternBase ()
 template <class SparsityPatternBase>
 void
 BlockSparsityPatternBase<SparsityPatternBase>::
-reinit (const unsigned int n_block_rows,
-        const unsigned int n_block_columns)
+reinit (const size_type n_block_rows,
+        const size_type n_block_columns)
 {
   // delete previous content and
   // clean the sub_objects array
   // completely
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
+  for (size_type i=0; i<rows; ++i)
+    for (size_type j=0; j<columns; ++j)
       {
         SparsityPatternBase *sp = sub_objects[i][j];
         sub_objects[i][j] = 0;
@@ -88,8 +88,8 @@ reinit (const unsigned int n_block_rows,
   sub_objects.reinit (rows, columns);
 
   // allocate new objects
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
+  for (size_type i=0; i<rows; ++i)
+    for (size_type j=0; j<columns; ++j)
       {
         SparsityPatternBase *p = new SparsityPatternBase;
         sub_objects[i][j] = p;
@@ -105,8 +105,8 @@ operator = (const BlockSparsityPatternBase<SparsityPatternBase> &bsp)
   Assert (rows == bsp.rows, ExcDimensionMismatch(rows, bsp.rows));
   Assert (columns == bsp.columns, ExcDimensionMismatch(columns, bsp.columns));
   // copy objects
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
+  for (size_type i=0; i<rows; ++i)
+    for (size_type j=0; j<columns; ++j)
       *sub_objects[i][j] = *bsp.sub_objects[i][j];
   // update index objects
   collect_sizes ();
@@ -120,18 +120,18 @@ template <class SparsityPatternBase>
 void
 BlockSparsityPatternBase<SparsityPatternBase>::collect_sizes ()
 {
-  std::vector<unsigned int> row_sizes (rows);
-  std::vector<unsigned int> col_sizes (columns);
+  std::vector<size_type > row_sizes (rows);
+  std::vector<size_type > col_sizes (columns);
 
   // first find out the row sizes
   // from the first block column
-  for (unsigned int r=0; r<rows; ++r)
+  for (size_type r=0; r<rows; ++r)
     row_sizes[r] = sub_objects[r][0]->n_rows();
   // then check that the following
   // block columns have the same
   // sizes
-  for (unsigned int c=1; c<columns; ++c)
-    for (unsigned int r=0; r<rows; ++r)
+  for (size_type c=1; c<columns; ++c)
+    for (size_type r=0; r<rows; ++r)
       Assert (row_sizes[r] == sub_objects[r][c]->n_rows(),
               ExcIncompatibleRowNumbers (r,0,r,c));
 
@@ -141,10 +141,10 @@ BlockSparsityPatternBase<SparsityPatternBase>::collect_sizes ()
 
 
   // then do the same with the columns
-  for (unsigned int c=0; c<columns; ++c)
+  for (size_type c=0; c<columns; ++c)
     col_sizes[c] = sub_objects[0][c]->n_cols();
-  for (unsigned int r=1; r<rows; ++r)
-    for (unsigned int c=0; c<columns; ++c)
+  for (size_type r=1; r<rows; ++r)
+    for (size_type c=0; c<columns; ++c)
       Assert (col_sizes[c] == sub_objects[r][c]->n_cols(),
               ExcIncompatibleRowNumbers (0,c,r,c));
 
@@ -159,8 +159,8 @@ template <class SparsityPatternBase>
 void
 BlockSparsityPatternBase<SparsityPatternBase>::compress ()
 {
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
+  for (size_type i=0; i<rows; ++i)
+    for (size_type j=0; j<columns; ++j)
       sub_objects[i][j]->compress ();
 }
 
@@ -170,8 +170,8 @@ template <class SparsityPatternBase>
 bool
 BlockSparsityPatternBase<SparsityPatternBase>::empty () const
 {
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
+  for (size_type i=0; i<rows; ++i)
+    for (size_type j=0; j<columns; ++j)
       if (sub_objects[i][j]->empty () == false)
         return false;
   return true;
@@ -180,14 +180,14 @@ BlockSparsityPatternBase<SparsityPatternBase>::empty () const
 
 
 template <class SparsityPatternBase>
-unsigned int
+size_type 
 BlockSparsityPatternBase<SparsityPatternBase>::max_entries_per_row () const
 {
-  unsigned int max_entries = 0;
-  for (unsigned int block_row=0; block_row<rows; ++block_row)
+  size_type max_entries = 0;
+  for (size_type block_row=0; block_row<rows; ++block_row)
     {
-      unsigned int this_row = 0;
-      for (unsigned int c=0; c<columns; ++c)
+      size_type this_row = 0;
+      for (size_type c=0; c<columns; ++c)
         this_row += sub_objects[block_row][c]->max_entries_per_row ();
 
       if (this_row > max_entries)
@@ -199,13 +199,13 @@ BlockSparsityPatternBase<SparsityPatternBase>::max_entries_per_row () const
 
 
 template <class SparsityPatternBase>
-types::global_dof_index
+size_type
 BlockSparsityPatternBase<SparsityPatternBase>::n_rows () const
 {
   // only count in first column, since
   // all rows should be equivalent
-  types::global_dof_index count = 0;
-  for (unsigned int r=0; r<rows; ++r)
+  size_type count = 0;
+  for (size_type r=0; r<rows; ++r)
     count += sub_objects[r][0]->n_rows();
   return count;
 }
@@ -213,13 +213,13 @@ BlockSparsityPatternBase<SparsityPatternBase>::n_rows () const
 
 
 template <class SparsityPatternBase>
-types::global_dof_index
+size_type
 BlockSparsityPatternBase<SparsityPatternBase>::n_cols () const
 {
   // only count in first row, since
   // all rows should be equivalent
-  types::global_dof_index count = 0;
-  for (unsigned int c=0; c<columns; ++c)
+  size_type count = 0;
+  for (size_type c=0; c<columns; ++c)
     count += sub_objects[0][c]->n_cols();
   return count;
 }
@@ -227,12 +227,12 @@ BlockSparsityPatternBase<SparsityPatternBase>::n_cols () const
 
 
 template <class SparsityPatternBase>
-unsigned int
+size_type 
 BlockSparsityPatternBase<SparsityPatternBase>::n_nonzero_elements () const
 {
-  unsigned int count = 0;
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
+  size_type count = 0;
+  for (size_type i=0; i<rows; ++i)
+    for (size_type j=0; j<columns; ++j)
       count += sub_objects[i][j]->n_nonzero_elements ();
   return count;
 }
@@ -243,17 +243,17 @@ template <class SparsityPatternBase>
 void
 BlockSparsityPatternBase<SparsityPatternBase>::print(std::ostream &out) const
 {
-  unsigned int k=0;
-  for (unsigned int ib=0; ib<n_block_rows(); ++ib)
+  size_type k=0;
+  for (size_type ib=0; ib<n_block_rows(); ++ib)
     {
-      for (unsigned int i=0; i<block(ib,0).n_rows(); ++i)
+      for (size_type i=0; i<block(ib,0).n_rows(); ++i)
         {
           out << '[' << i+k;
-          unsigned int l=0;
-          for (unsigned int jb=0; jb<n_block_cols(); ++jb)
+          size_type l=0;
+          for (size_type jb=0; jb<n_block_cols(); ++jb)
             {
               const SparsityPatternBase &b = block(ib,jb);
-              for (unsigned int j=0; j<b.n_cols(); ++j)
+              for (size_type j=0; j<b.n_cols(); ++j)
                 if (b.exists(i,j))
                   out << ',' << l+j;
               l += b.n_cols();
@@ -269,18 +269,18 @@ template <>
 void
 BlockSparsityPatternBase<CompressedSimpleSparsityPattern>::print(std::ostream &out) const
 {
-  unsigned int k=0;
-  for (unsigned int ib=0; ib<n_block_rows(); ++ib)
+  size_type k=0;
+  for (size_type ib=0; ib<n_block_rows(); ++ib)
     {
-      for (unsigned int i=0; i<block(ib,0).n_rows(); ++i)
+      for (size_type i=0; i<block(ib,0).n_rows(); ++i)
         {
           out << '[' << i+k;
-          unsigned int l=0;
-          for (unsigned int jb=0; jb<n_block_cols(); ++jb)
+          size_type l=0;
+          for (size_type jb=0; jb<n_block_cols(); ++jb)
             {
               const CompressedSimpleSparsityPattern &b = block(ib,jb);
               if (b.row_index_set().size()==0 || b.row_index_set().is_element(i))
-                for (unsigned int j=0; j<b.n_cols(); ++j)
+                for (size_type j=0; j<b.n_cols(); ++j)
                   if (b.exists(i,j))
                     out << ',' << l+j;
               l += b.n_cols();
@@ -296,16 +296,16 @@ template <class SparsityPatternBase>
 void
 BlockSparsityPatternBase<SparsityPatternBase>::print_gnuplot(std::ostream &out) const
 {
-  unsigned int k=0;
-  for (unsigned int ib=0; ib<n_block_rows(); ++ib)
+  size_type k=0;
+  for (size_type ib=0; ib<n_block_rows(); ++ib)
     {
-      for (unsigned int i=0; i<block(ib,0).n_rows(); ++i)
+      for (size_type i=0; i<block(ib,0).n_rows(); ++i)
         {
-          unsigned int l=0;
-          for (unsigned int jb=0; jb<n_block_cols(); ++jb)
+          size_type l=0;
+          for (size_type jb=0; jb<n_block_cols(); ++jb)
             {
               const SparsityPatternBase &b = block(ib,jb);
-              for (unsigned int j=0; j<b.n_cols(); ++j)
+              for (size_type j=0; j<b.n_cols(); ++j)
                 if (b.exists(i,j))
                   out << l+j << " " << -static_cast<signed int>(i+k) << std::endl;;
               l += b.n_cols();
@@ -347,8 +347,8 @@ BlockSparsityPattern::BlockSparsityPattern ()
 
 
 
-BlockSparsityPattern::BlockSparsityPattern (const unsigned int n_rows,
-                                            const unsigned int n_columns)
+BlockSparsityPattern::BlockSparsityPattern (const size_type n_rows,
+                                            const size_type n_columns)
   :
   BlockSparsityPatternBase<SparsityPattern>(n_rows,
                                             n_columns)
@@ -359,23 +359,23 @@ void
 BlockSparsityPattern::reinit(
   const BlockIndices &rows,
   const BlockIndices &cols,
-  const std::vector<std::vector<types::global_dof_index> > &row_lengths)
+  const std::vector<std::vector<size_type> > &row_lengths)
 {
   AssertDimension (row_lengths.size(), cols.size());
 
   this->reinit(rows.size(), cols.size());
-  for (unsigned int j=0; j<cols.size(); ++j)
-    for (unsigned int i=0; i<rows.size(); ++i)
+  for (size_type j=0; j<cols.size(); ++j)
+    for (size_type i=0; i<rows.size(); ++i)
       {
-        const unsigned int start = rows.local_to_global(i, 0);
-        const unsigned int length = rows.block_size(i);
+        const size_type start = rows.local_to_global(i, 0);
+        const size_type length = rows.block_size(i);
 
         if (row_lengths[j].size()==1)
           block(i,j).reinit(rows.block_size(i),
                             cols.block_size(j), row_lengths[j][0]);
         else
           {
-            VectorSlice<const std::vector<unsigned int> >
+            VectorSlice<const std::vector<size_type > >
             block_rows(row_lengths[j], start, length);
             block(i,j).reinit(rows.block_size(i),
                               cols.block_size(j),
@@ -391,8 +391,8 @@ BlockSparsityPattern::reinit(
 bool
 BlockSparsityPattern::is_compressed () const
 {
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<columns; ++j)
+  for (size_type i=0; i<rows; ++i)
+    for (size_type j=0; j<columns; ++j)
       if (sub_objects[i][j]->is_compressed () == false)
         return false;
   return true;
@@ -408,8 +408,8 @@ BlockSparsityPattern::memory_consumption () const
           MemoryConsumption::memory_consumption (sub_objects) +
           MemoryConsumption::memory_consumption (row_indices) +
           MemoryConsumption::memory_consumption (column_indices));
-  for (unsigned int r=0; r<rows; ++r)
-    for (unsigned int c=0; c<columns; ++c)
+  for (size_type r=0; r<rows; ++r)
+    for (size_type c=0; c<columns; ++c)
       mem += MemoryConsumption::memory_consumption (*sub_objects[r][c]);
 
   return mem;
@@ -425,8 +425,8 @@ BlockSparsityPattern::copy_from  (const BlockCompressedSparsityPattern &csp)
   reinit (csp.n_block_rows(), csp.n_block_cols());
 
   // copy over blocks
-  for (unsigned int i=0; i<n_block_rows(); ++i)
-    for (unsigned int j=0; j<n_block_cols(); ++j)
+  for (size_type i=0; i<n_block_rows(); ++i)
+    for (size_type j=0; j<n_block_cols(); ++j)
       block(i,j).copy_from (csp.block(i,j));
 
   // and finally enquire their new
@@ -442,8 +442,8 @@ BlockSparsityPattern::copy_from  (const BlockCompressedSimpleSparsityPattern &cs
   reinit (csp.n_block_rows(), csp.n_block_cols());
 
   // copy over blocks
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<rows; ++j)
+  for (size_type i=0; i<rows; ++i)
+    for (size_type j=0; j<rows; ++j)
       block(i,j).copy_from (csp.block(i,j));
 
   // and finally enquire their new
@@ -459,8 +459,8 @@ BlockSparsityPattern::copy_from  (const BlockCompressedSetSparsityPattern &csp)
   reinit (csp.n_block_rows(), csp.n_block_cols());
 
   // copy over blocks
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<rows; ++j)
+  for (size_type i=0; i<rows; ++i)
+    for (size_type j=0; j<rows; ++j)
       block(i,j).copy_from (csp.block(i,j));
 
   // and finally enquire their new
@@ -477,8 +477,8 @@ BlockCompressedSparsityPattern::BlockCompressedSparsityPattern ()
 
 BlockCompressedSparsityPattern::
 BlockCompressedSparsityPattern (
-  const unsigned int n_rows,
-  const unsigned int n_columns)
+  const size_type n_rows,
+  const size_type n_columns)
   :
   BlockSparsityPatternBase<CompressedSparsityPattern>(n_rows,
                                                       n_columns)
@@ -487,8 +487,8 @@ BlockCompressedSparsityPattern (
 
 BlockCompressedSparsityPattern::
 BlockCompressedSparsityPattern (
-  const std::vector<types::global_dof_index> &row_indices,
-  const std::vector<types::global_dof_index> &col_indices)
+  const std::vector<size_type> &row_indices,
+  const std::vector<size_type> &col_indices)
 {
   reinit(row_indices, col_indices);
 }
@@ -505,12 +505,12 @@ BlockCompressedSparsityPattern (
 
 void
 BlockCompressedSparsityPattern::reinit (
-  const std::vector< types::global_dof_index > &row_block_sizes,
-  const std::vector< types::global_dof_index > &col_block_sizes)
+  const std::vector<size_type> &row_block_sizes,
+  const std::vector<size_type> &col_block_sizes)
 {
   BlockSparsityPatternBase<CompressedSparsityPattern>::reinit(row_block_sizes.size(), col_block_sizes.size());
-  for (unsigned int i=0; i<row_block_sizes.size(); ++i)
-    for (unsigned int j=0; j<col_block_sizes.size(); ++j)
+  for (size_type i=0; i<row_block_sizes.size(); ++i)
+    for (size_type j=0; j<col_block_sizes.size(); ++j)
       this->block(i,j).reinit(row_block_sizes[i],col_block_sizes[j]);
   this->collect_sizes();
 }
@@ -524,8 +524,8 @@ BlockCompressedSparsityPattern::reinit (
 {
   BlockSparsityPatternBase<CompressedSparsityPattern>::reinit(row_indices.size(),
                                                               col_indices.size());
-  for (unsigned int i=0; i<row_indices.size(); ++i)
-    for (unsigned int j=0; j<col_indices.size(); ++j)
+  for (size_type i=0; i<row_indices.size(); ++i)
+    for (size_type j=0; j<col_indices.size(); ++j)
       this->block(i,j).reinit(row_indices.block_size(i),
                               col_indices.block_size(j));
   this->collect_sizes();
@@ -540,8 +540,8 @@ BlockCompressedSetSparsityPattern::BlockCompressedSetSparsityPattern ()
 
 BlockCompressedSetSparsityPattern::
 BlockCompressedSetSparsityPattern (
-  const unsigned int n_rows,
-  const unsigned int n_columns)
+  const size_type n_rows,
+  const size_type n_columns)
   :
   BlockSparsityPatternBase<CompressedSetSparsityPattern>(n_rows,
                                                          n_columns)
@@ -550,8 +550,8 @@ BlockCompressedSetSparsityPattern (
 
 BlockCompressedSetSparsityPattern::
 BlockCompressedSetSparsityPattern (
-  const std::vector<types::global_dof_index> &row_indices,
-  const std::vector<types::global_dof_index> &col_indices)
+  const std::vector<size_type> &row_indices,
+  const std::vector<size_type> &col_indices)
 {
   reinit(row_indices, col_indices);
 }
@@ -568,12 +568,12 @@ BlockCompressedSetSparsityPattern (
 
 void
 BlockCompressedSetSparsityPattern::reinit (
-  const std::vector< types::global_dof_index > &row_block_sizes,
-  const std::vector< types::global_dof_index > &col_block_sizes)
+  const std::vector<size_type> &row_block_sizes,
+  const std::vector<size_type> &col_block_sizes)
 {
   BlockSparsityPatternBase<CompressedSetSparsityPattern>::reinit(row_block_sizes.size(), col_block_sizes.size());
-  for (unsigned int i=0; i<row_block_sizes.size(); ++i)
-    for (unsigned int j=0; j<col_block_sizes.size(); ++j)
+  for (size_type i=0; i<row_block_sizes.size(); ++i)
+    for (size_type j=0; j<col_block_sizes.size(); ++j)
       this->block(i,j).reinit(row_block_sizes[i],col_block_sizes[j]);
   this->collect_sizes();
 }
@@ -587,8 +587,8 @@ BlockCompressedSetSparsityPattern::reinit (
 {
   BlockSparsityPatternBase<CompressedSetSparsityPattern>::reinit(row_indices.size(),
       col_indices.size());
-  for (unsigned int i=0; i<row_indices.size(); ++i)
-    for (unsigned int j=0; j<col_indices.size(); ++j)
+  for (size_type i=0; i<row_indices.size(); ++i)
+    for (size_type j=0; j<col_indices.size(); ++j)
       this->block(i,j).reinit(row_indices.block_size(i),
                               col_indices.block_size(j));
   this->collect_sizes();
@@ -602,8 +602,8 @@ BlockCompressedSimpleSparsityPattern::BlockCompressedSimpleSparsityPattern ()
 
 
 BlockCompressedSimpleSparsityPattern::
-BlockCompressedSimpleSparsityPattern (const unsigned int n_rows,
-                                      const unsigned int n_columns)
+BlockCompressedSimpleSparsityPattern (const size_type n_rows,
+                                      const size_type n_columns)
   :
   BlockSparsityPatternBase<CompressedSimpleSparsityPattern>(n_rows,
                                                             n_columns)
@@ -612,14 +612,14 @@ BlockCompressedSimpleSparsityPattern (const unsigned int n_rows,
 
 
 BlockCompressedSimpleSparsityPattern::
-BlockCompressedSimpleSparsityPattern (const std::vector<types::global_dof_index> &row_indices,
-                                      const std::vector<types::global_dof_index> &col_indices)
+BlockCompressedSimpleSparsityPattern (const std::vector<size_type> &row_indices,
+                                      const std::vector<size_type> &col_indices)
   :
   BlockSparsityPatternBase<CompressedSimpleSparsityPattern>(row_indices.size(),
                                                             col_indices.size())
 {
-  for (unsigned int i=0; i<row_indices.size(); ++i)
-    for (unsigned int j=0; j<col_indices.size(); ++j)
+  for (size_type i=0; i<row_indices.size(); ++i)
+    for (size_type j=0; j<col_indices.size(); ++j)
       this->block(i,j).reinit(row_indices[i],col_indices[j]);
   this->collect_sizes();
 }
@@ -631,8 +631,8 @@ BlockCompressedSimpleSparsityPattern (const std::vector<IndexSet> &partitioning)
   BlockSparsityPatternBase<CompressedSimpleSparsityPattern>(partitioning.size(),
                                                             partitioning.size())
 {
-  for (unsigned int i=0; i<partitioning.size(); ++i)
-    for (unsigned int j=0; j<partitioning.size(); ++j)
+  for (size_type i=0; i<partitioning.size(); ++i)
+    for (size_type j=0; j<partitioning.size(); ++j)
       this->block(i,j).reinit(partitioning[i].size(),
                               partitioning[j].size(),
                               partitioning[i]);
@@ -643,13 +643,13 @@ BlockCompressedSimpleSparsityPattern (const std::vector<IndexSet> &partitioning)
 
 void
 BlockCompressedSimpleSparsityPattern::reinit (
-  const std::vector< types::global_dof_index > &row_block_sizes,
-  const std::vector< types::global_dof_index > &col_block_sizes)
+  const std::vector<size_type> &row_block_sizes,
+  const std::vector<size_type> &col_block_sizes)
 {
   BlockSparsityPatternBase<CompressedSimpleSparsityPattern>::
   reinit(row_block_sizes.size(), col_block_sizes.size());
-  for (unsigned int i=0; i<row_block_sizes.size(); ++i)
-    for (unsigned int j=0; j<col_block_sizes.size(); ++j)
+  for (size_type i=0; i<row_block_sizes.size(); ++i)
+    for (size_type j=0; j<col_block_sizes.size(); ++j)
       this->block(i,j).reinit(row_block_sizes[i],col_block_sizes[j]);
   this->collect_sizes();
 }
@@ -660,8 +660,8 @@ BlockCompressedSimpleSparsityPattern::reinit (
 {
   BlockSparsityPatternBase<CompressedSimpleSparsityPattern>::
   reinit(partitioning.size(), partitioning.size());
-  for (unsigned int i=0; i<partitioning.size(); ++i)
-    for (unsigned int j=0; j<partitioning.size(); ++j)
+  for (size_type i=0; i<partitioning.size(); ++i)
+    for (size_type j=0; j<partitioning.size(); ++j)
       this->block(i,j).reinit(partitioning[i].size(),
                               partitioning[j].size(),
                               partitioning[i]);
@@ -679,8 +679,8 @@ namespace TrilinosWrappers
 
 
   BlockSparsityPattern::
-  BlockSparsityPattern (const unsigned int n_rows,
-                        const unsigned int n_columns)
+  BlockSparsityPattern (const size_type n_rows,
+                        const size_type n_columns)
     :
     dealii::BlockSparsityPatternBase<SparsityPattern>(n_rows,
                                                       n_columns)
@@ -689,14 +689,14 @@ namespace TrilinosWrappers
 
 
   BlockSparsityPattern::
-  BlockSparsityPattern (const std::vector<types::global_dof_index> &row_indices,
-                        const std::vector<types::global_dof_index> &col_indices)
+  BlockSparsityPattern (const std::vector<size_type> &row_indices,
+                        const std::vector<size_type> &col_indices)
     :
     BlockSparsityPatternBase<SparsityPattern>(row_indices.size(),
                                               col_indices.size())
   {
-    for (unsigned int i=0; i<row_indices.size(); ++i)
-      for (unsigned int j=0; j<col_indices.size(); ++j)
+    for (size_type i=0; i<row_indices.size(); ++i)
+      for (size_type j=0; j<col_indices.size(); ++j)
         this->block(i,j).reinit(row_indices[i],col_indices[j]);
     this->collect_sizes();
   }
@@ -710,8 +710,8 @@ namespace TrilinosWrappers
     (parallel_partitioning.size(),
      parallel_partitioning.size())
   {
-    for (unsigned int i=0; i<parallel_partitioning.size(); ++i)
-      for (unsigned int j=0; j<parallel_partitioning.size(); ++j)
+    for (size_type i=0; i<parallel_partitioning.size(); ++i)
+      for (size_type j=0; j<parallel_partitioning.size(); ++j)
         this->block(i,j).reinit(parallel_partitioning[i],
                                 parallel_partitioning[j]);
     this->collect_sizes();
@@ -727,8 +727,8 @@ namespace TrilinosWrappers
     (parallel_partitioning.size(),
      parallel_partitioning.size())
   {
-    for (unsigned int i=0; i<parallel_partitioning.size(); ++i)
-      for (unsigned int j=0; j<parallel_partitioning.size(); ++j)
+    for (size_type i=0; i<parallel_partitioning.size(); ++i)
+      for (size_type j=0; j<parallel_partitioning.size(); ++j)
         this->block(i,j).reinit(parallel_partitioning[i],
                                 parallel_partitioning[j],
                                 communicator);
@@ -738,13 +738,13 @@ namespace TrilinosWrappers
 
 
   void
-  BlockSparsityPattern::reinit (const std::vector<types::global_dof_index> &row_block_sizes,
-                                const std::vector<types::global_dof_index> &col_block_sizes)
+  BlockSparsityPattern::reinit (const std::vector<size_type> &row_block_sizes,
+                                const std::vector<size_type> &col_block_sizes)
   {
     dealii::BlockSparsityPatternBase<SparsityPattern>::
     reinit(row_block_sizes.size(), col_block_sizes.size());
-    for (unsigned int i=0; i<row_block_sizes.size(); ++i)
-      for (unsigned int j=0; j<col_block_sizes.size(); ++j)
+    for (size_type i=0; i<row_block_sizes.size(); ++i)
+      for (size_type j=0; j<col_block_sizes.size(); ++j)
         this->block(i,j).reinit(row_block_sizes[i],col_block_sizes[j]);
     this->collect_sizes();
   }
@@ -757,8 +757,8 @@ namespace TrilinosWrappers
     dealii::BlockSparsityPatternBase<SparsityPattern>::
     reinit(parallel_partitioning.size(),
            parallel_partitioning.size());
-    for (unsigned int i=0; i<parallel_partitioning.size(); ++i)
-      for (unsigned int j=0; j<parallel_partitioning.size(); ++j)
+    for (size_type i=0; i<parallel_partitioning.size(); ++i)
+      for (size_type j=0; j<parallel_partitioning.size(); ++j)
         this->block(i,j).reinit(parallel_partitioning[i],
                                 parallel_partitioning[j]);
     this->collect_sizes();
@@ -773,8 +773,8 @@ namespace TrilinosWrappers
     dealii::BlockSparsityPatternBase<SparsityPattern>::
     reinit(parallel_partitioning.size(),
            parallel_partitioning.size());
-    for (unsigned int i=0; i<parallel_partitioning.size(); ++i)
-      for (unsigned int j=0; j<parallel_partitioning.size(); ++j)
+    for (size_type i=0; i<parallel_partitioning.size(); ++i)
+      for (size_type j=0; j<parallel_partitioning.size(); ++j)
         this->block(i,j).reinit(parallel_partitioning[i],
                                 parallel_partitioning[j],
                                 communicator);
index b5a9c2bea863a6d389ea10f779dc18a8ffb168a5..59f8770389adaa9e1d4b9b532d17b07c2bc353c7 100644 (file)
@@ -42,10 +42,10 @@ ChunkSparsityPattern::ChunkSparsityPattern (const ChunkSparsityPattern &s)
 
 
 
-ChunkSparsityPattern::ChunkSparsityPattern (const types::global_dof_index m,
-                                            const types::global_dof_index n,
-                                            const unsigned int max_per_row,
-                                            const unsigned int chunk_size,
+ChunkSparsityPattern::ChunkSparsityPattern (const size_type m,
+                                            const size_type n,
+                                            const size_type max_per_row,
+                                            const size_type chunk_size,
                                             const bool)
 {
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
@@ -54,10 +54,10 @@ ChunkSparsityPattern::ChunkSparsityPattern (const types::global_dof_index m,
 }
 
 
-ChunkSparsityPattern::ChunkSparsityPattern (const unsigned int m,
-                                            const unsigned int n,
-                                            const unsigned int max_per_row,
-                                            const unsigned int chunk_size)
+ChunkSparsityPattern::ChunkSparsityPattern (const size_type m,
+                                            const size_type n,
+                                            const size_type max_per_row,
+                                            const size_type chunk_size)
 {
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
 
@@ -67,10 +67,10 @@ ChunkSparsityPattern::ChunkSparsityPattern (const unsigned int m,
 
 
 ChunkSparsityPattern::ChunkSparsityPattern (
-  const types::global_dof_index m,
-  const types::global_dof_index n,
-  const std::vector<unsigned int> &row_lengths,
-  const unsigned int chunk_size,
+  const size_type m,
+  const size_type n,
+  const std::vector<size_type> &row_lengths,
+  const size_type chunk_size,
   const bool)
 {
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
@@ -81,10 +81,10 @@ ChunkSparsityPattern::ChunkSparsityPattern (
 
 
 ChunkSparsityPattern::ChunkSparsityPattern (
-  const unsigned int m,
-  const unsigned int n,
-  const std::vector<unsigned int> &row_lengths,
-  const unsigned int chunk_size)
+  const size_type m,
+  const size_type n,
+  const std::vector<size_type> &row_lengths,
+  const size_type chunk_size)
 {
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
 
@@ -93,9 +93,9 @@ ChunkSparsityPattern::ChunkSparsityPattern (
 
 
 
-ChunkSparsityPattern::ChunkSparsityPattern (const unsigned int n,
-                                            const unsigned int max_per_row,
-                                            const unsigned int chunk_size)
+ChunkSparsityPattern::ChunkSparsityPattern (const size_type n,
+                                            const size_type max_per_row,
+                                            const size_type chunk_size)
 {
   reinit (n, n, max_per_row, chunk_size);
 }
@@ -104,8 +104,8 @@ ChunkSparsityPattern::ChunkSparsityPattern (const unsigned int n,
 
 ChunkSparsityPattern::ChunkSparsityPattern (
   const types::global_dof_index m,
-  const std::vector<unsigned int> &row_lengths,
-  const unsigned int chunk_size,
+  const std::vector<size_type> &row_lengths,
+  const size_type chunk_size,
   const bool)
 {
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
@@ -116,9 +116,9 @@ ChunkSparsityPattern::ChunkSparsityPattern (
 
 
 ChunkSparsityPattern::ChunkSparsityPattern (
-  const unsigned int               m,
-  const std::vector<unsigned int> &row_lengths,
-  const unsigned int chunk_size)
+  const size_type                m,
+  const std::vector<size_type > &row_lengths,
+  const size_type chunk_size)
 {
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
 
@@ -148,10 +148,10 @@ ChunkSparsityPattern::operator = (const ChunkSparsityPattern &s)
 
 
 void
-ChunkSparsityPattern::reinit (const types::global_dof_index m,
-                              const types::global_dof_index n,
-                              const unsigned int max_per_row,
-                              const unsigned int chunk_size,
+ChunkSparsityPattern::reinit (const size_type m,
+                              const size_type n,
+                              const size_type max_per_row,
+                              const size_type chunk_size,
                               const bool)
 {
   reinit (m, n, max_per_row, chunk_size);
@@ -159,16 +159,16 @@ ChunkSparsityPattern::reinit (const types::global_dof_index m,
 
 
 void
-ChunkSparsityPattern::reinit (const unsigned int m,
-                              const unsigned int n,
-                              const unsigned int max_per_row,
-                              const unsigned int chunk_size)
+ChunkSparsityPattern::reinit (const size_type m,
+                              const size_type n,
+                              const size_type max_per_row,
+                              const size_type chunk_size)
 {
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
 
   // simply map this function to the
   // other @p{reinit} function
-  const std::vector<unsigned int> row_lengths (m, max_per_row);
+  const std::vector<size_type> row_lengths (m, max_per_row);
   reinit (m, n, row_lengths, chunk_size);
 }
 
@@ -178,8 +178,8 @@ void
 ChunkSparsityPattern::reinit (
   const types::global_dof_index m,
   const types::global_dof_index n,
-  const VectorSlice<const std::vector<unsigned int> > &row_lengths,
-  const unsigned int chunk_size,
+  const VectorSlice<const std::vector<size_type> > &row_lengths,
+  const size_type chunk_size,
   const bool)
 {
   reinit (m, n, row_lengths, chunk_size);
@@ -188,10 +188,10 @@ ChunkSparsityPattern::reinit (
 
 void
 ChunkSparsityPattern::reinit (
-    const unsigned int m,
-    const unsigned int n,
-    const VectorSlice<const std::vector<unsigned int> > &row_lengths,
-    const unsigned int chunk_size)
+    const size_type m,
+    const size_type n,
+    const VectorSlice<const std::vector<size_type> > &row_lengths,
+    const size_type chunk_size)
 {
   Assert (row_lengths.size() == m, ExcInvalidNumber (m));
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
@@ -208,8 +208,8 @@ ChunkSparsityPattern::reinit (
   // (n/chunk_size). rounding up in integer
   // arithmetic equals
   // ((m+chunk_size-1)/chunk_size):
-  const unsigned int m_chunks = (m+chunk_size-1) / chunk_size,
-                     n_chunks = (n+chunk_size-1) / chunk_size;
+  const size_type m_chunks = (m+chunk_size-1) / chunk_size,
+                  n_chunks = (n+chunk_size-1) / chunk_size;
 
   // compute the maximum number of chunks in
   // each row. the passed array denotes the
@@ -222,8 +222,8 @@ ChunkSparsityPattern::reinit (
   // row zero at columns {0,2} and for row
   // one at {4,6} --> we'll need 4 chunks for
   // the first chunk row!) :
-  std::vector<unsigned int> chunk_row_lengths (m_chunks, 0);
-  for (unsigned int i=0; i<m; ++i)
+  std::vector<size_type> chunk_row_lengths (m_chunks, 0);
+  for (size_type i=0; i<m; ++i)
     chunk_row_lengths[i/chunk_size] += row_lengths[i];
 
   sparsity_pattern.reinit (m_chunks,
@@ -244,7 +244,7 @@ ChunkSparsityPattern::compress ()
 template <typename SparsityType>
 void
 ChunkSparsityPattern::copy_from (const SparsityType &csp,
-                                 const unsigned int  chunk_size,
+                                 const size_type     chunk_size,
                                  const bool)
 {
   copy_from (csp, chunk_size);
@@ -260,7 +260,7 @@ namespace internal
     // and SparsityPattern that uses begin() as iterator type
     template <typename Sparsity>
     void copy_row (const Sparsity       &csp,
-                   const unsigned int    row,
+                   const size_type       row,
                    ChunkSparsityPattern &dst)
     {
       typename Sparsity::row_iterator col_num = csp.row_begin (row);
@@ -269,7 +269,7 @@ namespace internal
     }
 
     void copy_row (const SparsityPattern &csp,
-                   const unsigned int     row,
+                   const size_type        row,
                    ChunkSparsityPattern  &dst)
     {
       SparsityPattern::iterator col_num = csp.begin (row);
@@ -283,15 +283,15 @@ namespace internal
 template <typename SparsityType>
 void
 ChunkSparsityPattern::copy_from (const SparsityType &csp,
-                                 const unsigned int  chunk_size)
+                                 const size_type     chunk_size)
 {
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
 
   // count number of entries per row, then
   // initialize the underlying sparsity
   // pattern
-  std::vector<unsigned int> entries_per_row (csp.n_rows(), 0);
-  for (unsigned int row = 0; row<csp.n_rows(); ++row)
+  std::vector<size_type> entries_per_row (csp.n_rows(), 0);
+  for (size_type row = 0; row<csp.n_rows(); ++row)
     entries_per_row[row] = csp.row_length(row);
 
   reinit (csp.n_rows(), csp.n_cols(),
@@ -299,7 +299,7 @@ ChunkSparsityPattern::copy_from (const SparsityType &csp,
           chunk_size);
 
   // then actually fill it
-  for (unsigned int row = 0; row<csp.n_rows(); ++row)
+  for (size_type row = 0; row<csp.n_rows(); ++row)
     internal::copy_row(csp, row, *this);
 
   // finally compress
@@ -311,7 +311,7 @@ ChunkSparsityPattern::copy_from (const SparsityType &csp,
 
 template <typename number>
 void ChunkSparsityPattern::copy_from (const FullMatrix<number> &matrix,
-                                      const unsigned int chunk_size,
+                                      const size_type chunk_size,
                                       const bool)
 {
   copy_from (matrix, chunk_size);
@@ -320,7 +320,7 @@ void ChunkSparsityPattern::copy_from (const FullMatrix<number> &matrix,
 
 template <typename number>
 void ChunkSparsityPattern::copy_from (const FullMatrix<number> &matrix,
-                                      const unsigned int chunk_size)
+                                      const size_type chunk_size)
 {
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
 
@@ -328,10 +328,10 @@ void ChunkSparsityPattern::copy_from (const FullMatrix<number> &matrix,
   // pattern. remember to also allocate space for the diagonal entry (if that
   // hasn't happened yet) if m==n since we always allocate that for diagonal
   // matrices
-  std::vector<unsigned int> entries_per_row (matrix.m(), 0);
-  for (unsigned int row=0; row<matrix.m(); ++row)
+  std::vector<size_type> entries_per_row (matrix.m(), 0);
+  for (size_type row=0; row<matrix.m(); ++row)
     {
-      for (unsigned int col=0; col<matrix.n(); ++col)
+      for (size_type col=0; col<matrix.n(); ++col)
        if (matrix(row,col) != 0)
          ++entries_per_row[row];
 
@@ -346,8 +346,8 @@ void ChunkSparsityPattern::copy_from (const FullMatrix<number> &matrix,
           chunk_size);
 
   // then actually fill it
-  for (unsigned int row=0; row<matrix.m(); ++row)
-    for (unsigned int col=0; col<matrix.n(); ++col)
+  for (size_type row=0; row<matrix.m(); ++row)
+    for (size_type col=0; col<matrix.n(); ++col)
       if (matrix(row,col) != 0)
         add (row,col);
 
@@ -358,10 +358,10 @@ void ChunkSparsityPattern::copy_from (const FullMatrix<number> &matrix,
 
 void
 ChunkSparsityPattern::reinit (
-  const types::global_dof_index m,
-  const types::global_dof_index n,
-  const std::vector<unsigned int> &row_lengths,
-  const unsigned int chunk_size,
+  const size_type m,
+  const size_type n,
+  const std::vector<size_type> &row_lengths,
+  const size_type chunk_size,
   const bool)
 {
   reinit (m, n, row_lengths, chunk_size);
@@ -370,10 +370,10 @@ ChunkSparsityPattern::reinit (
 
 void
 ChunkSparsityPattern::reinit (
-  const unsigned int m,
-  const unsigned int n,
-  const std::vector<unsigned int> &row_lengths,
-  const unsigned int chunk_size)
+  const size_type m,
+  const size_type n,
+  const std::vector<size_type> &row_lengths,
+  const size_type chunk_size)
 {
   Assert (chunk_size > 0, ExcInvalidNumber (chunk_size));
 
@@ -390,7 +390,7 @@ ChunkSparsityPattern::empty () const
 
 
 
-unsigned int
+size_type 
 ChunkSparsityPattern::max_entries_per_row () const
 {
   return sparsity_pattern.max_entries_per_row() * chunk_size;
@@ -399,8 +399,8 @@ ChunkSparsityPattern::max_entries_per_row () const
 
 
 void
-ChunkSparsityPattern::add (const types::global_dof_index i,
-                           const types::global_dof_index j)
+ChunkSparsityPattern::add (const size_type i,
+                           const size_type j)
 {
   Assert (i<rows, ExcInvalidIndex(i,rows));
   Assert (j<cols, ExcInvalidIndex(j,cols));
@@ -410,8 +410,8 @@ ChunkSparsityPattern::add (const types::global_dof_index i,
 
 
 bool
-ChunkSparsityPattern::exists (const types::global_dof_index i,
-                              const types::global_dof_index j) const
+ChunkSparsityPattern::exists (const size_type i,
+                              const size_type j) const
 {
   Assert (i<rows, ExcIndexRange(i,0,rows));
   Assert (j<cols, ExcIndexRange(j,0,cols));
@@ -422,8 +422,8 @@ ChunkSparsityPattern::exists (const types::global_dof_index i,
 
 
 
-unsigned int
-ChunkSparsityPattern::row_length (const types::global_dof_index i) const
+size_type 
+ChunkSparsityPattern::row_length (const size_type i) const
 {
   Assert (i<rows, ExcIndexRange(i,0,rows));
 
@@ -447,7 +447,7 @@ ChunkSparsityPattern::symmetrize ()
 
 
 
-unsigned int
+size_type 
 ChunkSparsityPattern::n_nonzero_elements () const
 {
   if ((n_rows() % chunk_size == 0)
@@ -469,9 +469,9 @@ ChunkSparsityPattern::n_nonzero_elements () const
         {
           // columns align with chunks, but
           // not rows
-          unsigned int n = sparsity_pattern.n_nonzero_elements() *
-                           chunk_size *
-                           chunk_size;
+          size_type n = sparsity_pattern.n_nonzero_elements() *
+                        chunk_size *
+                        chunk_size;
           n -= (sparsity_pattern.n_rows() * chunk_size - n_rows()) *
                sparsity_pattern.row_length(sparsity_pattern.n_rows()-1) *
                chunk_size;
@@ -485,9 +485,9 @@ ChunkSparsityPattern::n_nonzero_elements () const
          // see what this leads to. follow the advice in the documentation of
          // the sparsity pattern iterators to do the loop over individual rows,
          // rather than all elements
-         unsigned int n = 0;
+         size_type n = 0;
 
-         for (unsigned int row = 0; row < sparsity_pattern.n_rows(); ++row)
+         for (size_type row = 0; row < sparsity_pattern.n_rows(); ++row)
            {
              SparsityPattern::const_iterator p = sparsity_pattern.begin(row);
              for (; p!=sparsity_pattern.end(row); ++p)
@@ -531,16 +531,16 @@ ChunkSparsityPattern::print (std::ostream &out) const
 
   AssertThrow (out, ExcIO());
 
-  for (unsigned int i=0; i<sparsity_pattern.rows; ++i)
-    for (unsigned int d=0;
+  for (size_type i=0; i<sparsity_pattern.rows; ++i)
+    for (size_type d=0;
          (d<chunk_size) && (i*chunk_size + d < n_rows());
          ++d)
       {
         out << '[' << i *chunk_size+d;
-        for (unsigned int j=sparsity_pattern.rowstart[i];
+        for (size_type j=sparsity_pattern.rowstart[i];
              j<sparsity_pattern.rowstart[i+1]; ++j)
           if (sparsity_pattern.colnums[j] != sparsity_pattern.invalid_entry)
-            for (unsigned int e=0;
+            for (size_type e=0;
                  ((e<chunk_size) &&
                   (sparsity_pattern.colnums[j]*chunk_size + e < n_cols()));
                  ++e)
@@ -564,15 +564,15 @@ ChunkSparsityPattern::print_gnuplot (std::ostream &out) const
   // for each entry in the underlying
   // sparsity pattern, repeat everything
   // chunk_size x chunk_size times
-  for (unsigned int i=0; i<sparsity_pattern.rows; ++i)
-    for (unsigned int j=sparsity_pattern.rowstart[i];
+  for (size_type i=0; i<sparsity_pattern.rows; ++i)
+    for (size_type j=sparsity_pattern.rowstart[i];
          j<sparsity_pattern.rowstart[i+1]; ++j)
       if (sparsity_pattern.colnums[j] != sparsity_pattern.invalid_entry)
-        for (unsigned int d=0;
+        for (size_type d=0;
              ((d<chunk_size) &&
               (sparsity_pattern.colnums[j]*chunk_size+d < n_cols()));
              ++d)
-          for (unsigned int e=0;
+          for (size_type e=0;
                (e<chunk_size) && (i*chunk_size + e < n_rows());
                ++e)
             // while matrix entries are
@@ -590,7 +590,7 @@ ChunkSparsityPattern::print_gnuplot (std::ostream &out) const
 
 
 
-unsigned int
+size_type 
 ChunkSparsityPattern::bandwidth () const
 {
   // calculate the bandwidth from that of the
@@ -682,23 +682,23 @@ ChunkSparsityPattern::memory_consumption () const
 // explicit instantiations
 template
 void ChunkSparsityPattern::copy_from<CompressedSparsityPattern> (const CompressedSparsityPattern &,
-    const unsigned int,
+    const size_type ,
     const bool);
 template
 void ChunkSparsityPattern::copy_from<CompressedSetSparsityPattern> (const CompressedSetSparsityPattern &,
-    const unsigned int,
+    const size_type ,
     const bool);
 template
 void ChunkSparsityPattern::copy_from<CompressedSimpleSparsityPattern> (const CompressedSimpleSparsityPattern &,
-    const unsigned int,
+    const size_type ,
     const bool);
 template
 void ChunkSparsityPattern::copy_from<float> (const FullMatrix<float> &,
-                                             const unsigned int,
+                                             const size_type ,
                                              const bool);
 template
 void ChunkSparsityPattern::copy_from<double> (const FullMatrix<double> &,
-                                              const unsigned int,
+                                              const size_type ,
                                               const bool);
 
 DEAL_II_NAMESPACE_CLOSE
index e01be57acabace77455468100be783120d89e337..47007d37aa29965be500212645dd5721822b8d76 100644 (file)
@@ -46,8 +46,8 @@ CompressedSetSparsityPattern (const CompressedSetSparsityPattern &s)
 
 
 
-CompressedSetSparsityPattern::CompressedSetSparsityPattern (const types::global_dof_index m,
-                                                            const types::global_dof_index n)
+CompressedSetSparsityPattern::CompressedSetSparsityPattern (const size_type m,
+                                                            const size_type n)
   :
   rows(0),
   cols(0)
@@ -57,7 +57,7 @@ CompressedSetSparsityPattern::CompressedSetSparsityPattern (const types::global_
 
 
 
-CompressedSetSparsityPattern::CompressedSetSparsityPattern (const types::global_dof_index n)
+CompressedSetSparsityPattern::CompressedSetSparsityPattern (const size_type n)
   :
   rows(0),
   cols(0)
@@ -82,8 +82,8 @@ CompressedSetSparsityPattern::operator = (const CompressedSetSparsityPattern &s)
 
 
 void
-CompressedSetSparsityPattern::reinit (const types::global_dof_index m,
-                                      const types::global_dof_index n)
+CompressedSetSparsityPattern::reinit (const size_type m,
+                                      const size_type n)
 {
   rows = m;
   cols = n;
@@ -108,13 +108,13 @@ CompressedSetSparsityPattern::empty () const
 
 
 
-unsigned int
+size_type 
 CompressedSetSparsityPattern::max_entries_per_row () const
 {
-  unsigned int m = 0;
-  for (unsigned int i=0; i<rows; ++i)
+  size_type m = 0;
+  for (size_type i=0; i<rows; ++i)
     {
-      m = std::max (m, static_cast<unsigned int>(lines[i].entries.size()));
+      m = std::max (m, static_cast<size_type>(lines[i].entries.size()));
     }
 
   return m;
@@ -123,8 +123,8 @@ CompressedSetSparsityPattern::max_entries_per_row () const
 
 
 bool
-CompressedSetSparsityPattern::exists (const types::global_dof_index i,
-                                      const types::global_dof_index j) const
+CompressedSetSparsityPattern::exists (const size_type i,
+                                      const size_type j) const
 {
   Assert (i<rows, ExcIndexRange(i, 0, rows));
   Assert (j<cols, ExcIndexRange(j, 0, cols));
@@ -150,9 +150,9 @@ CompressedSetSparsityPattern::symmetrize ()
   // 2. that the @p{add} function can
   // be called on elements that
   // already exist without any harm
-  for (unsigned int row=0; row<rows; ++row)
+  for (size_type row=0; row<rows; ++row)
     {
-      for (std::set<unsigned int>::const_iterator
+      for (std::set<size_type>::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end();
            ++j)
@@ -170,11 +170,11 @@ CompressedSetSparsityPattern::print (std::ostream &out) const
 {
   AssertThrow (out, ExcIO());
 
-  for (unsigned int row=0; row<rows; ++row)
+  for (size_type row=0; row<rows; ++row)
     {
       out << '[' << row;
 
-      for (std::set<unsigned int>::const_iterator
+      for (std::set<size_type >::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end(); ++j)
         out << ',' << *j;
@@ -192,9 +192,9 @@ CompressedSetSparsityPattern::print_gnuplot (std::ostream &out) const
 {
   AssertThrow (out, ExcIO());
 
-  for (unsigned int row=0; row<rows; ++row)
+  for (size_type row=0; row<rows; ++row)
     {
-      for (std::set<unsigned int>::const_iterator
+      for (std::set<size_type>::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end(); ++j)
         // while matrix entries are usually
@@ -211,16 +211,16 @@ CompressedSetSparsityPattern::print_gnuplot (std::ostream &out) const
 
 
 
-unsigned int
+size_type 
 CompressedSetSparsityPattern::bandwidth () const
 {
-  unsigned int b=0;
-  for (unsigned int row=0; row<rows; ++row)
+  size_type b=0;
+  for (size_type row=0; row<rows; ++row)
     {
-      for (std::set<unsigned int>::const_iterator
+      for (std::set<size_type>::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end(); ++j)
-        if (static_cast<unsigned int>(std::abs(static_cast<int>(row-*j))) > b)
+        if (static_cast<size_type>(std::abs(static_cast<int>(row-*j))) > b)
           b = std::abs(static_cast<signed int>(row-*j));
     }
 
@@ -229,11 +229,11 @@ CompressedSetSparsityPattern::bandwidth () const
 
 
 
-unsigned int
+size_type 
 CompressedSetSparsityPattern::n_nonzero_elements () const
 {
-  unsigned int n=0;
-  for (unsigned int i=0; i<rows; ++i)
+  size_type n=0;
+  for (size_type i=0; i<rows; ++i)
     {
       n += lines[i].entries.size();
     }
index 94595422349315575b37d21aaa5d157a5854e3b6..577e92aece1283cd5e9d31425c64e5d1c79ea2f3 100644 (file)
@@ -34,7 +34,7 @@ CompressedSimpleSparsityPattern::Line::add_entries (ForwardIterator begin,
   if (n_elements <= 0)
     return;
 
-  const unsigned int stop_size = entries.size() + n_elements;
+  const size_type stop_size = entries.size() + n_elements;
 
   if (indices_are_sorted == true && n_elements > 3)
     {
@@ -60,8 +60,8 @@ CompressedSimpleSparsityPattern::Line::add_entries (ForwardIterator begin,
       // first entry is a duplicate before
       // actually doing something.
       ForwardIterator my_it = begin;
-      unsigned int col = *my_it;
-      std::vector<unsigned int>::iterator it =
+      size_type col = *my_it;
+      std::vector<size_type>::iterator it =
         Utilities::lower_bound(entries.begin(), entries.end(), col);
       while (*it == col)
         {
@@ -90,14 +90,14 @@ CompressedSimpleSparsityPattern::Line::add_entries (ForwardIterator begin,
 
       // resize vector by just inserting the
       // list
-      const unsigned int pos1 = it - entries.begin();
+      const size_type pos1 = it - entries.begin();
       Assert (pos1 <= entries.size(), ExcInternalError());
       entries.insert (it, my_it, end);
       it = entries.begin() + pos1;
-      Assert (entries.size() >= (unsigned int)(it-entries.begin()), ExcInternalError());
+      Assert (entries.size() >= (size_type)(it-entries.begin()), ExcInternalError());
 
       // now merge the two lists.
-      std::vector<unsigned int>::iterator it2 = it + (end-my_it);
+      std::vector<size_type>::iterator it2 = it + (end-my_it);
 
       // as long as there are indices both in
       // the end of the entries list and in the
@@ -125,7 +125,7 @@ CompressedSimpleSparsityPattern::Line::add_entries (ForwardIterator begin,
         *it++ = *it2++;
 
       // resize and return
-      const unsigned int new_size = it - entries.begin();
+      const size_type new_size = it - entries.begin();
       Assert (new_size <= stop_size, ExcInternalError());
       entries.resize (new_size);
       return;
@@ -140,8 +140,8 @@ CompressedSimpleSparsityPattern::Line::add_entries (ForwardIterator begin,
   if (stop_size > entries.capacity())
     entries.reserve (stop_size);
 
-  unsigned int col = *my_it;
-  std::vector<unsigned int>::iterator it, it2;
+  size_type col = *my_it;
+  std::vector<size_type>::iterator it, it2;
   // insert the first element as for one
   // entry only first check the last
   // element (or if line is still empty)
@@ -209,7 +209,7 @@ CompressedSimpleSparsityPattern::Line::add_entries (ForwardIterator begin,
 std::size_t
 CompressedSimpleSparsityPattern::Line::memory_consumption () const
 {
-  return entries.capacity()*sizeof(unsigned int)+sizeof(Line);
+  return entries.capacity()*sizeof(size_type)+sizeof(Line);
 }
 
 
@@ -236,8 +236,8 @@ CompressedSimpleSparsityPattern (const CompressedSimpleSparsityPattern &s)
 
 
 
-CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const types::global_dof_index m,
-    const types::global_dof_index n,
+CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const size_type m,
+    const size_type n,
     const IndexSet &rowset_
                                                                  )
   :
@@ -250,7 +250,7 @@ CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const types::g
 
 
 
-CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const types::global_dof_index n)
+CompressedSimpleSparsityPattern::CompressedSimpleSparsityPattern (const size_type n)
   :
   rows(0),
   cols(0),
@@ -276,8 +276,8 @@ CompressedSimpleSparsityPattern::operator = (const CompressedSimpleSparsityPatte
 
 
 void
-CompressedSimpleSparsityPattern::reinit (const types::global_dof_index m,
-                                         const types::global_dof_index n,
+CompressedSimpleSparsityPattern::reinit (const size_type m,
+                                         const size_type n,
                                          const IndexSet &rowset_)
 {
   rows = m;
@@ -306,13 +306,13 @@ CompressedSimpleSparsityPattern::empty () const
 
 
 
-unsigned int
+size_type 
 CompressedSimpleSparsityPattern::max_entries_per_row () const
 {
-  unsigned int m = 0;
-  for (unsigned int i=0; i<lines.size(); ++i)
+  size_type m = 0;
+  for (size_type i=0; i<lines.size(); ++i)
     {
-      m = std::max (m, static_cast<unsigned int>(lines[i].entries.size()));
+      m = std::max (m, static_cast<size_type>(lines[i].entries.size()));
     }
 
   return m;
@@ -321,14 +321,14 @@ CompressedSimpleSparsityPattern::max_entries_per_row () const
 
 
 bool
-CompressedSimpleSparsityPattern::exists (const types::global_dof_index i,
-                                         const types::global_dof_index j) const
+CompressedSimpleSparsityPattern::exists (const size_type i,
+                                         const size_type j) const
 {
   Assert (i<rows, ExcIndexRange(i, 0, rows));
   Assert (j<cols, ExcIndexRange(j, 0, cols));
   Assert( rowset.size()==0 || rowset.is_element(i), ExcInternalError());
 
-  const unsigned int rowindex =
+  const size_type rowindex =
     rowset.size()==0 ? i : rowset.index_within_set(i);
 
   return std::binary_search (lines[rowindex].entries.begin(),
@@ -354,12 +354,12 @@ CompressedSimpleSparsityPattern::symmetrize ()
   // 2. that the @p{add} function can
   // be called on elements that
   // already exist without any harm
-  for (unsigned int row=0; row<lines.size(); ++row)
+  for (size_type row=0; row<lines.size(); ++row)
     {
-      const unsigned int rowindex =
+      const size_type rowindex =
         rowset.size()==0 ? row : rowset.nth_index_in_set(row);
 
-      for (std::vector<unsigned int>::const_iterator
+      for (std::vector<size_type>::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end();
            ++j)
@@ -375,11 +375,11 @@ CompressedSimpleSparsityPattern::symmetrize ()
 void
 CompressedSimpleSparsityPattern::print (std::ostream &out) const
 {
-  for (unsigned int row=0; row<lines.size(); ++row)
+  for (size_type row=0; row<lines.size(); ++row)
     {
       out << '[' << (rowset.size()==0 ? row : rowset.nth_index_in_set(row));
 
-      for (std::vector<unsigned int>::const_iterator
+      for (std::vector<size_type >::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end(); ++j)
         out << ',' << *j;
@@ -395,12 +395,12 @@ CompressedSimpleSparsityPattern::print (std::ostream &out) const
 void
 CompressedSimpleSparsityPattern::print_gnuplot (std::ostream &out) const
 {
-  for (unsigned int row=0; row<lines.size(); ++row)
+  for (size_type row=0; row<lines.size(); ++row)
     {
-      const unsigned int rowindex =
+      const size_type rowindex =
         rowset.size()==0 ? row : rowset.nth_index_in_set(row);
 
-      for (std::vector<unsigned int>::const_iterator
+      for (std::vector<size_type >::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end(); ++j)
         // while matrix entries are usually
@@ -419,19 +419,19 @@ CompressedSimpleSparsityPattern::print_gnuplot (std::ostream &out) const
 
 
 
-unsigned int
+size_type 
 CompressedSimpleSparsityPattern::bandwidth () const
 {
-  unsigned int b=0;
-  for (unsigned int row=0; row<lines.size(); ++row)
+  size_type b=0;
+  for (size_type row=0; row<lines.size(); ++row)
     {
-      const unsigned int rowindex =
+      const size_type rowindex =
         rowset.size()==0 ? row : rowset.nth_index_in_set(row);
 
-      for (std::vector<unsigned int>::const_iterator
+      for (std::vector<size_type>::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end(); ++j)
-        if (static_cast<unsigned int>(std::abs(static_cast<int>(rowindex-*j))) > b)
+        if (static_cast<size_type>(std::abs(static_cast<int>(rowindex-*j))) > b)
           b = std::abs(static_cast<signed int>(rowindex-*j));
     }
 
@@ -440,11 +440,11 @@ CompressedSimpleSparsityPattern::bandwidth () const
 
 
 
-unsigned int
+size_type 
 CompressedSimpleSparsityPattern::n_nonzero_elements () const
 {
-  unsigned int n=0;
-  for (unsigned int i=0; i<lines.size(); ++i)
+  size_type n=0;
+  for (size_type i=0; i<lines.size(); ++i)
     {
       n += lines[i].entries.size();
     }
@@ -453,12 +453,12 @@ CompressedSimpleSparsityPattern::n_nonzero_elements () const
 }
 
 
-std::size_t
+size_type
 CompressedSimpleSparsityPattern::memory_consumption () const
 {
   //TODO: IndexSet...
-  std::size_t mem = sizeof(CompressedSimpleSparsityPattern);
-  for (unsigned int i=0; i<lines.size(); ++i)
+  size_type mem = sizeof(CompressedSimpleSparsityPattern);
+  for (size_type i=0; i<lines.size(); ++i)
     mem += MemoryConsumption::memory_consumption (lines[i]);
 
   return mem;
@@ -466,16 +466,16 @@ CompressedSimpleSparsityPattern::memory_consumption () const
 
 
 // explicit instantiations
-template void CompressedSimpleSparsityPattern::Line::add_entries(types::global_dof_index *,
-    types::global_dof_index *,
+template void CompressedSimpleSparsityPattern::Line::add_entries(size_type *,
+    size_type *,
     const bool);
-template void CompressedSimpleSparsityPattern::Line::add_entries(const types::global_dof_index *,
-    const types::global_dof_index *,
+template void CompressedSimpleSparsityPattern::Line::add_entries(const size_type *,
+    const size_type *,
     const bool);
 #ifndef DEAL_II_VECTOR_ITERATOR_IS_POINTER
 template void CompressedSimpleSparsityPattern::Line::
-add_entries(std::vector<unsigned int>::iterator,
-            std::vector<unsigned int>::iterator,
+add_entries(std::vector<size_type>::iterator,
+            std::vector<size_type>::iterator,
             const bool);
 #endif
 
index ebc337ca8800afcf333e850f399c4764adb8c710..740c529b1842802b8f40e439409fdee3871dfa41 100644 (file)
@@ -338,8 +338,8 @@ CompressedSparsityPattern (const CompressedSparsityPattern &s)
 
 
 
-CompressedSparsityPattern::CompressedSparsityPattern (const types::global_dof_index m,
-                                                      const types::global_dof_index n)
+CompressedSparsityPattern::CompressedSparsityPattern (const size_type m,
+                                                      const size_type n)
   :
   rows(0),
   cols(0)
@@ -349,7 +349,7 @@ CompressedSparsityPattern::CompressedSparsityPattern (const types::global_dof_in
 
 
 
-CompressedSparsityPattern::CompressedSparsityPattern (const types::global_dof_index n)
+CompressedSparsityPattern::CompressedSparsityPattern (const size_type n)
   :
   rows(0),
   cols(0)
@@ -374,8 +374,8 @@ CompressedSparsityPattern::operator = (const CompressedSparsityPattern &s)
 
 
 void
-CompressedSparsityPattern::reinit (const types::global_dof_index m,
-                                   const types::global_dof_index n)
+CompressedSparsityPattern::reinit (const size_type m,
+                                   const size_type n)
 {
   rows = m;
   cols = n;
@@ -400,15 +400,15 @@ CompressedSparsityPattern::empty () const
 
 
 
-unsigned int
+size_type 
 CompressedSparsityPattern::max_entries_per_row () const
 {
-  unsigned int m = 0;
-  for (unsigned int i=0; i<rows; ++i)
+  size_type m = 0;
+  for (size_type i=0; i<rows; ++i)
     {
       if (lines[i].cache_entries != 0)
         lines[i].flush_cache ();
-      m = std::max (m, static_cast<unsigned int>(lines[i].entries.size()));
+      m = std::max (m, static_cast<size_type>(lines[i].entries.size()));
     }
 
   return m;
@@ -417,8 +417,8 @@ CompressedSparsityPattern::max_entries_per_row () const
 
 
 bool
-CompressedSparsityPattern::exists (const types::global_dof_index i,
-                                   const types::global_dof_index j) const
+CompressedSparsityPattern::exists (const size_type i,
+                                   const size_type j) const
 {
   Assert (i<rows, ExcIndexRange(i, 0, rows));
   Assert (j<cols, ExcIndexRange(j, 0, cols));
@@ -448,11 +448,11 @@ CompressedSparsityPattern::symmetrize ()
   // 2. that the @p{add} function can
   // be called on elements that
   // already exist without any harm
-  for (unsigned int row=0; row<rows; ++row)
+  for (size_type row=0; row<rows; ++row)
     {
       if (lines[row].cache_entries != 0)
         lines[row].flush_cache ();
-      for (std::vector<unsigned int>::const_iterator
+      for (std::vector<size_type>::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end();
            ++j)
@@ -468,14 +468,14 @@ CompressedSparsityPattern::symmetrize ()
 void
 CompressedSparsityPattern::print (std::ostream &out) const
 {
-  for (unsigned int row=0; row<rows; ++row)
+  for (size_type row=0; row<rows; ++row)
     {
       if (lines[row].cache_entries != 0)
         lines[row].flush_cache ();
 
       out << '[' << row;
 
-      for (std::vector<unsigned int>::const_iterator
+      for (std::vector<size_type>::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end(); ++j)
         out << ',' << *j;
@@ -491,11 +491,11 @@ CompressedSparsityPattern::print (std::ostream &out) const
 void
 CompressedSparsityPattern::print_gnuplot (std::ostream &out) const
 {
-  for (unsigned int row=0; row<rows; ++row)
+  for (size_type row=0; row<rows; ++row)
     {
       if (lines[row].cache_entries != 0)
         lines[row].flush_cache ();
-      for (std::vector<unsigned int>::const_iterator
+      for (std::vector<size_type>::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end(); ++j)
         // while matrix entries are usually
@@ -511,19 +511,19 @@ CompressedSparsityPattern::print_gnuplot (std::ostream &out) const
 
 
 
-unsigned int
+size_type 
 CompressedSparsityPattern::bandwidth () const
 {
-  unsigned int b=0;
-  for (unsigned int row=0; row<rows; ++row)
+  size_type b=0;
+  for (size_type row=0; row<rows; ++row)
     {
       if (lines[row].cache_entries != 0)
         lines[row].flush_cache ();
 
-      for (std::vector<unsigned int>::const_iterator
+      for (std::vector<size_type>::const_iterator
            j=lines[row].entries.begin();
            j != lines[row].entries.end(); ++j)
-        if (static_cast<unsigned int>(std::abs(static_cast<int>(row-*j))) > b)
+        if (static_cast<size_type>(std::abs(static_cast<int>(row-*j))) > b)
           b = std::abs(static_cast<signed int>(row-*j));
     }
 
@@ -532,11 +532,11 @@ CompressedSparsityPattern::bandwidth () const
 
 
 
-unsigned int
+size_type 
 CompressedSparsityPattern::n_nonzero_elements () const
 {
-  unsigned int n=0;
-  for (unsigned int i=0; i<rows; ++i)
+  size_type n=0;
+  for (size_type i=0; i<rows; ++i)
     {
       if (lines[i].cache_entries != 0)
         lines[i].flush_cache ();
@@ -548,16 +548,16 @@ CompressedSparsityPattern::n_nonzero_elements () const
 
 
 // explicit instantiations
-template void CompressedSparsityPattern::Line::add_entries(types::global_dof_index *,
-                                                           types::global_dof_index *,
+template void CompressedSparsityPattern::Line::add_entries(size_type *,
+                                                           size_type *,
                                                            const bool);
-template void CompressedSparsityPattern::Line::add_entries(const types::global_dof_index *,
-                                                           const types::global_dof_index *,
+template void CompressedSparsityPattern::Line::add_entries(const size_type *,
+                                                           const size_type *,
                                                            const bool);
 #ifndef DEAL_II_VECTOR_ITERATOR_IS_POINTER
 template void CompressedSparsityPattern::Line::
-add_entries(std::vector<unsigned int>::iterator,
-            std::vector<unsigned int>::iterator,
+add_entries(std::vector<size_type>::iterator,
+            std::vector<size_type>::iterator,
             const bool);
 #endif
 
index bba9512788f2079e5fae3afe235c3ebafb04130d..e0929273e27f5091cfa83f91d2c05c7058333daf 100644 (file)
@@ -54,7 +54,7 @@ const Table<2,bool> ConstraintMatrix::default_empty_table = Table<2,bool>();
 
 
 bool
-ConstraintMatrix::check_zero_weight (const std::pair<unsigned int, double> &p)
+ConstraintMatrix::check_zero_weight (const std::pair<size_type, double> &p)
 {
   return (p.second == 0);
 }
@@ -77,7 +77,7 @@ ConstraintMatrix::ConstraintLine::operator == (const ConstraintLine &a) const
 
 
 
-std::size_t
+size_type
 ConstraintMatrix::ConstraintLine::memory_consumption () const
 {
   return (MemoryConsumption::memory_consumption (line) +
@@ -88,9 +88,9 @@ ConstraintMatrix::ConstraintLine::memory_consumption () const
 
 
 void
-ConstraintMatrix::add_lines (const std::set<unsigned int> &lines)
+ConstraintMatrix::add_lines (const std::set<size_type> &lines)
 {
-  for (std::set<unsigned int>::const_iterator
+  for (std::set<size_type>::const_iterator
        i = lines.begin(); i != lines.end(); ++i)
     add_line (*i);
 }
@@ -100,7 +100,7 @@ ConstraintMatrix::add_lines (const std::set<unsigned int> &lines)
 void
 ConstraintMatrix::add_lines (const std::vector<bool> &lines)
 {
-  for (unsigned int i=0; i<lines.size(); ++i)
+  for (size_type i=0; i<lines.size(); ++i)
     if (lines[i] == true)
       add_line (i);
 }
@@ -110,7 +110,7 @@ ConstraintMatrix::add_lines (const std::vector<bool> &lines)
 void
 ConstraintMatrix::add_lines (const IndexSet &lines)
 {
-  for (unsigned int i=0; i<lines.n_elements(); ++i)
+  for (size_type i=0; i<lines.n_elements(); ++i)
     add_line (lines.nth_index_in_set(i));
 }
 
@@ -118,8 +118,8 @@ ConstraintMatrix::add_lines (const IndexSet &lines)
 
 void
 ConstraintMatrix::add_entries
-(const unsigned int                                  line,
- const std::vector<std::pair<unsigned int,double> > &col_val_pairs)
+(const size_type                                  line,
+ const std::vector<std::pair<size_type,double> > &col_val_pairs)
 {
   Assert (sorted==false, ExcMatrixIsClosed());
   Assert (is_constrained(line), ExcLineInexistant(line));
@@ -136,7 +136,7 @@ ConstraintMatrix::add_entries
   // an entry for this column already
   // exists, since we don't want to
   // enter it twice
-  for (std::vector<std::pair<unsigned int,double> >::const_iterator
+  for (std::vector<std::pair<size_type,double> >::const_iterator
        col_val_pair = col_val_pairs.begin();
        col_val_pair!=col_val_pairs.end(); ++col_val_pair)
     {
@@ -175,10 +175,10 @@ void ConstraintMatrix::add_selected_constraints
        line!=constraints.lines.end(); ++line)
     if (filter.is_element(line->line))
       {
-        const unsigned int row = filter.index_within_set (line->line);
+        const size_type row = filter.index_within_set (line->line);
         add_line (row);
         set_inhomogeneity (row, line->inhomogeneity);
-        for (unsigned int i=0; i<line->entries.size(); ++i)
+        for (size_type i=0; i<line->entries.size(); ++i)
           if (filter.is_element(line->entries[i].first))
             add_entry (row, filter.index_within_set (line->entries[i].first),
                        line->entries[i].second);
@@ -200,9 +200,9 @@ void ConstraintMatrix::close ()
   // modify the size any more after this
   // point.
   {
-    std::vector<unsigned int> new_lines (lines_cache.size(),
-                                         numbers::invalid_unsigned_int);
-    unsigned int counter = 0;
+    std::vector<size_type> new_lines (lines_cache.size(),
+                                         numbers::invalid_size_type);
+    size_type counter = 0;
     for (std::vector<ConstraintLine>::const_iterator line=lines.begin();
          line!=lines.end(); ++line, ++counter)
       new_lines[calculate_line_index(line->line)] = counter;
@@ -211,8 +211,8 @@ void ConstraintMatrix::close ()
 
   // in debug mode: check whether we really
   // set the pointers correctly.
-  for (unsigned int i=0; i<lines_cache.size(); ++i)
-    if (lines_cache[i] != numbers::invalid_unsigned_int)
+  for (size_type i=0; i<lines_cache.size(); ++i)
+    if (lines_cache[i] != numbers::invalid_size_int)
       Assert (i == calculate_line_index(lines[lines_cache[i]].line),
               ExcInternalError());
 
@@ -242,7 +242,7 @@ void ConstraintMatrix::close ()
   // Let us figure out the largest dof index. This is an upper bound for the
   // number of constraints because it is an approximation for the number of dofs
   // in our system.
-  unsigned int largest_idx = 0;
+  size_type largest_idx = 0;
   for (std::vector<ConstraintLine>::iterator line = lines.begin();
        line!=lines.end(); ++line)
     {
@@ -278,7 +278,7 @@ void ConstraintMatrix::close ()
   // efficient. also, we have to do
   // it only once, rather than in
   // each iteration
-  unsigned int iteration = 0;
+  size_type iteration = 0;
   while (true)
     {
       bool chained_constraint_replaced = false;
@@ -289,7 +289,7 @@ void ConstraintMatrix::close ()
 #ifdef DEBUG
           // we need to keep track of how many replacements we do in this line, because we can
           // end up in a cycle A->B->C->A without the number of entries growing.
-          unsigned int n_replacements = 0;
+          size_type n_replacements = 0;
 #endif
 
 
@@ -304,7 +304,7 @@ void ConstraintMatrix::close ()
           // elements that we don't
           // store on the current
           // processor
-          unsigned int entry = 0;
+          size_type entry = 0;
           while (entry < line->entries.size())
             if (((local_lines.size() == 0)
                  ||
@@ -320,8 +320,8 @@ void ConstraintMatrix::close ()
                 // look up the chain
                 // of constraints for
                 // this entry
-                const unsigned int dof_index = line->entries[entry].first;
-                const double       weight = line->entries[entry].second;
+                const size_type  dof_index = line->entries[entry].first;
+                const double     weight = line->entries[entry].second;
 
                 Assert (dof_index != line->line,
                         ExcMessage ("Cycle in constraints detected!"));
@@ -356,7 +356,7 @@ void ConstraintMatrix::close ()
                 // of other dofs:
                 if (constrained_line->entries.size() > 0)
                   {
-                    for (unsigned int i=0; i<constrained_line->entries.size(); ++i)
+                    for (size_type i=0; i<constrained_line->entries.size(); ++i)
                       Assert (dof_index != constrained_line->entries[i].first,
                               ExcMessage ("Cycle in constraints detected!"));
 
@@ -369,7 +369,7 @@ void ConstraintMatrix::close ()
                                       constrained_line->entries[0].second *
                                       weight);
 
-                    for (unsigned int i=1; i<constrained_line->entries.size(); ++i)
+                    for (size_type i=1; i<constrained_line->entries.size(); ++i)
                       line->entries
                       .push_back (std::make_pair (constrained_line->entries[i].first,
                                                   constrained_line->entries[i].second *
@@ -458,8 +458,8 @@ void ConstraintMatrix::close ()
       // lets us allocate the correct amount
       // of memory for the constraint
       // entries.
-      unsigned int duplicates = 0;
-      for (unsigned int i=1; i<line->entries.size(); ++i)
+      size_type duplicates = 0;
+      for (size_type i=1; i<line->entries.size(); ++i)
         if (line->entries[i].first == line->entries[i-1].first)
           duplicates++;
 
@@ -480,7 +480,7 @@ void ConstraintMatrix::close ()
               // resolve the duplicates
               new_entries.reserve (line->entries.size() - duplicates);
               new_entries.push_back(line->entries[0]);
-              for (unsigned int j=1; j<line->entries.size(); ++j)
+              for (size_type j=1; j<line->entries.size(); ++j)
                 if (line->entries[j].first == line->entries[j-1].first)
                   {
                     Assert (new_entries.back().first == line->entries[j].first,
@@ -497,7 +497,7 @@ void ConstraintMatrix::close ()
               // really no duplicates
               // left and that the list
               // is still sorted
-              for (unsigned int j=1; j<new_entries.size(); ++j)
+              for (size_type j=1; j<new_entries.size(); ++j)
                 {
                   Assert (new_entries[j].first != new_entries[j-1].first,
                           ExcInternalError());
@@ -539,11 +539,11 @@ void ConstraintMatrix::close ()
       // weights are also subject
       // to round-off
       double sum = 0;
-      for (unsigned int i=0; i<line->entries.size(); ++i)
+      for (size_type i=0; i<line->entries.size(); ++i)
         sum += line->entries[i].second;
       if ((sum != 1.0) && (std::fabs (sum-1.) < 1.e-13))
         {
-          for (unsigned int i=0; i<line->entries.size(); ++i)
+          for (size_type i=0; i<line->entries.size(); ++i)
             line->entries[i].second /= sum;
           line->inhomogeneity /= sum;
         }
@@ -591,7 +591,7 @@ ConstraintMatrix::merge (const ConstraintMatrix &other_constraints,
 
   if (other_constraints.lines_cache.size() > lines_cache.size())
     lines_cache.resize(other_constraints.lines_cache.size(),
-                       numbers::invalid_unsigned_int);
+                       numbers::invalid_size_type);
 
   // first action is to fold into the present
   // object possible constraints in the
@@ -613,7 +613,7 @@ ConstraintMatrix::merge (const ConstraintMatrix &other_constraints,
        line!=lines.end(); ++line)
     {
       tmp.clear ();
-      for (unsigned int i=0; i<line->entries.size(); ++i)
+      for (size_type i=0; i<line->entries.size(); ++i)
         {
           // if the present dof is not
           // constrained, or if we won't take
@@ -646,7 +646,7 @@ ConstraintMatrix::merge (const ConstraintMatrix &other_constraints,
 
               for (ConstraintLine::Entries::const_iterator j=other_line->begin();
                    j!=other_line->end(); ++j)
-                tmp.push_back (std::pair<unsigned int,double>(j->first,
+                tmp.push_back (std::pair<size_type,double>(j->first,
                                                               j->second*weight));
 
               line->inhomogeneity += other_constraints.get_inhomogeneity(line->entries[i].first) *
@@ -701,7 +701,7 @@ ConstraintMatrix::merge (const ConstraintMatrix &other_constraints,
       }
 
   // update the lines cache
-  unsigned int counter = 0;
+  size_type counter = 0;
   for (std::vector<ConstraintLine>::const_iterator line=lines.begin();
        line!=lines.end(); ++line, ++counter)
     lines_cache[calculate_line_index(line->line)] = counter;
@@ -717,13 +717,13 @@ ConstraintMatrix::merge (const ConstraintMatrix &other_constraints,
 
 
 
-void ConstraintMatrix::shift (const unsigned int offset)
+void ConstraintMatrix::shift (const size_type offset)
 {
   //TODO: this doesn't work with IndexSets yet. [TH]
   AssertThrow(local_lines.size()==0, ExcNotImplemented());
 
   lines_cache.insert (lines_cache.begin(), offset,
-                      numbers::invalid_unsigned_int);
+                      numbers::invalid_size_type);
 
   for (std::vector<ConstraintLine>::iterator i = lines.begin();
        i != lines.end(); ++i)
@@ -746,7 +746,7 @@ void ConstraintMatrix::clear ()
   }
 
   {
-    std::vector<unsigned int> tmp;
+    std::vector<size_type> tmp;
     lines_cache.swap (tmp);
   }
 
@@ -780,15 +780,15 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
   new_line.reserve (uncondensed.n_rows());
 
   std::vector<ConstraintLine>::const_iterator next_constraint = lines.begin();
-  unsigned int                                shift           = 0;
-  unsigned int n_rows = uncondensed.n_rows();
+  size_type                                   shift           = 0;
+  size_type n_rows = uncondensed.n_rows();
 
   if (next_constraint == lines.end())
     // if no constraint is to be handled
-    for (unsigned int row=0; row!=n_rows; ++row)
+    for (size_type row=0; row!=n_rows; ++row)
       new_line.push_back (row);
   else
-    for (unsigned int row=0; row!=n_rows; ++row)
+    for (size_type row=0; row!=n_rows; ++row)
       if (row == next_constraint->line)
         {
           // this line is constrained
@@ -800,7 +800,7 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
             // nothing more to do; finish rest
             // of loop
             {
-              for (unsigned int i=row+1; i<n_rows; ++i)
+              for (size_type i=row+1; i<n_rows; ++i)
                 new_line.push_back (i-shift);
               break;
             };
@@ -813,7 +813,7 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
   // note: in this loop we need not check whether @p{next_constraint} is a
   // valid iterator, since @p{next_constraint} is only evaluated so often as
   // there are entries in new_line[*] which tells us which constraints exist
-  for (unsigned int row=0; row<uncondensed.n_rows(); ++row)
+  for (size_type row=0; row<uncondensed.n_rows(); ++row)
     if (new_line[row] != -1)
       // line not constrained copy entries if column will not be condensed
       // away, distribute otherwise
@@ -828,7 +828,7 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
             while (c->line != j->column())
               ++c;
 
-            for (unsigned int q=0; q!=c->entries.size(); ++q)
+            for (size_type q=0; q!=c->entries.size(); ++q)
               condensed.add (new_line[row], new_line[c->entries[q].first]);
           }
     else
@@ -839,7 +839,7 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
           // for each entry: distribute
           if (new_line[j->column()] != -1)
             // column is not constrained
-            for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
+            for (size_type q=0; q!=next_constraint->entries.size(); ++q)
               condensed.add (new_line[next_constraint->entries[q].first],
                              new_line[j->column()]);
 
@@ -852,8 +852,8 @@ void ConstraintMatrix::condense (const SparsityPattern &uncondensed,
               std::vector<ConstraintLine>::const_iterator c = lines.begin();
               while (c->line != j->column()) ++c;
 
-              for (unsigned int p=0; p!=c->entries.size(); ++p)
-                for (unsigned int q=0; q!=next_constraint->entries.size(); ++q)
+              for (size_type p=0; p!=c->entries.size(); ++p)
+                for (size_type q=0; q!=next_constraint->entries.size(); ++q)
                   condensed.add (new_line[next_constraint->entries[q].first],
                                  new_line[c->entries[p].first]);
             };
@@ -874,21 +874,21 @@ void ConstraintMatrix::condense (SparsityPattern &sparsity) const
 
   // store for each index whether it must be
   // distributed or not. If entry is
-  // numbers::invalid_unsigned_int,
+  // numbers::invalid_size_type,
   // no distribution is necessary.
   // otherwise, the number states which line
   // in the constraint matrix handles this
   // index
-  std::vector<unsigned int> distribute(sparsity.n_rows(),
-                                       numbers::invalid_unsigned_int);
+  std::vector<size_type> distribute(sparsity.n_rows(),
+                                    numbers::invalid_size_type);
 
-  for (unsigned int c=0; c<lines.size(); ++c)
+  for (size_type c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
-  const unsigned int n_rows = sparsity.n_rows();
-  for (unsigned int row=0; row<n_rows; ++row)
+  const size_type n_rows = sparsity.n_rows();
+  for (size_type row=0; row<n_rows; ++row)
     {
-      if (distribute[row] == numbers::invalid_unsigned_int)
+      if (distribute[row] == numbers::invalid_size_type)
         {
           // regular line. loop over cols all valid cols. note that this
           // changes the line we are presently working on: we add additional
@@ -899,23 +899,23 @@ void ConstraintMatrix::condense (SparsityPattern &sparsity) const
           // the last old entry and stop work there, but since operating on
           // the newly added ones only takes two comparisons (column index
           // valid, distribute[column] necessarily
-          // ==numbers::invalid_unsigned_int), it is cheaper to not do so and
+          // ==numbers::invalid_size_type), it is cheaper to not do so and
           // run right until the end of the line
           for (SparsityPattern::iterator entry = sparsity.begin(row);
                ((entry != sparsity.end(row)) &&
                 entry->is_valid_entry());
                ++entry)
             {
-              const unsigned int column = entry->column();
+              const size_type column = entry->column();
 
-              if (distribute[column] != numbers::invalid_unsigned_int)
+              if (distribute[column] != numbers::invalid_size_type)
                 {
                   // distribute entry
                   // at regular row
                   // @p{row} and
                   // irregular column
                   // sparsity.colnums[j]
-                  for (unsigned int q=0;
+                  for (size_type q=0;
                        q!=lines[distribute[column]].entries.size();
                        ++q)
                     sparsity.add (row,
@@ -932,12 +932,12 @@ void ConstraintMatrix::condense (SparsityPattern &sparsity) const
           for (SparsityPattern::iterator entry = sparsity.begin(row);
                (entry != sparsity.end(row)) && entry->is_valid_entry(); ++entry)
             {
-              const unsigned int column = entry->column();
-              if (distribute[column] == numbers::invalid_unsigned_int)
+              const size_type column = entry->column();
+              if (distribute[column] == numbers::invalid_size_type)
                 // distribute entry at irregular
                 // row @p{row} and regular column
                 // sparsity.colnums[j]
-                for (unsigned int q=0;
+                for (size_type q=0;
                      q!=lines[distribute[row]].entries.size(); ++q)
                   sparsity.add (lines[distribute[row]].entries[q].first,
                                 column);
@@ -945,8 +945,8 @@ void ConstraintMatrix::condense (SparsityPattern &sparsity) const
                 // distribute entry at irregular
                 // row @p{row} and irregular column
                 // sparsity.get_column_numbers()[j]
-                for (unsigned int p=0; p!=lines[distribute[row]].entries.size(); ++p)
-                  for (unsigned int q=0;
+                for (size_type p=0; p!=lines[distribute[row]].entries.size(); ++p)
+                  for (size_type q=0;
                        q!=lines[distribute[column]].entries.size(); ++q)
                     sparsity.add (lines[distribute[row]].entries[p].first,
                                   lines[distribute[column]].entries[q].first);
@@ -967,31 +967,31 @@ void ConstraintMatrix::condense (CompressedSparsityPattern &sparsity) const
 
   // store for each index whether it must be
   // distributed or not. If entry is
-  // numbers::invalid_unsigned_int,
+  // numbers::invalid_size_type,
   // no distribution is necessary.
   // otherwise, the number states which line
   // in the constraint matrix handles this
   // index
-  std::vector<unsigned int> distribute(sparsity.n_rows(),
-                                       numbers::invalid_unsigned_int);
+  std::vector<size_type> distribute(sparsity.n_rows(),
+                                    numbers::invalid_size_type);
 
-  for (unsigned int c=0; c<lines.size(); ++c)
+  for (size_type c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
-  const unsigned int n_rows = sparsity.n_rows();
-  for (unsigned int row=0; row<n_rows; ++row)
+  const size_type n_rows = sparsity.n_rows();
+  for (size_type row=0; row<n_rows; ++row)
     {
-      if (distribute[row] == numbers::invalid_unsigned_int)
+      if (distribute[row] == numbers::invalid_size_type)
         // regular line. loop over
         // cols. note that as we
         // proceed to distribute
         // cols, the loop may get
         // longer
-        for (unsigned int j=0; j<sparsity.row_length(row); ++j)
+        for (size_type j=0; j<sparsity.row_length(row); ++j)
           {
-            const unsigned int column = sparsity.column_number(row,j);
+            const size_type column = sparsity.column_number(row,j);
 
-            if (distribute[column] != numbers::invalid_unsigned_int)
+            if (distribute[column] != numbers::invalid_size_type)
               {
                 // distribute entry
                 // at regular row
@@ -1046,17 +1046,17 @@ void ConstraintMatrix::condense (CompressedSparsityPattern &sparsity) const
                 // before by tracking
                 // the length of this
                 // row
-                unsigned int old_rowlength = sparsity.row_length(row);
-                for (unsigned int q=0;
+                size_type old_rowlength = sparsity.row_length(row);
+                for (size_type q=0;
                      q!=lines[distribute[column]].entries.size();
                      ++q)
                   {
-                    const unsigned int
+                    const size_type 
                     new_col = lines[distribute[column]].entries[q].first;
 
                     sparsity.add (row, new_col);
 
-                    const unsigned int new_rowlength = sparsity.row_length(row);
+                    const size_type new_rowlength = sparsity.row_length(row);
                     if ((new_col < column) && (old_rowlength != new_rowlength))
                       ++j;
                     old_rowlength = new_rowlength;
@@ -1065,15 +1065,15 @@ void ConstraintMatrix::condense (CompressedSparsityPattern &sparsity) const
           }
       else
         // row must be distributed
-        for (unsigned int j=0; j<sparsity.row_length(row); ++j)
+        for (size_type j=0; j<sparsity.row_length(row); ++j)
           {
-            const unsigned int column = sparsity.column_number(row,j);
+            const size_type column = sparsity.column_number(row,j);
 
-            if (distribute[column] == numbers::invalid_unsigned_int)
+            if (distribute[column] == numbers::invalid_size_type)
               // distribute entry at irregular
               // row @p{row} and regular column
               // sparsity.colnums[j]
-              for (unsigned int q=0;
+              for (size_type q=0;
                    q!=lines[distribute[row]].entries.size(); ++q)
                 sparsity.add (lines[distribute[row]].entries[q].first,
                               column);
@@ -1081,8 +1081,8 @@ void ConstraintMatrix::condense (CompressedSparsityPattern &sparsity) const
               // distribute entry at irregular
               // row @p{row} and irregular column
               // sparsity.get_column_numbers()[j]
-              for (unsigned int p=0; p!=lines[distribute[row]].entries.size(); ++p)
-                for (unsigned int q=0;
+              for (size_type p=0; p!=lines[distribute[row]].entries.size(); ++p)
+                for (size_type q=0;
                      q!=lines[distribute[sparsity.column_number(row,j)]]
                      .entries.size(); ++q)
                   sparsity.add (lines[distribute[row]].entries[p].first,
@@ -1102,21 +1102,21 @@ void ConstraintMatrix::condense (CompressedSetSparsityPattern &sparsity) const
 
   // store for each index whether it must be
   // distributed or not. If entry is
-  // numbers::invalid_unsigned_int,
+  // numbers::invalid_size_type,
   // no distribution is necessary.
   // otherwise, the number states which line
   // in the constraint matrix handles this
   // index
-  std::vector<unsigned int> distribute(sparsity.n_rows(),
-                                       numbers::invalid_unsigned_int);
+  std::vector<size_type> distribute(sparsity.n_rows(),
+                                    numbers::invalid_size_type);
 
-  for (unsigned int c=0; c<lines.size(); ++c)
+  for (size_type c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
-  const unsigned int n_rows = sparsity.n_rows();
-  for (unsigned int row=0; row<n_rows; ++row)
+  const size_type n_rows = sparsity.n_rows();
+  for (size_type row=0; row<n_rows; ++row)
     {
-      if (distribute[row] == numbers::invalid_unsigned_int)
+      if (distribute[row] == numbers::invalid_size_type)
         {
           // regular line. loop over
           // cols. note that as we proceed to
@@ -1126,16 +1126,16 @@ void ConstraintMatrix::condense (CompressedSetSparsityPattern &sparsity) const
 
           for (; col_num != sparsity.row_end (row); ++col_num)
             {
-              const unsigned int column = *col_num;
+              const size_type column = *col_num;
 
-              if (distribute[column] != numbers::invalid_unsigned_int)
+              if (distribute[column] != numbers::invalid_size_type)
                 {
                   // row
-                  for (unsigned int q=0;
+                  for (size_type q=0;
                        q!=lines[distribute[column]].entries.size();
                        ++q)
                     {
-                      const unsigned int
+                      const size_type 
                       new_col = lines[distribute[column]].entries[q].first;
 
                       sparsity.add (row, new_col);
@@ -1150,13 +1150,13 @@ void ConstraintMatrix::condense (CompressedSetSparsityPattern &sparsity) const
 
           for (; col_num != sparsity.row_end (row); ++col_num)
             {
-              const unsigned int column = *col_num;
+              const size_type column = *col_num;
 
-              if (distribute[column] == numbers::invalid_unsigned_int)
+              if (distribute[column] == numbers::invalid_size_type)
                 // distribute entry at irregular
                 // row @p{row} and regular column
                 // sparsity.colnums[j]
-                for (unsigned int q=0;
+                for (size_type q=0;
                      q!=lines[distribute[row]].entries.size(); ++q)
                   sparsity.add (lines[distribute[row]].entries[q].first,
                                 column);
@@ -1164,8 +1164,8 @@ void ConstraintMatrix::condense (CompressedSetSparsityPattern &sparsity) const
                 // distribute entry at irregular
                 // row @p{row} and irregular column
                 // sparsity.get_column_numbers()[j]
-                for (unsigned int p=0; p!=lines[distribute[row]].entries.size(); ++p)
-                  for (unsigned int q=0;
+                for (size_type p=0; p!=lines[distribute[row]].entries.size(); ++p)
+                  for (size_type q=0;
                        q!=lines[distribute[column]]
                        .entries.size(); ++q)
                     sparsity.add (lines[distribute[row]].entries[p].first,
@@ -1186,31 +1186,31 @@ void ConstraintMatrix::condense (CompressedSimpleSparsityPattern &sparsity) cons
 
   // store for each index whether it must be
   // distributed or not. If entry is
-  // numbers::invalid_unsigned_int,
+  // numbers::invalid_size_type,
   // no distribution is necessary.
   // otherwise, the number states which line
   // in the constraint matrix handles this
   // index
-  std::vector<unsigned int> distribute(sparsity.n_rows(),
-                                       numbers::invalid_unsigned_int);
+  std::vector<size_type> distribute(sparsity.n_rows(),
+                                       numbers::invalid_size_type);
 
-  for (unsigned int c=0; c<lines.size(); ++c)
+  for (size_type c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
-  const unsigned int n_rows = sparsity.n_rows();
-  for (unsigned int row=0; row<n_rows; ++row)
+  const size_type n_rows = sparsity.n_rows();
+  for (size_type row=0; row<n_rows; ++row)
     {
-      if (distribute[row] == numbers::invalid_unsigned_int)
+      if (distribute[row] == numbers::invalid_size_type)
         // regular line. loop over
         // cols. note that as we
         // proceed to distribute
         // cols, the loop may get
         // longer
-        for (unsigned int j=0; j<sparsity.row_length(row); ++j)
+        for (size_type j=0; j<sparsity.row_length(row); ++j)
           {
-            const unsigned int column = sparsity.column_number(row,j);
+            const size_type column = sparsity.column_number(row,j);
 
-            if (distribute[column] != numbers::invalid_unsigned_int)
+            if (distribute[column] != numbers::invalid_size_type)
               {
                 // distribute entry
                 // at regular row
@@ -1265,17 +1265,17 @@ void ConstraintMatrix::condense (CompressedSimpleSparsityPattern &sparsity) cons
                 // before by tracking
                 // the length of this
                 // row
-                unsigned int old_rowlength = sparsity.row_length(row);
-                for (unsigned int q=0;
+                size_type old_rowlength = sparsity.row_length(row);
+                for (size_type q=0;
                      q!=lines[distribute[column]].entries.size();
                      ++q)
                   {
-                    const unsigned int
+                    const size_type 
                     new_col = lines[distribute[column]].entries[q].first;
 
                     sparsity.add (row, new_col);
 
-                    const unsigned int new_rowlength = sparsity.row_length(row);
+                    const size_type new_rowlength = sparsity.row_length(row);
                     if ((new_col < column) && (old_rowlength != new_rowlength))
                       ++j;
                     old_rowlength = new_rowlength;
@@ -1284,15 +1284,15 @@ void ConstraintMatrix::condense (CompressedSimpleSparsityPattern &sparsity) cons
           }
       else
         // row must be distributed
-        for (unsigned int j=0; j<sparsity.row_length(row); ++j)
+        for (size_type j=0; j<sparsity.row_length(row); ++j)
           {
-            const unsigned int column = sparsity.column_number(row,j);
+            const size_type column = sparsity.column_number(row,j);
 
-            if (distribute[column] == numbers::invalid_unsigned_int)
+            if (distribute[column] == numbers::invalid_size_type)
               // distribute entry at irregular
               // row @p{row} and regular column
               // sparsity.colnums[j]
-              for (unsigned int q=0;
+              for (size_type q=0;
                    q!=lines[distribute[row]].entries.size(); ++q)
                 sparsity.add (lines[distribute[row]].entries[q].first,
                               column);
@@ -1300,8 +1300,8 @@ void ConstraintMatrix::condense (CompressedSimpleSparsityPattern &sparsity) cons
               // distribute entry at irregular
               // row @p{row} and irregular column
               // sparsity.get_column_numbers()[j]
-              for (unsigned int p=0; p!=lines[distribute[row]].entries.size(); ++p)
-                for (unsigned int q=0;
+              for (size_type p=0; p!=lines[distribute[row]].entries.size(); ++p)
+                for (size_type q=0;
                      q!=lines[distribute[sparsity.column_number(row,j)]]
                      .entries.size(); ++q)
                   sparsity.add (lines[distribute[row]].entries[p].first,
@@ -1327,31 +1327,31 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
   const BlockIndices &
   index_mapping = sparsity.get_column_indices();
 
-  const unsigned int n_blocks = sparsity.n_block_rows();
+  const size_type n_blocks = sparsity.n_block_rows();
 
   // store for each index whether it must be
   // distributed or not. If entry is
-  // numbers::invalid_unsigned_int,
+  // numbers::invalid_size_type,
   // no distribution is necessary.
   // otherwise, the number states which line
   // in the constraint matrix handles this
   // index
-  std::vector<unsigned int> distribute (sparsity.n_rows(),
-                                        numbers::invalid_unsigned_int);
+  std::vector<size_type> distribute (sparsity.n_rows(),
+                                        numbers::invalid_size_type);
 
-  for (unsigned int c=0; c<lines.size(); ++c)
+  for (size_type c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = c;
 
-  const unsigned int n_rows = sparsity.n_rows();
-  for (unsigned int row=0; row<n_rows; ++row)
+  const size_type n_rows = sparsity.n_rows();
+  for (size_type row=0; row<n_rows; ++row)
     {
       // get index of this row
       // within the blocks
-      const std::pair<unsigned int,unsigned int>
+      const std::pair<size_type,size_type>
       block_index = index_mapping.global_to_local(row);
-      const unsigned int block_row = block_index.first;
+      const size_type block_row = block_index.first;
 
-      if (distribute[row] == numbers::invalid_unsigned_int)
+      if (distribute[row] == numbers::invalid_size_type)
         // regular line. loop over
         // all columns and see
         // whether this column must
@@ -1364,7 +1364,7 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
           // this blockrow and the
           // corresponding row
           // therein
-          for (unsigned int block_col=0; block_col<n_blocks; ++block_col)
+          for (size_type block_col=0; block_col<n_blocks; ++block_col)
             {
               const SparsityPattern &
               block_sparsity = sparsity.block(block_row, block_col);
@@ -1375,15 +1375,15 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
                    entry->is_valid_entry();
                    ++entry)
                 {
-                  const unsigned int global_col
+                  const size_type global_col
                     = index_mapping.local_to_global(block_col, entry->column());
 
-                  if (distribute[global_col] != numbers::invalid_unsigned_int)
+                  if (distribute[global_col] != numbers::invalid_size_type)
                     // distribute entry at regular
                     // row @p{row} and irregular column
                     // global_col
                     {
-                      for (unsigned int q=0;
+                      for (size_type q=0;
                            q!=lines[distribute[global_col]].entries.size(); ++q)
                         sparsity.add (row,
                                       lines[distribute[global_col]].entries[q].first);
@@ -1398,7 +1398,7 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
           // whole row into the
           // chunks defined by the
           // blocks
-          for (unsigned int block_col=0; block_col<n_blocks; ++block_col)
+          for (size_type block_col=0; block_col<n_blocks; ++block_col)
             {
               const SparsityPattern &
               block_sparsity = sparsity.block(block_row,block_col);
@@ -1409,15 +1409,15 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
                    entry->is_valid_entry();
                    ++entry)
                 {
-                  const unsigned int global_col
+                  const size_type global_col
                     = index_mapping.local_to_global (block_col, entry->column());
 
-                  if (distribute[global_col] == numbers::invalid_unsigned_int)
+                  if (distribute[global_col] == numbers::invalid_size_type)
                     // distribute entry at irregular
                     // row @p{row} and regular column
                     // global_col.
                     {
-                      for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q)
+                      for (size_type q=0; q!=lines[distribute[row]].entries.size(); ++q)
                         sparsity.add (lines[distribute[row]].entries[q].first, global_col);
                     }
                   else
@@ -1425,8 +1425,8 @@ void ConstraintMatrix::condense (BlockSparsityPattern &sparsity) const
                     // row @p{row} and irregular column
                     // @p{global_col}
                     {
-                      for (unsigned int p=0; p!=lines[distribute[row]].entries.size(); ++p)
-                        for (unsigned int q=0; q!=lines[distribute[global_col]].entries.size(); ++q)
+                      for (size_type p=0; p!=lines[distribute[row]].entries.size(); ++p)
+                        for (size_type q=0; q!=lines[distribute[global_col]].entries.size(); ++q)
                           sparsity.add (lines[distribute[row]].entries[p].first,
                                         lines[distribute[global_col]].entries[q].first);
                     }
@@ -1453,32 +1453,32 @@ void ConstraintMatrix::condense (BlockCompressedSparsityPattern &sparsity) const
   const BlockIndices &
   index_mapping = sparsity.get_column_indices();
 
-  const unsigned int n_blocks = sparsity.n_block_rows();
+  const size_type n_blocks = sparsity.n_block_rows();
 
   // store for each index whether it must be
   // distributed or not. If entry is
-  // numbers::invalid_unsigned_int,
+  // numbers::invalid_size_type,
   // no distribution is necessary.
   // otherwise, the number states which line
   // in the constraint matrix handles this
   // index
-  std::vector<unsigned int> distribute (sparsity.n_rows(),
-                                        numbers::invalid_unsigned_int);
+  std::vector<size_type> distribute (sparsity.n_rows(),
+                                        numbers::invalid_size_type);
 
-  for (unsigned int c=0; c<lines.size(); ++c)
+  for (size_type c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = static_cast<signed int>(c);
 
-  const unsigned int n_rows = sparsity.n_rows();
-  for (unsigned int row=0; row<n_rows; ++row)
+  const size_type n_rows = sparsity.n_rows();
+  for (size_type row=0; row<n_rows; ++row)
     {
       // get index of this row
       // within the blocks
-      const std::pair<unsigned int,unsigned int>
+      const std::pair<size_type,size_type>
       block_index = index_mapping.global_to_local(row);
-      const unsigned int block_row = block_index.first;
-      const unsigned int local_row = block_index.second;
+      const size_type block_row = block_index.first;
+      const size_type local_row = block_index.second;
 
-      if (distribute[row] == numbers::invalid_unsigned_int)
+      if (distribute[row] == numbers::invalid_size_type)
         // regular line. loop over
         // all columns and see
         // whether this column must
@@ -1504,23 +1504,23 @@ void ConstraintMatrix::condense (BlockCompressedSparsityPattern &sparsity) const
           // this blockrow and the
           // corresponding row
           // therein
-          for (unsigned int block_col=0; block_col<n_blocks; ++block_col)
+          for (size_type block_col=0; block_col<n_blocks; ++block_col)
             {
               const CompressedSparsityPattern &
               block_sparsity = sparsity.block(block_row, block_col);
 
-              for (unsigned int j=0; j<block_sparsity.row_length(local_row); ++j)
+              for (size_type j=0; j<block_sparsity.row_length(local_row); ++j)
                 {
-                  const unsigned int global_col
+                  const size_type global_col
                     = index_mapping.local_to_global(block_col,
                                                     block_sparsity.column_number(local_row,j));
 
-                  if (distribute[global_col] != numbers::invalid_unsigned_int)
+                  if (distribute[global_col] != numbers::invalid_size_type)
                     // distribute entry at regular
                     // row @p{row} and irregular column
                     // global_col
                     {
-                      for (unsigned int q=0;
+                      for (size_type q=0;
                            q!=lines[distribute[global_col]]
                            .entries.size(); ++q)
                         sparsity.add (row,
@@ -1536,23 +1536,23 @@ void ConstraintMatrix::condense (BlockCompressedSparsityPattern &sparsity) const
           // whole row into the
           // chunks defined by the
           // blocks
-          for (unsigned int block_col=0; block_col<n_blocks; ++block_col)
+          for (size_type block_col=0; block_col<n_blocks; ++block_col)
             {
               const CompressedSparsityPattern &
               block_sparsity = sparsity.block(block_row,block_col);
 
-              for (unsigned int j=0; j<block_sparsity.row_length(local_row); ++j)
+              for (size_type j=0; j<block_sparsity.row_length(local_row); ++j)
                 {
-                  const unsigned int global_col
+                  const size_type global_col
                     = index_mapping.local_to_global (block_col,
                                                      block_sparsity.column_number(local_row,j));
 
-                  if (distribute[global_col] == numbers::invalid_unsigned_int)
+                  if (distribute[global_col] == numbers::invalid_size_type)
                     // distribute entry at irregular
                     // row @p{row} and regular column
                     // global_col.
                     {
-                      for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q)
+                      for (size_type q=0; q!=lines[distribute[row]].entries.size(); ++q)
                         sparsity.add (lines[distribute[row]].entries[q].first,
                                       global_col);
                     }
@@ -1561,8 +1561,8 @@ void ConstraintMatrix::condense (BlockCompressedSparsityPattern &sparsity) const
                     // row @p{row} and irregular column
                     // @p{global_col}
                     {
-                      for (unsigned int p=0; p!=lines[distribute[row]].entries.size(); ++p)
-                        for (unsigned int q=0; q!=lines[distribute[global_col]].entries.size(); ++q)
+                      for (size_type p=0; p!=lines[distribute[row]].entries.size(); ++p)
+                        for (size_type q=0; q!=lines[distribute[global_col]].entries.size(); ++q)
                           sparsity.add (lines[distribute[row]].entries[p].first,
                                         lines[distribute[global_col]].entries[q].first);
                     };
@@ -1587,32 +1587,32 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
   const BlockIndices &
   index_mapping = sparsity.get_column_indices();
 
-  const unsigned int n_blocks = sparsity.n_block_rows();
+  const size_type n_blocks = sparsity.n_block_rows();
 
   // store for each index whether it must be
   // distributed or not. If entry is
-  // numbers::invalid_unsigned_int,
+  // numbers::invalid_size_type,
   // no distribution is necessary.
   // otherwise, the number states which line
   // in the constraint matrix handles this
   // index
-  std::vector<unsigned int> distribute (sparsity.n_rows(),
-                                        numbers::invalid_unsigned_int);
+  std::vector<size_type> distribute (sparsity.n_rows(),
+                                        numbers::invalid_size_type);
 
-  for (unsigned int c=0; c<lines.size(); ++c)
+  for (size_type c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = static_cast<signed int>(c);
 
-  const unsigned int n_rows = sparsity.n_rows();
-  for (unsigned int row=0; row<n_rows; ++row)
+  const size_type n_rows = sparsity.n_rows();
+  for (size_type row=0; row<n_rows; ++row)
     {
       // get index of this row
       // within the blocks
-      const std::pair<unsigned int,unsigned int>
+      const std::pair<size_type,size_type>
       block_index = index_mapping.global_to_local(row);
-      const unsigned int block_row = block_index.first;
-      const unsigned int local_row = block_index.second;
+      const size_type block_row = block_index.first;
+      const size_type local_row = block_index.second;
 
-      if (distribute[row] == numbers::invalid_unsigned_int)
+      if (distribute[row] == numbers::invalid_size_type)
         // regular line. loop over
         // all columns and see
         // whether this column must
@@ -1638,7 +1638,7 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
           // this blockrow and the
           // corresponding row
           // therein
-          for (unsigned int block_col=0; block_col<n_blocks; ++block_col)
+          for (size_type block_col=0; block_col<n_blocks; ++block_col)
             {
               const CompressedSetSparsityPattern &
               block_sparsity = sparsity.block(block_row, block_col);
@@ -1647,15 +1647,15 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
                    j = block_sparsity.row_begin(local_row);
                    j != block_sparsity.row_end(local_row); ++j)
                 {
-                  const unsigned int global_col
+                  const size_type global_col
                     = index_mapping.local_to_global(block_col, *j);
 
-                  if (distribute[global_col] != numbers::invalid_unsigned_int)
+                  if (distribute[global_col] != numbers::invalid_size_type)
                     // distribute entry at regular
                     // row @p{row} and irregular column
                     // global_col
                     {
-                      for (unsigned int q=0;
+                      for (size_type q=0;
                            q!=lines[distribute[global_col]]
                            .entries.size(); ++q)
                         sparsity.add (row,
@@ -1671,7 +1671,7 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
           // whole row into the
           // chunks defined by the
           // blocks
-          for (unsigned int block_col=0; block_col<n_blocks; ++block_col)
+          for (size_type block_col=0; block_col<n_blocks; ++block_col)
             {
               const CompressedSetSparsityPattern &
               block_sparsity = sparsity.block(block_row,block_col);
@@ -1680,15 +1680,15 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
                    j = block_sparsity.row_begin(local_row);
                    j != block_sparsity.row_end(local_row); ++j)
                 {
-                  const unsigned int global_col
+                  const size_type global_col
                     = index_mapping.local_to_global (block_col, *j);
 
-                  if (distribute[global_col] == numbers::invalid_unsigned_int)
+                  if (distribute[global_col] == numbers::invalid_size_type)
                     // distribute entry at irregular
                     // row @p{row} and regular column
                     // global_col.
                     {
-                      for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q)
+                      for (size_type q=0; q!=lines[distribute[row]].entries.size(); ++q)
                         sparsity.add (lines[distribute[row]].entries[q].first,
                                       global_col);
                     }
@@ -1697,8 +1697,8 @@ void ConstraintMatrix::condense (BlockCompressedSetSparsityPattern &sparsity) co
                     // row @p{row} and irregular column
                     // @p{global_col}
                     {
-                      for (unsigned int p=0; p!=lines[distribute[row]].entries.size(); ++p)
-                        for (unsigned int q=0; q!=lines[distribute[global_col]].entries.size(); ++q)
+                      for (size_type p=0; p!=lines[distribute[row]].entries.size(); ++p)
+                        for (size_type q=0; q!=lines[distribute[global_col]].entries.size(); ++q)
                           sparsity.add (lines[distribute[row]].entries[p].first,
                                         lines[distribute[global_col]].entries[q].first);
                     };
@@ -1723,32 +1723,32 @@ void ConstraintMatrix::condense (BlockCompressedSimpleSparsityPattern &sparsity)
   const BlockIndices &
   index_mapping = sparsity.get_column_indices();
 
-  const unsigned int n_blocks = sparsity.n_block_rows();
+  const size_type n_blocks = sparsity.n_block_rows();
 
   // store for each index whether it must be
   // distributed or not. If entry is
-  // numbers::invalid_unsigned_int,
+  // numbers::invalid_size_type,
   // no distribution is necessary.
   // otherwise, the number states which line
   // in the constraint matrix handles this
   // index
-  std::vector<unsigned int> distribute (sparsity.n_rows(),
-                                        numbers::invalid_unsigned_int);
+  std::vector<size_type> distribute (sparsity.n_rows(),
+                                        numbers::invalid_size_type);
 
-  for (unsigned int c=0; c<lines.size(); ++c)
+  for (size_type c=0; c<lines.size(); ++c)
     distribute[lines[c].line] = static_cast<signed int>(c);
 
-  const unsigned int n_rows = sparsity.n_rows();
-  for (unsigned int row=0; row<n_rows; ++row)
+  const size_type n_rows = sparsity.n_rows();
+  for (size_type row=0; row<n_rows; ++row)
     {
       // get index of this row
       // within the blocks
-      const std::pair<unsigned int,unsigned int>
+      const std::pair<size_type,size_type>
       block_index = index_mapping.global_to_local(row);
-      const unsigned int block_row = block_index.first;
-      const unsigned int local_row = block_index.second;
+      const size_type block_row = block_index.first;
+      const size_type local_row = block_index.second;
 
-      if (distribute[row] == numbers::invalid_unsigned_int)
+      if (distribute[row] == numbers::invalid_size_type)
         // regular line. loop over
         // all columns and see
         // whether this column must
@@ -1774,23 +1774,23 @@ void ConstraintMatrix::condense (BlockCompressedSimpleSparsityPattern &sparsity)
           // this blockrow and the
           // corresponding row
           // therein
-          for (unsigned int block_col=0; block_col<n_blocks; ++block_col)
+          for (size_type block_col=0; block_col<n_blocks; ++block_col)
             {
               const CompressedSimpleSparsityPattern &
               block_sparsity = sparsity.block(block_row, block_col);
 
-              for (unsigned int j=0; j<block_sparsity.row_length(local_row); ++j)
+              for (size_type j=0; j<block_sparsity.row_length(local_row); ++j)
                 {
-                  const unsigned int global_col
+                  const size_type global_col
                     = index_mapping.local_to_global(block_col,
                                                     block_sparsity.column_number(local_row,j));
 
-                  if (distribute[global_col] != numbers::invalid_unsigned_int)
+                  if (distribute[global_col] != numbers::invalid_size_type)
                     // distribute entry at regular
                     // row @p{row} and irregular column
                     // global_col
                     {
-                      for (unsigned int q=0;
+                      for (size_type q=0;
                            q!=lines[distribute[global_col]]
                            .entries.size(); ++q)
                         sparsity.add (row,
@@ -1806,23 +1806,23 @@ void ConstraintMatrix::condense (BlockCompressedSimpleSparsityPattern &sparsity)
           // whole row into the
           // chunks defined by the
           // blocks
-          for (unsigned int block_col=0; block_col<n_blocks; ++block_col)
+          for (size_type block_col=0; block_col<n_blocks; ++block_col)
             {
               const CompressedSimpleSparsityPattern &
               block_sparsity = sparsity.block(block_row,block_col);
 
-              for (unsigned int j=0; j<block_sparsity.row_length(local_row); ++j)
+              for (size_type j=0; j<block_sparsity.row_length(local_row); ++j)
                 {
-                  const unsigned int global_col
+                  const size_type global_col
                     = index_mapping.local_to_global (block_col,
                                                      block_sparsity.column_number(local_row,j));
 
-                  if (distribute[global_col] == numbers::invalid_unsigned_int)
+                  if (distribute[global_col] == numbers::invalid_size_type)
                     // distribute entry at irregular
                     // row @p{row} and regular column
                     // global_col.
                     {
-                      for (unsigned int q=0; q!=lines[distribute[row]].entries.size(); ++q)
+                      for (size_type q=0; q!=lines[distribute[row]].entries.size(); ++q)
                         sparsity.add (lines[distribute[row]].entries[q].first,
                                       global_col);
                     }
@@ -1831,8 +1831,8 @@ void ConstraintMatrix::condense (BlockCompressedSimpleSparsityPattern &sparsity)
                     // row @p{row} and irregular column
                     // @p{global_col}
                     {
-                      for (unsigned int p=0; p!=lines[distribute[row]].entries.size(); ++p)
-                        for (unsigned int q=0; q!=lines[distribute[global_col]].entries.size(); ++q)
+                      for (size_type p=0; p!=lines[distribute[row]].entries.size(); ++p)
+                        for (size_type q=0; q!=lines[distribute[global_col]].entries.size(); ++q)
                           sparsity.add (lines[distribute[row]].entries[p].first,
                                         lines[distribute[global_col]].entries[q].first);
                     };
@@ -1884,15 +1884,15 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::Vector &vec) const
   // constraints indicate.
   IndexSet my_indices (vec.size());
   {
-    const std::pair<unsigned int, unsigned int>
+    const std::pair<size_type, size_type>
     local_range = vec.local_range();
 
     my_indices.add_range (local_range.first, local_range.second);
 
-    std::set<unsigned int> individual_indices;
+    std::set<size_type> individual_indices;
     for (constraint_iterator it = begin_my_constraints;
          it != end_my_constraints; ++it)
-      for (unsigned int i=0; i<it->entries.size(); ++i)
+      for (size_type i=0; i<it->entries.size(); ++i)
         if ((it->entries[i].first < local_range.first)
             ||
             (it->entries[i].first >= local_range.second))
@@ -1925,7 +1925,7 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::Vector &vec) const
       // next_constraint.line by adding the
       // different contributions
       double new_value = it->inhomogeneity;
-      for (unsigned int i=0; i<it->entries.size(); ++i)
+      for (size_type i=0; i<it->entries.size(); ++i)
         new_value += (vec_distribute(it->entries[i].first) *
                       it->entries[i].second);
       vec(it->line) = new_value;
@@ -1947,7 +1947,7 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::BlockVector &vec) const
   Assert (sorted==true, ExcMatrixIsClosed());
 
   IndexSet my_indices (vec.size());
-  for (unsigned int block=0; block<vec.n_blocks(); ++block)
+  for (size_type block=0; block<vec.n_blocks(); ++block)
     {
       typedef std::vector<ConstraintLine>::const_iterator constraint_iterator;
       ConstraintLine index_comparison;
@@ -1968,15 +1968,15 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::BlockVector &vec) const
       // constraints indicate. No caching done
       // yet. would need some more clever data
       // structures for doing that.
-      const std::pair<unsigned int, unsigned int>
+      const std::pair<size_type, size_type>
       local_range = vec.block(block).local_range();
 
       my_indices.add_range (local_range.first, local_range.second);
 
-      std::set<unsigned int> individual_indices;
+      std::set<size_type> individual_indices;
       for (constraint_iterator it = begin_my_constraints;
            it != end_my_constraints; ++it)
-        for (unsigned int i=0; i<it->entries.size(); ++i)
+        for (size_type i=0; i<it->entries.size(); ++i)
           if ((it->entries[i].first < local_range.first)
               ||
               (it->entries[i].first >= local_range.second))
@@ -2002,7 +2002,7 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::BlockVector &vec) const
   // here we import the data
   vec_distribute.reinit(vec,true);
 
-  for (unsigned int block=0; block<vec.n_blocks(); ++block)
+  for (size_type block=0; block<vec.n_blocks(); ++block)
     {
       typedef std::vector<ConstraintLine>::const_iterator constraint_iterator;
       ConstraintLine index_comparison;
@@ -2024,7 +2024,7 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::BlockVector &vec) const
           // next_constraint.line by adding the
           // different contributions
           double new_value = it->inhomogeneity;
-          for (unsigned int i=0; i<it->entries.size(); ++i)
+          for (size_type i=0; i<it->entries.size(); ++i)
             new_value += (vec_distribute(it->entries[i].first) *
                           it->entries[i].second);
           vec(it->line) = new_value;
@@ -2063,15 +2063,15 @@ ConstraintMatrix::distribute (PETScWrappers::MPI::Vector &vec) const
   // all indices we need to read from
   IndexSet my_indices (vec.size());
 
-  const std::pair<unsigned int, unsigned int>
+  const std::pair<size_type, size_type>
   local_range = vec.local_range();
 
   my_indices.add_range (local_range.first, local_range.second);
 
-  std::set<unsigned int> individual_indices;
+  std::set<size_type> individual_indices;
   for (constraint_iterator it = begin_my_constraints;
        it != end_my_constraints; ++it)
-    for (unsigned int i=0; i<it->entries.size(); ++i)
+    for (size_type i=0; i<it->entries.size(); ++i)
       if ((it->entries[i].first < local_range.first)
           ||
           (it->entries[i].first >= local_range.second))
@@ -2100,7 +2100,7 @@ ConstraintMatrix::distribute (PETScWrappers::MPI::Vector &vec) const
       // next_constraint.line by adding the
       // different contributions
       PetscScalar new_value = it->inhomogeneity;
-      for (unsigned int i=0; i<it->entries.size(); ++i)
+      for (size_type i=0; i<it->entries.size(); ++i)
         new_value += (PetscScalar(ghost_vec(it->entries[i].first)) *
                       it->entries[i].second);
       vec(it->line) = new_value;
@@ -2122,7 +2122,7 @@ ConstraintMatrix::distribute (PETScWrappers::MPI::BlockVector & /*vec*/) const
 
 
 
-bool ConstraintMatrix::is_identity_constrained (const unsigned int index) const
+bool ConstraintMatrix::is_identity_constrained (const size_type index) const
 {
   if (is_constrained(index) == false)
     return false;
@@ -2139,16 +2139,16 @@ bool ConstraintMatrix::is_identity_constrained (const unsigned int index) const
 
 
 
-unsigned int ConstraintMatrix::max_constraint_indirections () const
+size_type ConstraintMatrix::max_constraint_indirections () const
 {
-  unsigned int return_value = 0;
+  size_type return_value = 0;
   for (std::vector<ConstraintLine>::const_iterator i=lines.begin();
        i!=lines.end(); ++i)
     // use static cast, since
     // typeof(size)==std::size_t, which is !=
-    // unsigned int on AIX
+    // size_type on AIX
     return_value = std::max(return_value,
-                            static_cast<unsigned int>(i->entries.size()));
+                            static_cast<size_type>(i->entries.size()));
 
   return return_value;
 }
@@ -2168,14 +2168,14 @@ bool ConstraintMatrix::has_inhomogeneities () const
 
 void ConstraintMatrix::print (std::ostream &out) const
 {
-  for (unsigned int i=0; i!=lines.size(); ++i)
+  for (size_type i=0; i!=lines.size(); ++i)
     {
       // output the list of
       // constraints as pairs of dofs
       // and their weights
       if (lines[i].entries.size() > 0)
         {
-          for (unsigned int j=0; j<lines[i].entries.size(); ++j)
+          for (size_type j=0; j<lines[i].entries.size(); ++j)
             out << "    " << lines[i].line
                 << " " << lines[i].entries[j].first
                 << ":  " << lines[i].entries[j].second << "\n";
@@ -2212,12 +2212,12 @@ ConstraintMatrix::write_dot (std::ostream &out) const
 {
   out << "digraph constraints {"
       << std::endl;
-  for (unsigned int i=0; i!=lines.size(); ++i)
+  for (size_type i=0; i!=lines.size(); ++i)
     {
       // same concept as in the
       // previous function
       if (lines[i].entries.size() > 0)
-        for (unsigned int j=0; j<lines[i].entries.size(); ++j)
+        for (size_type j=0; j<lines[i].entries.size(); ++j)
           out << "  " << lines[i].line << "->" << lines[i].entries[j].first
               << "; // weight: "
               << lines[i].entries[j].second
@@ -2230,7 +2230,7 @@ ConstraintMatrix::write_dot (std::ostream &out) const
 
 
 
-std::size_t
+size_type
 ConstraintMatrix::memory_consumption () const
 {
   return (MemoryConsumption::memory_consumption (lines) +
@@ -2267,7 +2267,7 @@ ConstraintMatrix::memory_consumption () const
       VectorType       &condensed_vector) const; \
   template void ConstraintMatrix:: \
   distribute_local_to_global<VectorType > (const Vector<double>            &, \
-                                           const std::vector<unsigned int> &, \
+                                           const std::vector<sdt::size_t>  &, \
                                            VectorType                      &, \
                                            const FullMatrix<double>        &) const; \
   template void ConstraintMatrix::distribute<VectorType >(const VectorType &condensed,\
@@ -2277,7 +2277,7 @@ ConstraintMatrix::memory_consumption () const
 #define PARALLEL_VECTOR_FUNCTIONS(VectorType) \
   template void ConstraintMatrix:: \
   distribute_local_to_global<VectorType > (const Vector<double>            &, \
-                                           const std::vector<unsigned int> &, \
+                                           const std::vector<std::size_t>  &, \
                                            VectorType                      &, \
                                            const FullMatrix<double>        &) const
 
@@ -2301,7 +2301,7 @@ PARALLEL_VECTOR_FUNCTIONS(TrilinosWrappers::MPI::BlockVector);
   template void ConstraintMatrix:: \
   distribute_local_to_global<MatrixType,VectorType > (const FullMatrix<double>        &, \
                                                       const Vector<double>            &, \
-                                                      const std::vector<unsigned int> &, \
+                                                      const std::vector<std::size_t> &, \
                                                       MatrixType                      &, \
                                                       VectorType                      &, \
                                                       bool                             , \
@@ -2310,7 +2310,7 @@ PARALLEL_VECTOR_FUNCTIONS(TrilinosWrappers::MPI::BlockVector);
   template void ConstraintMatrix:: \
   distribute_local_to_global<MatrixType,Vector<double> > (const FullMatrix<double>        &, \
                                                           const Vector<double>            &, \
-                                                          const std::vector<unsigned int> &, \
+                                                          const std::vector<std::size_t> &, \
                                                           MatrixType                      &, \
                                                           Vector<double>                  &, \
                                                           bool                             , \
@@ -2319,7 +2319,7 @@ PARALLEL_VECTOR_FUNCTIONS(TrilinosWrappers::MPI::BlockVector);
   template void ConstraintMatrix:: \
   distribute_local_to_global<MatrixType,VectorType > (const FullMatrix<double>        &, \
                                                       const Vector<double>            &, \
-                                                      const std::vector<unsigned int> &, \
+                                                      const std::vector<std::size_t> &, \
                                                       MatrixType                      &, \
                                                       VectorType                      &, \
                                                       bool                             , \
@@ -2328,7 +2328,7 @@ PARALLEL_VECTOR_FUNCTIONS(TrilinosWrappers::MPI::BlockVector);
   template void ConstraintMatrix:: \
   distribute_local_to_global<MatrixType,Vector<double> > (const FullMatrix<double>        &, \
                                                           const Vector<double>            &, \
-                                                          const std::vector<unsigned int> &, \
+                                                          const std::vector<std::size_t> &, \
                                                           MatrixType                      &, \
                                                           Vector<double>                  &, \
                                                           bool                             , \
@@ -2379,27 +2379,27 @@ BLOCK_MATRIX_VECTOR_FUNCTIONS(TrilinosWrappers::BlockSparseMatrix, TrilinosWrapp
 
 #define SPARSITY_FUNCTIONS(SparsityType) \
   template void ConstraintMatrix::add_entries_local_to_global<SparsityType> (\
-      const std::vector<unsigned int> &, \
+      const std::vector<std::size_t> &, \
       SparsityType &,                    \
       const bool,                        \
       const Table<2,bool> &, \
       internal::bool2type<false>) const; \
   template void ConstraintMatrix::add_entries_local_to_global<SparsityType> (\
-      const std::vector<unsigned int> &, \
-      const std::vector<unsigned int> &, \
+      const std::vector<std::size_t> &, \
+      const std::vector<std::size_t> &, \
       SparsityType &,                    \
       const bool,                        \
       const Table<2,bool> &) const
 #define BLOCK_SPARSITY_FUNCTIONS(SparsityType) \
   template void ConstraintMatrix::add_entries_local_to_global<SparsityType> (\
-      const std::vector<unsigned int> &, \
+      const std::vector<std::size_t> &, \
       SparsityType &,                    \
       const bool,                        \
       const Table<2,bool> &, \
       internal::bool2type<true>) const; \
   template void ConstraintMatrix::add_entries_local_to_global<SparsityType> (\
-      const std::vector<unsigned int> &, \
-      const std::vector<unsigned int> &, \
+      const std::vector<std::size_t> &, \
+      const std::vector<std::size_t> &, \
       SparsityType &,                    \
       const bool,                        \
       const Table<2,bool> &) const
@@ -2422,8 +2422,8 @@ BLOCK_SPARSITY_FUNCTIONS(TrilinosWrappers::BlockSparsityPattern);
 #define ONLY_MATRIX_FUNCTIONS(MatrixType) \
   template void ConstraintMatrix::distribute_local_to_global<MatrixType > (\
       const FullMatrix<double>        &, \
-      const std::vector<unsigned int> &, \
-      const std::vector<unsigned int> &, \
+      const std::vector<std::size_t> &, \
+      const std::vector<std::size_t> &, \
       MatrixType                      &) const
 
 ONLY_MATRIX_FUNCTIONS(SparseMatrix<float>);

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.