DFT-EFE
 
Loading...
Searching...
No Matches
dftefe::linearAlgebra::JacobiPreconditioner< ValueType, memorySpace > Class Template Reference

A class to encapsulate the Jacobi preconditioner in a linear or non-linear solve. More...

#include <JacobiPreconditioner.h>

Inheritance diagram for dftefe::linearAlgebra::JacobiPreconditioner< ValueType, memorySpace >:
Collaboration diagram for dftefe::linearAlgebra::JacobiPreconditioner< ValueType, memorySpace >:

Public Member Functions

 JacobiPreconditioner (const Vector< ValueType, memorySpace > &diagVector)
 
 ~JacobiPreconditioner ()=default
 Default destructor. More...
 
void apply (Vector< ValueType, memorySpace > &x) const override
 In-place apply the preconditioner on a given Vector (i.e., the input vector is modified to store the output) More...
 
Vector< ValueType, memorySpace > apply (const Vector< ValueType, memorySpace > &x) const override
 Apply the preconditioner on a given vector and return the output vector. More...
 
- Public Member Functions inherited from dftefe::linearAlgebra::Preconditioner< ValueType, memorySpace >
 ~Preconditioner ()=default
 Default Destructor. More...
 
virtual void apply (MultiVector< memorySpace, memorySpace > &X, MultiVector< ValueTypeUnion, memorySpace > &Y) const=0
 
virtual PreconditionerType getPreconditionerType () const=0
 
- Public Member Functions inherited from dftefe::linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >
 ~OperatorContext ()=default
 Default Destructor. More...
 
virtual void apply (MultiVector< ValueTypeOperand, memorySpace > &X, MultiVector< ValueTypeUnion, memorySpace > &Y) const =0
 

Private Attributes

Vector< ValueType, memorySpace > d_invDiagVector
 

Additional Inherited Members

- Public Types inherited from dftefe::linearAlgebra::Preconditioner< ValueType, memorySpace >
using ValueTypeUnion = blasLapack::scalar_type< ValueType, memorySpace >
 
- Public Types inherited from dftefe::linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >
using ValueTypeUnion = blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand >
 

Detailed Description

template<typename ValueType, utils::MemorySpace memorySpace>
class dftefe::linearAlgebra::JacobiPreconditioner< ValueType, memorySpace >

A class to encapsulate the Jacobi preconditioner in a linear or non-linear solve.

Template Parameters
ValueTypedatatype (float, double, complex<float>, complex<double>, etc) of the underlying matrix and vector
memorySpacedefines the MemorySpace (i.e., HOST or DEVICE) in which the underlying matrix and vector must reside.

Constructor & Destructor Documentation

◆ JacobiPreconditioner()

template<typename ValueType , utils::MemorySpace memorySpace>
dftefe::linearAlgebra::JacobiPreconditioner< ValueType, memorySpace >::JacobiPreconditioner ( const Vector< ValueType, memorySpace > &  diagVector)

◆ ~JacobiPreconditioner()

template<typename ValueType , utils::MemorySpace memorySpace>
dftefe::linearAlgebra::JacobiPreconditioner< ValueType, memorySpace >::~JacobiPreconditioner ( )
default

Default destructor.

Member Function Documentation

◆ apply() [1/2]

template<typename ValueType , utils::MemorySpace memorySpace>
Vector< ValueType, memorySpace > dftefe::linearAlgebra::JacobiPreconditioner< ValueType, memorySpace >::apply ( const Vector< ValueType, memorySpace > &  x) const
override

Apply the preconditioner on a given vector and return the output vector.

Parameters
[in]xthe given input vector
Returns
the vector resulting from the application of the preconditioner on the input vector x

◆ apply() [2/2]

template<typename ValueType , utils::MemorySpace memorySpace>
void dftefe::linearAlgebra::JacobiPreconditioner< ValueType, memorySpace >::apply ( Vector< ValueType, memorySpace > &  x) const
override

In-place apply the preconditioner on a given Vector (i.e., the input vector is modified to store the output)

Parameters
[in]xthe given input vector
[out]xthe input vector is modified in-place to store the output

Member Data Documentation

◆ d_invDiagVector

template<typename ValueType , utils::MemorySpace memorySpace>
Vector<ValueType, memorySpace> dftefe::linearAlgebra::JacobiPreconditioner< ValueType, memorySpace >::d_invDiagVector
private

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