Template Numerical Library version\ main:be918e6f
Loading...
Searching...
No Matches
TNL::Solvers::Linear::Preconditioners::Diagonal< Matrices::DistributedMatrix< Matrix > > Class Template Reference

Specialization of the diagonal preconditioner for distributed matrices. More...

#include <TNL/Solvers/Linear/Preconditioners/Diagonal.h>

Inheritance diagram for TNL::Solvers::Linear::Preconditioners::Diagonal< Matrices::DistributedMatrix< Matrix > >:
Collaboration diagram for TNL::Solvers::Linear::Preconditioners::Diagonal< Matrices::DistributedMatrix< Matrix > >:

Public Types

using DeviceType
 Device where the preconditioner will run on and auxillary data will alloacted on.
 
using DeviceType = typename MatrixType::DeviceType
 Device where the solver will run on and auxillary data will alloacted on.
 
using IndexType
 Type for indexing.
 
using IndexType = typename MatrixType::IndexType
 Type for indexing.
 
using MatrixType
 Type of the matrix representing the linear system.
 
using MatrixType = Matrices::DistributedMatrix< Matrix >
 Type of the matrix representing the linear system.
 
using RealType
 Floating point type used for computations.
 
using RealType = typename MatrixType::RealType
 Floating point type used for computations.
 
- Public Types inherited from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrix >
using ConstVectorViewType = typename Traits< Matrix >::ConstVectorViewType
 Type for constant vector view.
 
using DeviceType = typename Matrix::DeviceType
 Device where the solver will run on and auxillary data will alloacted on.
 
using IndexType = typename Matrix::IndexType
 Type for indexing.
 
using MatrixPointer = std::shared_ptr< std::add_const_t< MatrixType > >
 Type of shared pointer to the matrix.
 
using MatrixType = Matrix
 Type of the matrix representing the linear system.
 
using RealType = typename Matrix::RealType
 Floating point type used for computations.
 
using VectorViewType = typename Traits< Matrix >::VectorViewType
 Type for vector view.
 
- Public Types inherited from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrices::DistributedMatrix< Matrix > >
using ConstVectorViewType
 Type for constant vector view.
 
using DeviceType
 Device where the solver will run on and auxillary data will alloacted on.
 
using IndexType
 Type for indexing.
 
using MatrixPointer
 Type of shared pointer to the matrix.
 
using MatrixType
 Type of the matrix representing the linear system.
 
using RealType
 Floating point type used for computations.
 
using VectorViewType
 Type for vector view.
 

Public Member Functions

virtual void solve (ConstVectorViewType b, VectorViewType x) const override
 This method applies the preconditioner.
 
virtual void solve (ConstVectorViewType b, VectorViewType x) const override
 This method applies the preconditioner.
 
virtual void update (const MatrixPointer &matrixPointer) override
 This method updates the preconditioner with respect to given matrix.
 
virtual void update (const MatrixPointer &matrixPointer) override
 This method updates the preconditioner with respect to given matrix.
 
- Public Member Functions inherited from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrix >
virtual ~Preconditioner ()
 Destructor of the preconditioner.
 
virtual bool setup (const Config::ParameterContainer &parameters, const String &prefix="")
 Method for setup of the preconditioner of linear iterative solver based on configuration parameters.
 
- Public Member Functions inherited from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrices::DistributedMatrix< Matrix > >
virtual ~Preconditioner ()
 Destructor of the preconditioner.
 
virtual bool setup (const Config::ParameterContainer &parameters, const String &prefix="")
 Method for setup of the preconditioner of linear iterative solver based on configuration parameters.
 

Protected Types

using ConstLocalViewType = Containers::VectorView< std::add_const_t< RealType >, DeviceType, IndexType >
 
using LocalViewType = Containers::VectorView< RealType, DeviceType, IndexType >
 
using VectorType
 
using VectorType = Containers::Vector< RealType, DeviceType, IndexType >
 

Protected Attributes

VectorType diagonal
 
VectorType diagonal
 

Additional Inherited Members

- Static Public Member Functions inherited from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrix >
static void configSetup (Config::ConfigDescription &config, const String &prefix="")
 This method defines configuration entries for setup of the preconditioner of linear iterative solver.
 
- Static Public Member Functions inherited from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrices::DistributedMatrix< Matrix > >
static void configSetup (Config::ConfigDescription &config, const String &prefix="")
 This method defines configuration entries for setup of the preconditioner of linear iterative solver.
 

Detailed Description

template<typename Matrix>
class TNL::Solvers::Linear::Preconditioners::Diagonal< Matrices::DistributedMatrix< Matrix > >

Specialization of the diagonal preconditioner for distributed matrices.

See TNL::Solvers::Linear::Preconditioners::Diagonal

Template Parameters
Matrixis a type of matrix describing the linear system.

Member Typedef Documentation

◆ DeviceType [1/2]

Device where the preconditioner will run on and auxillary data will alloacted on.

See Devices::Host or Devices::Cuda.

◆ DeviceType [2/2]

template<typename Matrix>
using TNL::Solvers::Linear::Preconditioners::Diagonal< Matrices::DistributedMatrix< Matrix > >::DeviceType = typename MatrixType::DeviceType

Device where the solver will run on and auxillary data will alloacted on.

See Devices::Host or Devices::Cuda.

Member Function Documentation

◆ solve() [1/2]

void TNL::Solvers::Linear::Preconditioners::Diagonal< Matrix >::solve ( ConstVectorViewType b,
VectorViewType x ) const
overridevirtual

This method applies the preconditioner.

Parameters
bis the input vector the preconditioner is applied on.
xis the result of the preconditioning.

Reimplemented from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrix >.

◆ solve() [2/2]

template<typename Matrix>
void TNL::Solvers::Linear::Preconditioners::Diagonal< Matrices::DistributedMatrix< Matrix > >::solve ( ConstVectorViewType b,
VectorViewType x ) const
overridevirtual

This method applies the preconditioner.

Parameters
bis the input vector the preconditioner is applied on.
xis the result of the preconditioning.

Reimplemented from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrix >.

◆ update() [1/2]

void TNL::Solvers::Linear::Preconditioners::Diagonal< Matrix >::update ( const MatrixPointer & matrixPointer)
overridevirtual

This method updates the preconditioner with respect to given matrix.

Parameters
matrixPointersmart pointer (std::shared_ptr) to matrix the preconditioner is related to.

Reimplemented from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrix >.

◆ update() [2/2]

template<typename Matrix>
void TNL::Solvers::Linear::Preconditioners::Diagonal< Matrices::DistributedMatrix< Matrix > >::update ( const MatrixPointer & matrixPointer)
overridevirtual

This method updates the preconditioner with respect to given matrix.

Parameters
matrixPointersmart pointer (std::shared_ptr) to matrix the preconditioner is related to.

Reimplemented from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrix >.


The documentation for this class was generated from the following files: