Template Numerical Library version\ main:481315e2
|
Specialization of the diagonal preconditioner for distributed matrices. More...
#include <TNL/Solvers/Linear/Preconditioners/Diagonal.h>
Public Types | |
using | DeviceType = typename MatrixType::DeviceType |
Device where the solver will run on and auxillary data will alloacted on. | |
using | IndexType = typename MatrixType::IndexType |
Type for indexing. | |
using | MatrixType = Matrices::DistributedMatrix< Matrix > |
Type of the matrix representing the linear system. | |
using | RealType = typename MatrixType::RealType |
Floating point type used for computations. | |
![]() | |
using | ConstVectorViewType = typename Traits< Matrices::DistributedMatrix< 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 = Matrices::DistributedMatrix< Matrix > |
Type of the matrix representing the linear system. | |
using | RealType = typename Matrix::RealType |
Floating point type used for computations. | |
using | VectorViewType = typename Traits< Matrices::DistributedMatrix< Matrix > >::VectorViewType |
Type for vector view. | |
Public Member Functions | |
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 | ~Preconditioner () |
Destructor of the preconditioner. | |
virtual bool | setup (const Config::ParameterContainer ¶meters, const String &prefix="") |
Method for setup of the preconditioner of linear iterative solver based on configuration parameters. | |
virtual void | solve (ConstVectorViewType b, VectorViewType x) const |
This method applies the preconditioner. | |
Protected Types | |
using | ConstLocalViewType = Containers::VectorView< std::add_const_t< RealType >, DeviceType, IndexType > |
using | LocalViewType = Containers::VectorView< RealType, DeviceType, IndexType > |
using | VectorType = Containers::Vector< RealType, DeviceType, IndexType > |
Protected Attributes | |
VectorType | diagonal |
Additional Inherited Members | |
![]() | |
static void | configSetup (Config::ConfigDescription &config, const String &prefix="") |
This method defines configuration entries for setup of the preconditioner of linear iterative solver. | |
Specialization of the diagonal preconditioner for distributed matrices.
See TNL::Solvers::Linear::Preconditioners::Diagonal
Matrix | is a type of matrix describing the linear system. |
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.
|
overridevirtual |
This method applies the preconditioner.
b | is the input vector the preconditioner is applied on. |
x | is the result of the preconditioning. |
|
overridevirtual |
This method updates the preconditioner with respect to given matrix.
matrixPointer | smart pointer (std::shared_ptr) to matrix the preconditioner is related to. |
Reimplemented from TNL::Solvers::Linear::Preconditioners::Preconditioner< Matrices::DistributedMatrix< Matrix > >.