]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a bug in trilinos_vector_base.
authorBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 31 May 2013 15:59:41 +0000 (15:59 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 31 May 2013 15:59:41 +0000 (15:59 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29686 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/trilinos_vector_base.h

index bc86d11a9ab2ff22dc3bc82df2d10524ee503d48..69a0457bc8f86fec2d302bebe26d5eea725a0389 100644 (file)
@@ -1256,13 +1256,17 @@ namespace TrilinosWrappers
     // easy case: local range is contiguous
     if (vector->Map().LinearMap())
       {
-        const std::pair<unsigned int, unsigned int> x = local_range();
+        const std::pair<size_type, size_type> x = local_range();
         is.add_range (x.first, x.second);
       }
     else if (vector->Map().NumMyElements() > 0)
       {
-        const unsigned int n_indices = vector->Map().NumMyElements();
+        const size_type n_indices = vector->Map().NumMyElements();
+#ifndef DEAL_II_USE_LARGE_INDEX_TYPE
         unsigned int * vector_indices = (unsigned int*)vector->Map().MyGlobalElements();
+#else
+        size_type * vector_indices = (size_type*)vector->Map().MyGlobalElements64();
+#endif
         is.add_indices(vector_indices, vector_indices+n_indices);
         is.compress();
       }

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.