]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix more Trilinos-related clang-tidy complains 7538/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 19 Dec 2018 09:30:20 +0000 (10:30 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 19 Dec 2018 09:44:17 +0000 (10:44 +0100)
include/deal.II/base/index_set.h
include/deal.II/lac/trilinos_sparsity_pattern.h
include/deal.II/lac/trilinos_vector.h
source/base/index_set.cc

index 7246e0bfa26dca459ba6b6429002a37338b5b815..1e2a9d3dbc7be17432b1fc6758b9ea3a3fc709b8 100644 (file)
@@ -137,9 +137,9 @@ public:
 
 #ifdef DEAL_II_WITH_TRILINOS
   /**
-   * Constructor from a trilinos Epetra_Map.
+   * Constructor from a Trilinos Epetra_BlockMap.
    */
-  explicit IndexSet(const Epetra_Map &map);
+  explicit IndexSet(const Epetra_BlockMap &map);
 #endif
 
   /**
index dbb039ad1785e5a9ab5783f5fdc5193504f3c8f8..d0a985941020df75b7f1985c30521abb76a3f608 100644 (file)
@@ -1551,7 +1551,7 @@ namespace TrilinosWrappers
   inline IndexSet
   SparsityPattern::locally_owned_domain_indices() const
   {
-    return IndexSet(static_cast<const Epetra_Map &>(graph->DomainMap()));
+    return IndexSet(graph->DomainMap());
   }
 
 
@@ -1559,7 +1559,7 @@ namespace TrilinosWrappers
   inline IndexSet
   SparsityPattern::locally_owned_range_indices() const
   {
-    return IndexSet(static_cast<const Epetra_Map &>(graph->RangeMap()));
+    return IndexSet(graph->RangeMap());
   }
 
 #    endif // DOXYGEN
index 45f6c796d20e7581ea00fd554eb0ed6a1d681e10..79226b9f31402ebf6ccce71191fe7192b647ee80 100644 (file)
@@ -2137,7 +2137,8 @@ namespace TrilinosWrappers
     inline const Epetra_Map &
     Vector::vector_partitioner() const
     {
-      return static_cast<const Epetra_Map &>(vector->Map());
+      // TODO A dynamic_cast fails here. This is suspicious.
+      return static_cast<const Epetra_Map &>(vector->Map()); // NOLINT
     }
 
 
index 5a491e5f7aa60dff4ef971755ffaeb5bcbdda8cd..6b3174dc9bb50dab7b3ebe902579853c04e5dc63 100644 (file)
@@ -38,14 +38,15 @@ DEAL_II_NAMESPACE_OPEN
 
 #  ifdef DEAL_II_WITH_64BIT_INDICES
 
-IndexSet::IndexSet(const Epetra_Map &map)
+IndexSet::IndexSet(const Epetra_BlockMap &map)
   : is_compressed(true)
   , index_space_size(1 + map.MaxAllGID64())
   , largest_range(numbers::invalid_unsigned_int)
 {
   Assert(map.MinAllGID64() == 0,
-         ExcMessage("The Epetra_Map does not contain the global index 0, which "
-                    "means some entries are not present on any processor."));
+         ExcMessage(
+           "The Epetra_BlockMap does not contain the global index 0, "
+           "which means some entries are not present on any processor."));
 
   // For a contiguous map, we do not need to go through the whole data...
   if (map.LinearMap())
@@ -64,14 +65,15 @@ IndexSet::IndexSet(const Epetra_Map &map)
 
 // this is the standard 32-bit implementation
 
-IndexSet::IndexSet(const Epetra_Map &map)
+IndexSet::IndexSet(const Epetra_BlockMap &map)
   : is_compressed(true)
   , index_space_size(1 + map.MaxAllGID())
   , largest_range(numbers::invalid_unsigned_int)
 {
   Assert(map.MinAllGID() == 0,
-         ExcMessage("The Epetra_Map does not contain the global index 0, which "
-                    "means some entries are not present on any processor."));
+         ExcMessage(
+           "The Epetra_BlockMap does not contain the global index 0, "
+           "which means some entries are not present on any processor."));
 
   // For a contiguous map, we do not need to go through the whole data...
   if (map.LinearMap())

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.