]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Another minor fix.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 28 May 2013 12:05:12 +0000 (12:05 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 28 May 2013 12:05:12 +0000 (12:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@29656 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/precondition.h

index c0c2cf9ac74c779b1e1fd8c15d2343dca50b4f72..6f78cf440bfd629bf870353fdb9f3e90526ffe37 100644 (file)
@@ -1822,9 +1822,9 @@ PreconditionChebyshev<MATRIX,VECTOR>::initialize (const MATRIX &matrix,
       min_eigenvalue = data.max_eigenvalue/data.smoothing_range;
     }
 
-  const double alpha = (data.smoothing_range > 0 ?
+  const double alpha = (data.smoothing_range > 1. ?
                         max_eigenvalue / data.smoothing_range :
-                        max_eigenvalue / min_eigenvalue);
+                        std::min(0.9*max_eigenvalue, min_eigenvalue));
   delta = (max_eigenvalue-alpha)*0.5;
   theta = (max_eigenvalue+alpha)*0.5;
 

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.