From 449d8097cf969fc8558fd3a209c5c0f06eb7ed4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Oberhuber?= <oberhuber.tomas@gmail.com> Date: Thu, 30 Dec 2021 16:16:24 +0100 Subject: [PATCH] Small fixes in documentation of lineat solvers. --- .../Solvers/Linear/tutorial_Linear_solvers.md | 2 +- src/TNL/Solvers/Linear/BICGStabL.h | 23 +------------------ .../Solvers/Linear/Preconditioners/Diagonal.h | 13 +++++------ src/TNL/Solvers/Linear/Preconditioners/ILU0.h | 4 ++-- src/TNL/Solvers/Linear/Preconditioners/ILUT.h | 4 ++-- .../Linear/Preconditioners/Preconditioner.h | 4 ++-- 6 files changed, 14 insertions(+), 36 deletions(-) diff --git a/Documentation/Tutorials/Solvers/Linear/tutorial_Linear_solvers.md b/Documentation/Tutorials/Solvers/Linear/tutorial_Linear_solvers.md index 0c2723aeeb..b79dbbe1b7 100644 --- a/Documentation/Tutorials/Solvers/Linear/tutorial_Linear_solvers.md +++ b/Documentation/Tutorials/Solvers/Linear/tutorial_Linear_solvers.md @@ -8,7 +8,7 @@ Solvers of linear systems are one of the most important algorithms in scientific 1. Stationary methods 1. [Jacobi method](https://en.wikipedia.org/wiki/Jacobi_method) (\ref TNL::Solvers::Linear::Jacobi) - 2. [Successive-overrelaxation method, SOR]([https://en.wikipedia.org/wiki/Successive_over-relaxation]) (\ref TNL::Solvers::Linear::SOR) - CPU only currently + 2. [Successive-overrelaxation method, SOR]([https://en.wikipedia.org/wiki/Successive_over-relaxation]) (\ref TNL::Solvers::Linear::SOR) 2. Krylov subspace methods 1. [Conjugate gradient method, CG](https://en.wikipedia.org/wiki/Conjugate_gradient_method) (\ref TNL::Solvers::Linear::CG) 2. [Biconjugate gradient stabilized method, BICGStab](https://en.wikipedia.org/wiki/Biconjugate_gradient_stabilized_method) (\ref TNL::Solvers::Linear::BICGStab) diff --git a/src/TNL/Solvers/Linear/BICGStabL.h b/src/TNL/Solvers/Linear/BICGStabL.h index 1814ac3148..44f4f2264f 100644 --- a/src/TNL/Solvers/Linear/BICGStabL.h +++ b/src/TNL/Solvers/Linear/BICGStabL.h @@ -9,27 +9,6 @@ /* See Copyright Notice in tnl/Copyright */ /* - * BICGStabL implements an iterative solver for non-symmetric linear systems, - * using the BiCGstab(l) algorithm described in [1] and [2]. It is a - * generalization of the stabilized biconjugate-gradient (BiCGstab) algorithm - * proposed by van der Vorst [3]. BiCGstab(1) is equivalent to BiCGstab, and - * BiCGstab(2) is a slightly more efficient version of the BiCGstab2 algorithm - * by Gutknecht [4], while BiCGstab(l>2) is a further generalization. - * - * This code was implemented by: Jakub Klinkovsky <klinkjak@fjfi.cvut.cz> - * - * [1] Gerard L. G. Sleijpen and Diederik R. Fokkema, "BiCGstab(l) for linear - * equations involving unsymmetric matrices with complex spectrum", - * Electronic Trans. on Numerical Analysis 1, 11-32 (1993). - * [2] Gerard L. G. Sleijpen, Henk A. van der Vorst, and Diederik R. Fokkema, - * "BiCGstab(l) and other Hybrid Bi-CG Methods", Numerical Algorithms 7, - * 75-109 (1994). - * [3] Henk A. van der Vorst, "Bi-CGSTAB: A fast and smoothly converging variant - * of Bi-CG for the solution of nonsymmetric linear systems, SIAM Journal on - * scientific and Statistical Computing 13.2, 631-644 (1992). - * [4] Martin H. Gutknecht, "Variants of BiCGStab for matrices with complex - * spectrum", IPS Research Report No. 91-14 (1991). - * * TODO: further variations to explore: * * [5] Gerard L. G. Sleijpen and Henk A. van der Vorst, "Reliable updated @@ -119,7 +98,7 @@ class BICGStabL * defines the following: * * \e bicgstab-ell - number of Bi-CG iterations before the MR part starts. - * + * * \e bicgstab-exact-residue - says whether the BiCGstab should compute the exact residue in * each step (true) or to use a cheap approximation (false). * diff --git a/src/TNL/Solvers/Linear/Preconditioners/Diagonal.h b/src/TNL/Solvers/Linear/Preconditioners/Diagonal.h index 2e27624067..a8775ca5f0 100644 --- a/src/TNL/Solvers/Linear/Preconditioners/Diagonal.h +++ b/src/TNL/Solvers/Linear/Preconditioners/Diagonal.h @@ -14,6 +14,7 @@ #include "Preconditioner.h" + namespace TNL { namespace Solvers { namespace Linear { @@ -72,14 +73,14 @@ class Diagonal using typename Preconditioner< Matrix >::MatrixPointer; /** - * \brief This methods update the preconditione with respect to given matrix. + * \brief This method updates the preconditioner with respect to given matrix. * * \param matrixPointer smart pointer (\ref std::shared_ptr) to matrix the preconditioner is related to. */ virtual void update( const MatrixPointer& matrixPointer ) override; /** - * \brief This methods applies the preconditioner. + * \brief This method applies the preconditioner. * * \param b is the input vector the preconditioner is applied on. * \param x is the result of the preconditioning. @@ -139,21 +140,19 @@ class Diagonal< Matrices::DistributedMatrix< Matrix > > using typename Preconditioner< MatrixType >::ConstVectorViewType; /** - * \brief This methods update the preconditione with respect to given matrix. - * - * \param matrixPointer smart pointer (\ref std::shared_ptr) to matrix the preconditioner is related to. + * \brief Type of shared pointer to the matrix. */ using typename Preconditioner< MatrixType >::MatrixPointer; /** - * \brief This methods update the preconditione with respect to given matrix. + * \brief This method updates the preconditioner with respect to given matrix. * * \param matrixPointer smart pointer (\ref std::shared_ptr) to matrix the preconditioner is related to. */ virtual void update( const MatrixPointer& matrixPointer ) override; /** - * \brief This methods applies the preconditioner. + * \brief This method applies the preconditioner. * * \param b is the input vector the preconditioner is applied on. * \param x is the result of the preconditioning. diff --git a/src/TNL/Solvers/Linear/Preconditioners/ILU0.h b/src/TNL/Solvers/Linear/Preconditioners/ILU0.h index d38357c0e9..a6d128c394 100644 --- a/src/TNL/Solvers/Linear/Preconditioners/ILU0.h +++ b/src/TNL/Solvers/Linear/Preconditioners/ILU0.h @@ -110,14 +110,14 @@ class ILU0_impl< Matrix, Real, Devices::Host, Index > using typename Preconditioner< Matrix >::MatrixPointer; /** - * \brief This methods update the preconditione with respect to given matrix. + * \brief This method updates the preconditioner with respect to given matrix. * * \param matrixPointer smart pointer (\ref std::shared_ptr) to matrix the preconditioner is related to. */ virtual void update( const MatrixPointer& matrixPointer ) override; /** - * \brief This methods applies the preconditioner. + * \brief This method applies the preconditioner. * * \param b is the input vector the preconditioner is applied on. * \param x is the result of the preconditioning. diff --git a/src/TNL/Solvers/Linear/Preconditioners/ILUT.h b/src/TNL/Solvers/Linear/Preconditioners/ILUT.h index f206003892..5e09147f98 100644 --- a/src/TNL/Solvers/Linear/Preconditioners/ILUT.h +++ b/src/TNL/Solvers/Linear/Preconditioners/ILUT.h @@ -87,14 +87,14 @@ class ILUT } /** - * \brief This methods update the preconditione with respect to given matrix. + * \brief This method updates the preconditioner with respect to given matrix. * * \param matrixPointer smart pointer (\ref std::shared_ptr) to matrix the preconditioner is related to. */ using Base::update; /** - * \brief This methods applies the preconditioner. + * \brief This method applies the preconditioner. * * \param b is the input vector the preconditioner is applied on. * \param x is the result of the preconditioning. diff --git a/src/TNL/Solvers/Linear/Preconditioners/Preconditioner.h b/src/TNL/Solvers/Linear/Preconditioners/Preconditioner.h index e0dc721e36..4357dcf63e 100644 --- a/src/TNL/Solvers/Linear/Preconditioners/Preconditioner.h +++ b/src/TNL/Solvers/Linear/Preconditioners/Preconditioner.h @@ -101,7 +101,7 @@ class Preconditioner } /** - * \brief This methods update the preconditione with respect to given matrix. + * \brief This method updates the preconditioner with respect to given matrix. * * \param matrixPointer smart pointer (\ref std::shared_ptr) to matrix the preconditioner is related to. */ @@ -109,7 +109,7 @@ class Preconditioner {} /** - * \brief This methods applies the preconditioner. + * \brief This method applies the preconditioner. * * \param b is the input vector the preconditioner is applied on. * \param x is the result of the preconditioning. -- GitLab