Commit 43ff2512 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Writtin documentation for TFQMR method.

parent 1ef9febf
Loading
Loading
Loading
Loading
+54 −16
Original line number Diff line number Diff line
@@ -10,24 +10,62 @@

#pragma once

#include "LinearSolver.h"
#include <TNL/Solvers/Linear/LinearSolver.h>

namespace TNL {
   namespace Solvers {
      namespace Linear {

/**
 * \brief Iterative solver of linear systems based on the Transpose-free quasi-minimal residual (TFQMR) method.
 *
 * See (Wikipedia)[https://second.wiki/wiki/algoritmo_tfqmr] for more details.
 *
 * \tparam Matrix is type of matrix describing the linear system.
 */
template< typename Matrix >
class TFQMR
: public LinearSolver< Matrix >
{
   using Base = LinearSolver< Matrix >;

   public:

      /**
       * \brief Floating point type used for computations.
       */
      using RealType = typename Base::RealType;

      /**
       * \brief Device where the solver will run on and auxillary data will alloacted on.
       */
      using DeviceType = typename Base::DeviceType;

      /**
       * \brief Type for indexing.
       */
      using IndexType = typename Base::IndexType;

      /**
       * \brief Type for vector view.
       */
      using VectorViewType = typename Base::VectorViewType;

      /**
       * \brief Type for constant vector view.
       */
      using ConstVectorViewType = typename Base::ConstVectorViewType;

      /**
       * \brief Method for solving of a linear system.
       *
       * See \ref LinearSolver::solve for more details.
       *
       * \param b vector with the right-hand side of the linear system.
       * \param x vector for the solution of the linear system.
       * \return true if the solver converged.
       * \return false if the solver did not converge.
       */
      bool solve( ConstVectorViewType b, VectorViewType x ) override;

   protected:
@@ -40,4 +78,4 @@ protected:
   } // namespace Solvers
} // namespace TNL

#include "TFQMR.hpp"
#include <TNL/Solvers/Linear/TFQMR.hpp>