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

Matrix preconditioner implementation. More...

#include <matrix_precond.hpp>

Inheritance diagram for FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >:
FEAT::Solver::SolverBase< Matrix_::VectorTypeL >

Public Types

typedef SolverBase< VectorType > BaseClass
 
typedef MatrixType::DataType DataType
 
typedef Filter_ FilterType
 
typedef Matrix_ MatrixType
 
typedef MatrixType::VectorTypeL VectorType
 

Public Member Functions

 MatrixPrecond (const MatrixType &matrix, const FilterType &filter)
 Constructor. More...
 
 MatrixPrecond (const String &section_name, const PropertyMap *section, const MatrixType &matrix, const FilterType &filter)
 Constructor. More...
 
virtual Status apply (Matrix_::VectorTypeL &vec_cor, const Matrix_::VectorTypeL &vec_def)=0
 Solver application method. More...
 
virtual Status apply (VectorType &vec_cor, const VectorType &vec_def) override
 
virtual void done ()
 Finalization method. More...
 
virtual void done_numeric ()
 Numeric finalization method. More...
 
virtual void done_symbolic () override
 Symbolic finalization method. More...
 
virtual void init ()
 Initialization method. More...
 
virtual void init_numeric () override
 Numeric initialization method. More...
 
virtual void init_symbolic () override
 Symbolic initialization method. More...
 
virtual String name () const override
 Returns the name of the solver. More...
 

Protected Attributes

const FilterType & _filter
 
const MatrixType & _matrix
 

Detailed Description

template<typename Matrix_, typename Filter_>
class FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >

Matrix preconditioner implementation.

This class wraps a matrix to be used as a preconditioner

Author
Dirk Ribbrock

Definition at line 23 of file matrix_precond.hpp.

Member Typedef Documentation

◆ BaseClass

template<typename Matrix_ , typename Filter_ >
typedef SolverBase<VectorType> FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::BaseClass

Definition at line 31 of file matrix_precond.hpp.

◆ DataType

template<typename Matrix_ , typename Filter_ >
typedef MatrixType::DataType FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::DataType

Definition at line 30 of file matrix_precond.hpp.

◆ FilterType

template<typename Matrix_ , typename Filter_ >
typedef Filter_ FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::FilterType

Definition at line 28 of file matrix_precond.hpp.

◆ MatrixType

template<typename Matrix_ , typename Filter_ >
typedef Matrix_ FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::MatrixType

Definition at line 27 of file matrix_precond.hpp.

◆ VectorType

template<typename Matrix_ , typename Filter_ >
typedef MatrixType::VectorTypeL FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::VectorType

Definition at line 29 of file matrix_precond.hpp.

Constructor & Destructor Documentation

◆ MatrixPrecond() [1/2]

template<typename Matrix_ , typename Filter_ >
FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::MatrixPrecond ( const MatrixType &  matrix,
const FilterType &  filter 
)
inlineexplicit

Constructor.

Parameters
[in]matrixThe matrix to be used.
[in]filterThe system filter.

Definition at line 47 of file matrix_precond.hpp.

◆ MatrixPrecond() [2/2]

template<typename Matrix_ , typename Filter_ >
FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::MatrixPrecond ( const String section_name,
const PropertyMap section,
const MatrixType &  matrix,
const FilterType &  filter 
)
inlineexplicit

Constructor.

Parameters
[in]section_nameThe name of the config section, which it does not know by itself
[in]sectionA pointer to the PropertyMap section configuring this solver
[in]matrixThe matrix to be used.
[in]filterThe system filter.

Definition at line 68 of file matrix_precond.hpp.

Member Function Documentation

◆ apply() [1/2]

virtual Status FEAT::Solver::SolverBase< Matrix_::VectorTypeL >::apply ( Matrix_::VectorTypeL &  vec_cor,
const Matrix_::VectorTypeL &  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.

Implemented in FEAT::Solver::AmaVanka< Matrix_, Filter_ >.

◆ apply() [2/2]

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

Definition at line 94 of file matrix_precond.hpp.

◆ done()

virtual void FEAT::Solver::SolverBase< Matrix_::VectorTypeL >::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_::VectorTypeL >::done_numeric ( )
inlinevirtualinherited

Numeric finalization method.

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

Reimplemented in FEAT::Solver::GenericUmfpack< Matrix_ >.

Definition at line 246 of file base.hpp.

◆ done_symbolic()

template<typename Matrix_ , typename Filter_ >
virtual void FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::done_symbolic ( )
inlineoverridevirtual

Symbolic finalization method.

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

Reimplemented from FEAT::Solver::SolverBase< Matrix_::VectorTypeL >.

Definition at line 86 of file matrix_precond.hpp.

◆ init()

virtual void FEAT::Solver::SolverBase< Matrix_::VectorTypeL >::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()

template<typename Matrix_ , typename Filter_ >
virtual void FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::init_numeric ( )
inlineoverridevirtual

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.

Reimplemented from FEAT::Solver::SolverBase< Matrix_::VectorTypeL >.

Definition at line 90 of file matrix_precond.hpp.

◆ init_symbolic()

template<typename Matrix_ , typename Filter_ >
virtual void FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::init_symbolic ( )
inlineoverridevirtual

Symbolic initialization method.

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

Reimplemented from FEAT::Solver::SolverBase< Matrix_::VectorTypeL >.

Definition at line 82 of file matrix_precond.hpp.

◆ name()

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

Returns the name of the solver.

Implements FEAT::Solver::SolverBase< Matrix_::VectorTypeL >.

Definition at line 77 of file matrix_precond.hpp.

Member Data Documentation

◆ _filter

template<typename Matrix_ , typename Filter_ >
const FilterType& FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::_filter
protected

Definition at line 35 of file matrix_precond.hpp.

◆ _matrix

template<typename Matrix_ , typename Filter_ >
const MatrixType& FEAT::Solver::MatrixPrecond< Matrix_, Filter_ >::_matrix
protected

Definition at line 34 of file matrix_precond.hpp.


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