]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Epetra: fix SparsityPattern::compress() with 64 bit
authorTimo Heister <timo.heister@gmail.com>
Thu, 11 Jul 2019 19:33:48 +0000 (15:33 -0400)
committerTimo Heister <timo.heister@gmail.com>
Thu, 11 Jul 2019 19:33:48 +0000 (15:33 -0400)
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.

source/lac/trilinos_sparsity_pattern.cc

index 28e0b2529fb2bc806ddbac4e5a572aa85e5674fa..968631b477f14fbac11e36cba569c4e1d742603e 100644 (file)
@@ -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());
 

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.