From: Daniel Arndt Date: Wed, 19 Dec 2018 09:30:20 +0000 (+0100) Subject: Fix more Trilinos-related clang-tidy complains X-Git-Tag: v9.1.0-rc1~481^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3619933dc6a3159ffff1846f01dd823f4019225;p=dealii.git Fix more Trilinos-related clang-tidy complains --- diff --git a/include/deal.II/base/index_set.h b/include/deal.II/base/index_set.h index 7246e0bfa2..1e2a9d3dbc 100644 --- a/include/deal.II/base/index_set.h +++ b/include/deal.II/base/index_set.h @@ -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 /** diff --git a/include/deal.II/lac/trilinos_sparsity_pattern.h b/include/deal.II/lac/trilinos_sparsity_pattern.h index dbb039ad17..d0a9859410 100644 --- a/include/deal.II/lac/trilinos_sparsity_pattern.h +++ b/include/deal.II/lac/trilinos_sparsity_pattern.h @@ -1551,7 +1551,7 @@ namespace TrilinosWrappers inline IndexSet SparsityPattern::locally_owned_domain_indices() const { - return IndexSet(static_cast(graph->DomainMap())); + return IndexSet(graph->DomainMap()); } @@ -1559,7 +1559,7 @@ namespace TrilinosWrappers inline IndexSet SparsityPattern::locally_owned_range_indices() const { - return IndexSet(static_cast(graph->RangeMap())); + return IndexSet(graph->RangeMap()); } # endif // DOXYGEN diff --git a/include/deal.II/lac/trilinos_vector.h b/include/deal.II/lac/trilinos_vector.h index 45f6c796d2..79226b9f31 100644 --- a/include/deal.II/lac/trilinos_vector.h +++ b/include/deal.II/lac/trilinos_vector.h @@ -2137,7 +2137,8 @@ namespace TrilinosWrappers inline const Epetra_Map & Vector::vector_partitioner() const { - return static_cast(vector->Map()); + // TODO A dynamic_cast fails here. This is suspicious. + return static_cast(vector->Map()); // NOLINT } diff --git a/source/base/index_set.cc b/source/base/index_set.cc index 5a491e5f7a..6b3174dc9b 100644 --- a/source/base/index_set.cc +++ b/source/base/index_set.cc @@ -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())