]> https://gitweb.dealii.org/ - dealii.git/commitdiff
modify check of non-zero diagonal element in PETScWrappers::apply_boundary_values...
authorDenis Davydov <davydden@gmail.com>
Tue, 16 Jun 2015 21:16:37 +0000 (23:16 +0200)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 17 Jun 2015 19:33:34 +0000 (14:33 -0500)
source/numerics/matrix_tools.cc

index 3f38c170fc46540e1cef6021c84e40abd57a469e..8a385ed620e97f1b06e889d6fe8378d9662d930f 100644 (file)
@@ -2351,9 +2351,9 @@ namespace MatrixTools
             // find such an entry, take one
             PetscScalar average_nonzero_diagonal_entry = 1;
             for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
-              if (matrix.diag_element(i) != 0)
+              if (matrix.diag_element(i) != PetscScalar ())
                 {
-                  average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i));
+                  average_nonzero_diagonal_entry = std::abs(matrix.diag_element(i));
                   break;
                 }
 

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.