]> https://gitweb.dealii.org/ - dealii.git/commitdiff
make column_values use value_type in BlockMatrixBase
authorDenis Davydov <davydden@gmail.com>
Tue, 16 Jun 2015 21:00:13 +0000 (23:00 +0200)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 17 Jun 2015 19:33:33 +0000 (14:33 -0500)
include/deal.II/lac/block_matrix_base.h

index 4115c7eb38fe8235191d5bba66c128d085d8f58d..ceab3391e69c87b3fe2330c9b91996026ab28dbf 100644 (file)
@@ -986,7 +986,7 @@ private:
      * Temporary vector for storing the local values (they need to be
      * reordered when writing local to global).
      */
-    std::vector<std::vector<double> > column_values;
+    std::vector<std::vector<value_type> > column_values;
 
     /**
      * A mutex variable used to guard access to the member variables of this
@@ -1771,9 +1771,9 @@ BlockMatrixBase<MatrixType>::set (const size_type  row,
   // comes from an element matrix).
   for (size_type j=0; j<n_cols; ++j)
     {
-      double value = values[j];
+      number value = values[j];
 
-      if (value == 0 && elide_zero_values == true)
+      if (value == number() && elide_zero_values == true)
         continue;
 
       const std::pair<unsigned int, size_type>
@@ -2018,9 +2018,9 @@ BlockMatrixBase<MatrixType>::add (const size_type  row,
   // it comes from an element matrix).
   for (size_type j=0; j<n_cols; ++j)
     {
-      double value = values[j];
+      number value = values[j];
 
-      if (value == 0 && elide_zero_values == true)
+      if (value == number() && elide_zero_values == true)
         continue;
 
       const std::pair<unsigned int, size_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.