]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update some comments in PreconditionChebyhsev::estimate_eigenvalues 11239/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 24 Nov 2020 16:45:46 +0000 (17:45 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 24 Nov 2020 16:45:46 +0000 (17:45 +0100)
include/deal.II/lac/precondition.h

index 68fce93ae879826a0425c9b4e57f86a8fa0a5df7..cebff5da61e848691f5b3a9fc25da3dbe507a362 100644 (file)
@@ -2277,9 +2277,6 @@ PreconditionChebyshev<MatrixType, VectorType, PreconditionerType>::
   solution_old.reinit(src);
   temp_vector1.reinit(src, true);
 
-  // calculate largest eigenvalue using a hand-tuned CG iteration on the
-  // matrix weighted by its diagonal. we start with a vector that consists of
-  // ones only, weighted by the length.
   if (data.eig_cg_n_iterations > 0)
     {
       Assert(data.eig_cg_n_iterations > 2,
@@ -2303,8 +2300,9 @@ PreconditionChebyshev<MatrixType, VectorType, PreconditionerType>::
           eigenvalue_tracker.slot(eigenvalues);
         });
 
-      // set an initial guess which is close to the constant vector but where
-      // one entry is different to trigger high frequencies
+      // set an initial guess that contains some high-frequency parts (to the
+      // extent possible without knowing the discretization and the numbering)
+      // to trigger high eigenvalues according to the external function
       internal::PreconditionChebyshevImplementation::set_initial_guess(
         temp_vector1);
       data.constraints.set_zero(temp_vector1);
@@ -2362,10 +2360,10 @@ PreconditionChebyshev<MatrixType, VectorType, PreconditionerType>::
         1 + static_cast<unsigned int>(
               std::log(1. / eps + std::sqrt(1. / eps / eps - 1.)) /
               std::log(1. / sigma));
-
-      info.degree = data.degree;
     }
 
+  info.degree = data.degree;
+
   const_cast<
     PreconditionChebyshev<MatrixType, VectorType, PreconditionerType> *>(this)
     ->delta = (info.max_eigenvalue_estimate - 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.