]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix test 52 of Trilinos to use 64 bits and fix a bug in trilinos_vector.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 25 Mar 2013 22:38:21 +0000 (22:38 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 25 Mar 2013 22:38:21 +0000 (22:38 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29031 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/trilinos_vector.h
deal.II/include/deal.II/lac/trilinos_vector_base.h
deal.II/source/lac/trilinos_sparse_matrix.cc
deal.II/source/lac/trilinos_sparsity_pattern.cc
tests/trilinos/52.cc

index 86930ab10126c31dba8e56c14bfa63671858f92f..592815da7b0588b450b404da147c5eff06222a04 100644 (file)
@@ -515,13 +515,13 @@ namespace TrilinosWrappers
 
       has_ghosts = vector->Map().UniqueGIDs()==false;
 
-      const TrilinosWrappers::types::int_type size = parallel_partitioner.NumMyElements();
+      const int size = parallel_partitioner.NumMyElements();
 
       // Need to copy out values, since the
       // deal.II might not use doubles, so
       // that a direct access is not possible.
-      for (TrilinosWrappers::types::int_type i=0; i<size; ++i)
-        (*vector)[0][i] = v(parallel_partitioner.GID(i));
+      for (int i=0; i<size; ++i)
+        (*vector)[0][i] = v(parallel_partitioner.GID64(i));
     }
 
 
@@ -542,7 +542,7 @@ namespace TrilinosWrappers
       if (size() != v.size())
         {
           vector.reset (new Epetra_FEVector(Epetra_Map
-                                            (static_cast<int>(v.size()), 0,
+                                            (static_cast<TrilinosWrappers::types::int_type>(v.size()), 0,
 #ifdef DEAL_II_WITH_MPI
                                              Epetra_MpiComm(MPI_COMM_SELF)
 #else
index 2f66baca89c23894b239b3e386af4984f1fd911c..f38ba80582e03a1c106397d07efa706cc2610dd4 100644 (file)
@@ -1470,8 +1470,8 @@ namespace TrilinosWrappers
   VectorBase::size_type
   VectorBase::size () const
   {
-    return (size_type) (vector->Map().MaxAllGID() + 1 -
-                           vector->Map().MinAllGID());
+    return (size_type) (vector->Map().MaxAllGID64() + 1 -
+                           vector->Map().MinAllGID64());
   }
 
 
index 4d97382db3c30db14f6b47db1bfa41da804599f5..e19e1d8a612840ef2ca8a8044eedde420028d330 100644 (file)
@@ -1377,7 +1377,7 @@ namespace TrilinosWrappers
           {
             matrix->ExtractMyRowView (i, num_entries, values, indices);
             for (TrilinosWrappers::types::int_type j=0; j<num_entries; ++j)
-              out << "(" << matrix->GRID(i) << "," << matrix->GCID(indices[j]) << ") "
+              out << "(" << matrix->GRID64(i) << "," << matrix->GCID64(indices[j]) << ") "
                   << values[j] << std::endl;
           }
       }
index 5a172195db8dc10a08479136011e942c77858ccd..5c5d4acf7656e8791e9dddfba64ce21e1b28349d 100644 (file)
@@ -654,7 +654,7 @@ namespace TrilinosWrappers
           {
             graph->ExtractMyRowView (i, num_entries, indices);
             for (TrilinosWrappers::types::int_type j=0; j<num_entries; ++j)
-              out << "(" << i << "," << indices[graph->GRID(j)] << ") "
+              out << "(" << i << "," << indices[graph->GRID64(j)] << ") "
                   << std::endl;
           }
       }
@@ -680,7 +680,7 @@ namespace TrilinosWrappers
           // j horizontal, gnuplot output is
           // x-y, that is we have to exchange
           // the order of output
-          out << indices[graph->GRID(static_cast<TrilinosWrappers::types::int_type>(j))]
+          out << indices[graph->GRID64(static_cast<TrilinosWrappers::types::int_type>(j))]
             << " " << -static_cast<TrilinosWrappers::types::int_type>(row)
             << std::endl;
       }
index df522f69c8855738271c32f81c5b533836597cf4..ed469755c3d067bc64a9a6194a851307e1000724 100644 (file)
@@ -64,10 +64,10 @@ int main (int argc,char **argv)
   try
     {
       {
-        std::vector<types::global_dof_index> row_lengths (5,
-            static_cast<types::global_dof_index>(3));
+        std::vector<unsigned int> row_lengths (5,3U);
         row_lengths.back() = 2;
-        TrilinosWrappers::SparseMatrix m (5U,5U,row_lengths);
+        TrilinosWrappers::SparseMatrix m (static_cast<types::global_dof_index>(5U),
+            static_cast<types::global_dof_index>(5U),row_lengths);
         test (m);
       }
     }

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.