FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ > Class Template Referenceabstract

Provisional Legacy Preconditioners Wrapper class template. More...

#include <precon_wrapper.hpp>

Inheritance diagram for FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ >:
FEAT::Solver::SolverBase< Matrix_::VectorTypeR >

Public Types

typedef Matrix_ MatrixType
 
typedef MatrixType::VectorTypeR VectorType
 

Public Member Functions

template<typename... Args_>
 PreconWrapper (const Filter_ &filter, Args_ &&... args)
 Constructor. More...
 
virtual Status apply (Matrix_::VectorTypeR &vec_cor, const Matrix_::VectorTypeR &vec_def)=0
 Solver application method. More...
 
virtual Status apply (VectorType &vec_cor, const VectorType &vec_def) override
 Applies the preconditioner. More...
 
virtual void done ()
 Finalization method. More...
 
virtual void done_numeric ()
 Numeric finalization method. More...
 
virtual void done_symbolic ()
 Symbolic finalization method. More...
 
virtual void init ()
 Initialization method. More...
 
virtual void init_numeric ()
 Numeric initialization method. More...
 
virtual void init_symbolic ()
 Symbolic initialization method. More...
 
virtual String name () const override
 Returns the name of the solver. More...
 

Protected Attributes

const Filter_ & _filter
 the filter object More...
 
Precon_< MatrixType, VectorType > _precond
 the actual preconditioner object More...
 

Detailed Description

template<typename Matrix_, typename Filter_, template< typename, typename > class Precon_>
class FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ >

Provisional Legacy Preconditioners Wrapper class template.

This class template acts as a wrapper around the preconditioners implemented in the lafem/preconditioner.hpp header file.

Template Parameters
Matrix_The matrix class; is passed as the first parameter to the preconditioner class template.
Precond_The preconditioner class template.

Example:
To use the ILUPreconditioner class for CSR-matrices, one would have to use the following class template combination: PreconWrapper<SparseMatrixCSR<double>, ILUPreconditioner>.

Author
Peter Zajac

Definition at line 39 of file precon_wrapper.hpp.

Member Typedef Documentation

◆ MatrixType

template<typename Matrix_ , typename Filter_ , template< typename, typename > class Precon_>
typedef Matrix_ FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ >::MatrixType

Definition at line 43 of file precon_wrapper.hpp.

◆ VectorType

template<typename Matrix_ , typename Filter_ , template< typename, typename > class Precon_>
typedef MatrixType::VectorTypeR FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ >::VectorType

Definition at line 44 of file precon_wrapper.hpp.

Constructor & Destructor Documentation

◆ PreconWrapper()

template<typename Matrix_ , typename Filter_ , template< typename, typename > class Precon_>
template<typename... Args_>
FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ >::PreconWrapper ( const Filter_ &  filter,
Args_ &&...  args 
)
inlineexplicit

Constructor.

Parameters
[in]argsThe arguments which are passed to the preconditioner object constructor. For the required set of arguments, see the documentation of the corresponding preconditioner class template.

Definition at line 62 of file precon_wrapper.hpp.

Member Function Documentation

◆ apply() [1/2]

virtual Status FEAT::Solver::SolverBase< Matrix_::VectorTypeR >::apply ( Matrix_::VectorTypeR &  vec_cor,
const Matrix_::VectorTypeR &  vec_def 
)
pure virtualinherited

Solver application method.

This method applies the solver represented by this object onto a given defect vector and returns the corresponding correction vector.

Note
Solvers which derive from the IterativeSolver base class also provide a correct() method which corrects an initial solution instead of starting with the null vector.
Parameters
[out]vec_corThe vector that shall receive the solution of the linear system. It is assumed to be allocated, but its numerical contents may be undefined upon calling this method.
[in]vec_defThe vector that represents the right-hand-side of the linear system to be solved.
Attention
vec_cor and vec_def must not refer to the same vector object!
Returns
A Status code that represents the status of the solution step.

◆ apply() [2/2]

template<typename Matrix_ , typename Filter_ , template< typename, typename > class Precon_>
virtual Status FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ >::apply ( VectorType &  vec_cor,
const VectorType &  vec_def 
)
inlineoverridevirtual

Applies the preconditioner.

Definition at line 75 of file precon_wrapper.hpp.

References FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ >::_precond, and FEAT::Solver::success.

◆ done()

virtual void FEAT::Solver::SolverBase< Matrix_::VectorTypeR >::done ( )
inlinevirtualinherited

Finalization method.

This function performs both the symbolic and numeric finalization, i.e. it simply performs

this->done_numeric();
this->done_symbolic();

Definition at line 283 of file base.hpp.

◆ done_numeric()

virtual void FEAT::Solver::SolverBase< Matrix_::VectorTypeR >::done_numeric ( )
inlinevirtualinherited

Numeric finalization method.

This method is called to release any data allocated in the numeric initialization step.

Definition at line 246 of file base.hpp.

◆ done_symbolic()

virtual void FEAT::Solver::SolverBase< Matrix_::VectorTypeR >::done_symbolic ( )
inlinevirtualinherited

Symbolic finalization method.

This method is called to release any data allocated in the symbolic initialization step.

Definition at line 255 of file base.hpp.

◆ init()

virtual void FEAT::Solver::SolverBase< Matrix_::VectorTypeR >::init ( )
inlinevirtualinherited

Initialization method.

This function performs both the symbolic and numeric initialization, i.e. it simply performs

this->init_symbolic();
this->init_numeric();

Definition at line 268 of file base.hpp.

◆ init_numeric()

virtual void FEAT::Solver::SolverBase< Matrix_::VectorTypeR >::init_numeric ( )
inlinevirtualinherited

Numeric initialization method.

This method is called to perform numeric initialization of the solver.
Before this function can be called, the symbolic initialization must be performed.

Definition at line 237 of file base.hpp.

◆ init_symbolic()

virtual void FEAT::Solver::SolverBase< Matrix_::VectorTypeR >::init_symbolic ( )
inlinevirtualinherited

Symbolic initialization method.

This method is called to perform symbolic initialization of the solver.

Definition at line 227 of file base.hpp.

◆ name()

template<typename Matrix_ , typename Filter_ , template< typename, typename > class Precon_>
virtual String FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ >::name ( ) const
inlineoverridevirtual

Member Data Documentation

◆ _filter

template<typename Matrix_ , typename Filter_ , template< typename, typename > class Precon_>
const Filter_& FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ >::_filter
protected

the filter object

Definition at line 48 of file precon_wrapper.hpp.

◆ _precond

template<typename Matrix_ , typename Filter_ , template< typename, typename > class Precon_>
Precon_<MatrixType, VectorType> FEAT::Solver::PreconWrapper< Matrix_, Filter_, Precon_ >::_precond
protected

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