]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Merge pull request #4458 from nfehn/master
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 23 Jun 2017 14:59:37 +0000 (16:59 +0200)
committerGitHub <noreply@github.com>
Fri, 23 Jun 2017 14:59:37 +0000 (16:59 +0200)
Initialization of Chebyshev smoother

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

index 4b39bb9ec947157e9f15677dff20c4e0ce14e278,b8d833aee451762b45976f7a830e93657ea8c618..bed1220a3e908fcbcfc57c682b4a996174cbc470
@@@ -2218,12 -2224,18 +2224,12 @@@ PreconditionChebyshev<MatrixType,Vector
          const VectorType &src) const
  {
    Threads::Mutex::ScopedLock lock(mutex);
-   if (is_initialized == false)
+   if (eigenvalues_are_initialized == false)
      estimate_eigenvalues(src);
  
 -  if (!dst.all_zero())
 -    {
 -      matrix_ptr->vmult (update2, dst);
 -      internal::PreconditionChebyshev::vector_updates
 -      (src, *data.preconditioner, false, 0., 1./theta, update1, update2, update3, dst);
 -    }
 -  else
 -    internal::PreconditionChebyshev::vector_updates
 -    (src, *data.preconditioner, true, 0., 1./theta, update1, update2, update3, dst);
 +  matrix_ptr->vmult (update2, dst);
 +  internal::PreconditionChebyshev::vector_updates
 +  (src, *data.preconditioner, false, 0., 1./theta, update1, update2, update3, dst);
  
    do_chebyshev_loop(dst, src);
  }
@@@ -2238,12 -2250,18 +2244,12 @@@ PreconditionChebyshev<MatrixType,Vector
           const VectorType &src) const
  {
    Threads::Mutex::ScopedLock lock(mutex);
-   if (is_initialized == false)
+   if (eigenvalues_are_initialized == false)
      estimate_eigenvalues(src);
  
 -  if (!dst.all_zero())
 -    {
 -      matrix_ptr->Tvmult (update2, dst);
 -      internal::PreconditionChebyshev::vector_updates
 -      (src, *data.preconditioner, false, 0., 1./theta, update1, update2, update3, dst);
 -    }
 -  else
 -    internal::PreconditionChebyshev::vector_updates
 -    (src, *data.preconditioner, true, 0., 1./theta, update1, update2, update3, dst);
 +  matrix_ptr->Tvmult (update2, dst);
 +  internal::PreconditionChebyshev::vector_updates
 +  (src, *data.preconditioner, false, 0., 1./theta, update1, update2, update3, dst);
  
    do_transpose_chebyshev_loop(dst, src);
  }

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.