]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use size_type for rows in ChunkSparsityPattern
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 6 Feb 2019 23:22:57 +0000 (00:22 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 6 Feb 2019 23:26:09 +0000 (00:26 +0100)
include/deal.II/lac/chunk_sparsity_pattern.h

index 4a458f598213509ea9374176c067f13910b390f0..a43a3f9558d60beeead8bc1920eb1785211e68a4 100644 (file)
@@ -64,10 +64,15 @@ namespace ChunkSparsityPatternIterators
   class Accessor
   {
   public:
+    /**
+     * Declare the type for container size.
+     */
+    using size_type = types::global_dof_index;
+
     /**
      * Constructor.
      */
-    Accessor(const ChunkSparsityPattern *matrix, const unsigned int row);
+    Accessor(const ChunkSparsityPattern *matrix, const size_type row);
 
     /**
      * Constructor. Construct the end accessor for the given sparsity pattern.
@@ -165,11 +170,16 @@ namespace ChunkSparsityPatternIterators
   class Iterator
   {
   public:
+    /**
+     * Declare the type for container size.
+     */
+    using size_type = types::global_dof_index;
+
     /**
      * Constructor. Create an iterator into the sparsity pattern @p sp for the
      * given row and the index within it.
      */
-    Iterator(const ChunkSparsityPattern *sp, const unsigned int row);
+    Iterator(const ChunkSparsityPattern *sp, const size_type row);
 
     /**
      * Prefix increment.
@@ -865,7 +875,7 @@ private:
 namespace ChunkSparsityPatternIterators
 {
   inline Accessor::Accessor(const ChunkSparsityPattern *sparsity_pattern,
-                            const unsigned int          row)
+                            const size_type             row)
     : sparsity_pattern(sparsity_pattern)
     , reduced_accessor(row == sparsity_pattern->n_rows() ?
                          *sparsity_pattern->sparsity_pattern.end() :
@@ -1039,7 +1049,7 @@ namespace ChunkSparsityPatternIterators
 
 
   inline Iterator::Iterator(const ChunkSparsityPattern *sparsity_pattern,
-                            const unsigned int          row)
+                            const size_type             row)
     : accessor(sparsity_pattern, row)
   {}
 

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.