]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix some inconsistencies in the use of 64 bits functions of Trilinos.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 26 Mar 2013 22:03:23 +0000 (22:03 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 26 Mar 2013 22:03:23 +0000 (22:03 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29049 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/trilinos_sparse_matrix.h
deal.II/include/deal.II/lac/trilinos_sparsity_pattern.h
deal.II/source/lac/trilinos_sparse_matrix.cc
deal.II/source/lac/trilinos_sparsity_pattern.cc

index 8c93853739b5c9f74adf4db0c36b7139da158253..d454730c1451069b63a17b2e06d2b49502540baa 100644 (file)
@@ -1287,7 +1287,7 @@ namespace TrilinosWrappers
      * Number of entries in a
      * specific row.
      */
-    size_type row_length (const size_type row) const;
+    unsigned int row_length (const size_type row) const;
 
     /**
      * Returns the state of the matrix,
@@ -3248,9 +3248,10 @@ namespace TrilinosWrappers
       {
         if (matrix->Filled() == false)
           {
-            ierr = matrix->Epetra_CrsMatrix::InsertGlobalValues(row, n_columns,
-                                                                const_cast<double *>(col_value_ptr),
-                                                                col_index_ptr);
+            ierr = matrix->Epetra_CrsMatrix::InsertGlobalValues(
+                static_cast<TrilinosWrappers::types::int_type>(row), 
+                static_cast<int>(n_columns),const_cast<double *>(col_value_ptr), 
+                col_index_ptr);
 
             // When inserting elements, we do
             // not want to create exceptions in
index aff528d1f8b0bd67168a3d8708253d43a7cad6f4..76b6a32d0f13b0d5f16af6d80872c5a6b950bd59 100644 (file)
@@ -1649,8 +1649,7 @@ namespace TrilinosWrappers
 
     TrilinosWrappers::types::int_type *col_index_ptr =
       (TrilinosWrappers::types::int_type *)(&*begin);
-    const TrilinosWrappers::types::int_type n_cols =
-      static_cast<TrilinosWrappers::types::int_type>(end - begin);
+    const int n_cols = static_cast<int>(end - begin);
     compressed = false;
 
     const int ierr = graph->InsertGlobalIndices (1,
index f2d480d541d60ed2dce0fc648aee4891417f661e..aa5e848a86a45a7ce5589c331101344a05ff0d3a 100644 (file)
@@ -537,7 +537,7 @@ namespace TrilinosWrappers
 
     for (size_type row=first_row; row<last_row; ++row)
       {
-        const TrilinosWrappers::types::int_type row_length = sparsity_pattern.row_length(row);
+        const int row_length = sparsity_pattern.row_length(row);
         if (row_length == 0)
           continue;
 
@@ -1008,7 +1008,7 @@ namespace TrilinosWrappers
 
 
 
-  SparseMatrix::size_type
+  unsigned int
   SparseMatrix::row_length (const size_type row) const
   {
     Assert (row < m(), ExcInternalError());
index 5f9925f974c25f4a74de037e44eaa7596c78eb72..0d6bbaa44f03822db9c8bcdd7aea1ec48518aa20 100644 (file)
@@ -733,7 +733,7 @@ namespace TrilinosWrappers
         for (int i=0; i<graph->NumMyRows(); ++i)
           {
             graph->ExtractMyRowView (i, num_entries, indices);
-            for (TrilinosWrappers::types::int_type j=0; j<num_entries; ++j)
+            for (int j=0; j<num_entries; ++j)
               out << "(" << i << "," << indices[global_row_index(*graph,j)] << ") "
                   << std::endl;
           }
@@ -754,15 +754,14 @@ namespace TrilinosWrappers
         int num_entries;
         graph->ExtractMyRowView (row, num_entries, indices);
 
-        for (size_type j=0; j<(size_type)num_entries; ++j)
+        for (unsigned int j=0; j<(unsigned int)num_entries; ++j)
           // while matrix entries are usually
           // written (i,j), with i vertical and
           // j horizontal, gnuplot output is
           // x-y, that is we have to exchange
           // the order of output
           out << indices[global_row_index(*graph,static_cast<int>(j))]
-            << " " << -static_cast<TrilinosWrappers::types::int_type>(row)
-            << std::endl;
+            << " " << -static_cast<unsigned int>(row) << std::endl;
       }
 
     AssertThrow (out, ExcIO());

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.