]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Prefer logical OR to boolean OR.
authorDavid Wells <wellsd2@rpi.edu>
Tue, 3 Jan 2017 17:44:06 +0000 (12:44 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Thu, 5 Jan 2017 03:08:30 +0000 (22:08 -0500)
This was caught by cppcheck.

include/deal.II/lac/solver_cg.h
include/deal.II/lac/solver_gmres.h

index e64e31e569df1258165c8819b91153606cacdfdf..56aa07b154c769c388cb51d99902699ff14fd972 100644 (file)
@@ -449,12 +449,12 @@ SolverCG<VectorType>::solve (const MatrixType         &A,
   // Should we build the matrix for
   // eigenvalue computations?
   const bool do_eigenvalues = !condition_number_signal.empty()
-                              |!all_condition_numbers_signal.empty()
-                              |!eigenvalues_signal.empty()
-                              |!all_eigenvalues_signal.empty()
-                              | additional_data.compute_condition_number
-                              | additional_data.compute_all_condition_numbers
-                              | additional_data.compute_eigenvalues;
+                              ||!all_condition_numbers_signal.empty()
+                              ||!eigenvalues_signal.empty()
+                              ||!all_eigenvalues_signal.empty()
+                              || additional_data.compute_condition_number
+                              || additional_data.compute_all_condition_numbers
+                              || additional_data.compute_eigenvalues;
 
   // vectors used for eigenvalue
   // computations
index aa265d533eb7b401257bfd026120d9b2c5721688..8e65cd25c4dd32d87a8c5b1d4955f657a8dc6a1b 100644 (file)
@@ -833,12 +833,12 @@ SolverGMRES<VectorType>::solve (const MatrixType         &A,
 
   const bool do_eigenvalues=
     !condition_number_signal.empty()
-    |!all_condition_numbers_signal.empty()
-    |!eigenvalues_signal.empty()
-    |!all_eigenvalues_signal.empty()
-    |!hessenberg_signal.empty()
-    |!all_hessenberg_signal.empty()
-    |additional_data.compute_eigenvalues;
+    ||!all_condition_numbers_signal.empty()
+    ||!eigenvalues_signal.empty()
+    ||!all_eigenvalues_signal.empty()
+    ||!hessenberg_signal.empty()
+    ||!all_hessenberg_signal.empty()
+    ||additional_data.compute_eigenvalues;
   // for eigenvalue computation, need to collect the Hessenberg matrix (before
   // applying Givens rotations)
   FullMatrix<double> H_orig;

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.