]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use size_type as return type of SparseMatrix::m(). 16670/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 19 Feb 2024 16:01:52 +0000 (09:01 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 19 Feb 2024 16:01:52 +0000 (09:01 -0700)
include/deal.II/lac/trilinos_tpetra_sparse_matrix.h
include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h

index ad91ed457a65947698d4e6c4b84ec94309900497..3a15cc6796a812024c16e936e3c96fd8ff2de807 100644 (file)
@@ -406,13 +406,13 @@ namespace LinearAlgebra
       /**
        * Return the number of rows in this matrix.
        */
-      dealii::types::signed_global_dof_index
+      size_type
       m() const;
 
       /**
        * Return the number of columns in this matrix.
        */
-      dealii::types::signed_global_dof_index
+      size_type
       n() const;
 
 
@@ -1110,7 +1110,7 @@ namespace LinearAlgebra
 
 
     template <typename Number, typename MemorySpace>
-    inline dealii::types::signed_global_dof_index
+    inline typename SparseMatrix<Number, MemorySpace>::size_type
     SparseMatrix<Number, MemorySpace>::m() const
     {
       return matrix->getRowMap()->getGlobalNumElements();
@@ -1119,7 +1119,7 @@ namespace LinearAlgebra
 
 
     template <typename Number, typename MemorySpace>
-    inline dealii::types::signed_global_dof_index
+    inline typename SparseMatrix<Number, MemorySpace>::size_type
     SparseMatrix<Number, MemorySpace>::n() const
     {
       // If the matrix structure has not been fixed (i.e., we did not have a
index 48b836e320dd2b132562bc1006a8f5ca7f9388d5..f8ef13c04a5f8a76f8e3966d42e4790b71f0c6db 100644 (file)
@@ -594,7 +594,7 @@ namespace LinearAlgebra
       const bool                          copy_values,
       const dealii::SparsityPattern      *use_this_sparsity)
     {
-      dealii::types::signed_global_dof_index n_rows = dealii_sparse_matrix.m();
+      const size_type n_rows = dealii_sparse_matrix.m();
       AssertDimension(row_parallel_partitioning.size(), n_rows);
       AssertDimension(col_parallel_partitioning.size(),
                       dealii_sparse_matrix.n());
@@ -631,7 +631,7 @@ namespace LinearAlgebra
       std::vector<size_type> row_indices(maximum_row_length);
       std::vector<Number>    values(maximum_row_length);
 
-      for (dealii::types::signed_global_dof_index row = 0; row < n_rows; ++row)
+      for (size_type row = 0; row < n_rows; ++row)
         // see if the row is locally stored on this processor
         if (row_parallel_partitioning.is_element(row) == true)
           {

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

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.