]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix a mpi test.
authorturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Apr 2013 14:36:42 +0000 (14:36 +0000)
committerturcksin <turcksin@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Apr 2013 14:36:42 +0000 (14:36 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29407 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/trilinos_sparse_matrix.cc
tests/mpi/matrix_free_04.cc

index 26455a4aa14774609f69a3b70963ee7a65bdfad8..1b9d29450788e377d436e04b755d408018eebaa7 100644 (file)
@@ -1133,10 +1133,17 @@ namespace TrilinosWrappers
               inputleft.trilinos_sparsity_pattern().ExtractMyRowView(i, num_entries,
                                                                      indices);
               Assert (num_entries >= 0, ExcInternalError());
+#ifndef DEAL_II_USE_LARGE_INDEX_TYPE
               const size_type GID = inputleft.row_partitioner().GID(i);
               for (TrilinosWrappers::types::int_type j=0; j<num_entries; ++j)
                 sparsity_transposed.add (inputleft.col_partitioner().GID(indices[j]),
                                          GID);
+#else
+              const size_type GID = inputleft.row_partitioner().GID64(i);
+              for (TrilinosWrappers::types::int_type j=0; j<num_entries; ++j)
+                sparsity_transposed.add (inputleft.col_partitioner().GID64(indices[j]),
+                                         GID);
+#endif
             }
 
           sparsity_transposed.compress();
@@ -1148,10 +1155,17 @@ namespace TrilinosWrappers
               inputleft.trilinos_matrix().ExtractMyRowView(i, num_entries,
                                                            values, indices);
               Assert (num_entries >= 0, ExcInternalError());
+#ifndef DEAL_II_USE_LARGE_INDEX_TYPE
               const size_type GID = inputleft.row_partitioner().GID(i);
               for (TrilinosWrappers::types::int_type j=0; j<num_entries; ++j)
                 transposed_mat.set (inputleft.col_partitioner().GID(indices[j]),
                                     GID, values[j]);
+#else
+              const size_type GID = inputleft.row_partitioner().GID64(i);
+              for (TrilinosWrappers::types::int_type j=0; j<num_entries; ++j)
+                transposed_mat.set (inputleft.col_partitioner().GID64(indices[j]),
+                                    GID, values[j]);
+#endif
             }
           transposed_mat.compress();
           ML_Operator_WrapEpetraCrsMatrix
index ec1a7012aeeced148af88f79b075026f64a0de28..f5e20b6aa9d63301e9119770a34c449de416fe65 100644 (file)
@@ -208,7 +208,7 @@ void test ()
     const unsigned int   n_q_points    = quadrature_formula.size();
 
     FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
-    std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+    std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
 
     typename DoFHandler<dim>::active_cell_iterator
       cell = dof.begin_active(),

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.