From: turcksin Date: Fri, 31 May 2013 15:59:41 +0000 (+0000) Subject: Fix a bug in trilinos_vector_base. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53f4db31fa05554111f7895f86efcd946b43b977;p=dealii-svn.git Fix a bug in trilinos_vector_base. git-svn-id: https://svn.dealii.org/branches/branch_bigger_global_dof_indices_4@29686 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/trilinos_vector_base.h b/deal.II/include/deal.II/lac/trilinos_vector_base.h index bc86d11a9a..69a0457bc8 100644 --- a/deal.II/include/deal.II/lac/trilinos_vector_base.h +++ b/deal.II/include/deal.II/lac/trilinos_vector_base.h @@ -1256,13 +1256,17 @@ namespace TrilinosWrappers // easy case: local range is contiguous if (vector->Map().LinearMap()) { - const std::pair x = local_range(); + const std::pair 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(); }