From: Timo Heister Date: Thu, 11 Jul 2019 19:33:48 +0000 (-0400) Subject: Epetra: fix SparsityPattern::compress() with 64 bit X-Git-Tag: v9.2.0-rc1~1383^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=469c933a580e904a301c8a1a0e82d0deefa4bb47;p=dealii.git Epetra: fix SparsityPattern::compress() with 64 bit NumGlobalElements is only available if the Epetra map was created with a 32 bit int for the dimension, which is not true if we compile with 64 bit enabled. Fix this using the helper functions we already have. --- diff --git a/source/lac/trilinos_sparsity_pattern.cc b/source/lac/trilinos_sparsity_pattern.cc index 28e0b2529f..968631b477 100644 --- a/source/lac/trilinos_sparsity_pattern.cc +++ b/source/lac/trilinos_sparsity_pattern.cc @@ -792,7 +792,7 @@ namespace TrilinosWrappers { if (nonlocal_graph->IndicesAreGlobal() == false && nonlocal_graph->RowMap().NumMyElements() > 0 && - column_space_map->NumGlobalElements() > 0) + n_global_elements(*column_space_map) > 0) { // Insert dummy element at (row, column) that corresponds to row 0 // in local index counting. @@ -814,7 +814,7 @@ namespace TrilinosWrappers AssertThrow(ierr == 0, ExcTrilinosError(ierr)); } Assert(nonlocal_graph->RowMap().NumMyElements() == 0 || - column_space_map->NumGlobalElements() == 0 || + n_global_elements(*column_space_map) == 0 || nonlocal_graph->IndicesAreGlobal() == true, ExcInternalError());