]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use a VectorType instead of unsigned int in LaplaceOperator::local_diagonal_cell
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 25 Aug 2018 19:57:21 +0000 (21:57 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 26 Aug 2018 10:48:59 +0000 (12:48 +0200)
include/deal.II/matrix_free/operators.h

index 72fc4121d3fc69fea82b4ac8710573de64d1690b..80a680208e41ae01d40188f51d1a904421b052bf 100644 (file)
@@ -890,7 +890,7 @@ namespace MatrixFreeOperators
     local_diagonal_cell(
       const MatrixFree<dim, value_type> &data,
       VectorType &                       dst,
-      const unsigned int &,
+      const VectorType &,
       const std::pair<unsigned int, unsigned int> &cell_range) const;
 
     /**
@@ -1894,7 +1894,6 @@ namespace MatrixFreeOperators
     using Number = typename Base<dim, VectorType>::value_type;
     Assert((Base<dim, VectorType>::data.get() != nullptr), ExcNotInitialized());
 
-    unsigned int dummy = 0;
     this->inverse_diagonal_entries.reset(new DiagonalMatrix<VectorType>());
     this->diagonal_entries.reset(new DiagonalMatrix<VectorType>());
     VectorType &inverse_diagonal_vector =
@@ -1906,7 +1905,7 @@ namespace MatrixFreeOperators
     this->data->cell_loop(&LaplaceOperator::local_diagonal_cell,
                           this,
                           diagonal_vector,
-                          dummy);
+                          /*unused*/ diagonal_vector);
     this->set_constrained_entries_to_one(diagonal_vector);
 
     inverse_diagonal_vector = diagonal_vector;
@@ -2032,7 +2031,7 @@ namespace MatrixFreeOperators
     local_diagonal_cell(
       const MatrixFree<dim, typename Base<dim, VectorType>::value_type> &data,
       VectorType &                                                       dst,
-      const unsigned int &,
+      const VectorType &,
       const std::pair<unsigned int, unsigned int> &cell_range) const
   {
     using Number = typename Base<dim, VectorType>::value_type;

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.