|
FEAT 3
Finite Element Analysis Toolbox
|
Jacobi preconditioner implementation. More...
#include <jacobi_precond.hpp>
Public Types | |
| typedef SolverBase< VectorType > | BaseClass |
| Our base class. More... | |
| typedef MatrixType::DataType | DataType |
| The floating point precision. More... | |
| typedef Filter_ | FilterType |
| The filter type. More... | |
| typedef Matrix_ | MatrixType |
| The matrix type. More... | |
| typedef MatrixType::VectorTypeL | VectorType |
| The type of vector this solver can be applied to. More... | |
Public Member Functions | |
| JacobiPrecond (const MatrixType &matrix, const FilterType &filter, DataType omega=DataType(1)) | |
| Constructor. More... | |
| JacobiPrecond (const String §ion_name, const PropertyMap *section, const MatrixType &matrix, const FilterType &filter) | |
| Constructor using a PropertyMap. More... | |
| virtual | ~JacobiPrecond () |
| Empty virtual destructor. 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 |
| Solver application method. More... | |
| 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 a descriptive string. More... | |
| void | set_omega (DataType omega) |
| Sets the damping parameter. More... | |
Protected Attributes | |
| const FilterType & | _filter |
| The filter for projecting solution and defect to subspaces. More... | |
| VectorType | _inv_diag |
| The component-wise inverted diagonal of _matrix. More... | |
| const MatrixType & | _matrix |
| The system matrix. More... | |
| DataType | _omega |
| The damping parameter. More... | |
Jacobi preconditioner implementation.
This class implements a simple damped Jacobi preconditioner.
This implementation works for the following matrix types and combinations thereof:
Moreover, this implementation supports all data and index types.
Definition at line 33 of file jacobi_precond.hpp.
| typedef SolverBase<VectorType> FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::BaseClass |
Our base class.
Definition at line 46 of file jacobi_precond.hpp.
| typedef MatrixType::DataType FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::DataType |
The floating point precision.
Definition at line 44 of file jacobi_precond.hpp.
| typedef Filter_ FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::FilterType |
The filter type.
Definition at line 40 of file jacobi_precond.hpp.
| typedef Matrix_ FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::MatrixType |
The matrix type.
Definition at line 38 of file jacobi_precond.hpp.
| typedef MatrixType::VectorTypeL FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::VectorType |
The type of vector this solver can be applied to.
Definition at line 42 of file jacobi_precond.hpp.
|
inlineexplicit |
Constructor.
| [in] | matrix | The matrix whose main diagonal is to be used. |
| [in] | filter | The system filter. |
| [in] | omega | The damping parameter for the preconditioner. |
Definition at line 71 of file jacobi_precond.hpp.
|
inlineexplicit |
Constructor using a PropertyMap.
| [in] | section_name | The name of the config section, which it does not know by itself |
| [in] | section | A pointer to the PropertyMap section configuring this solver |
| [in] | matrix | The system matrix. |
| [in] | filter | The system filter. |
Definition at line 96 of file jacobi_precond.hpp.
References FEAT::PropertyMap::query().
|
inlinevirtual |
Empty virtual destructor.
Definition at line 111 of file jacobi_precond.hpp.
|
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.
correct() method which corrects an initial solution instead of starting with the null vector.| [out] | vec_cor | The 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_def | The vector that represents the right-hand-side of the linear system to be solved. |
Implemented in FEAT::Solver::AmaVanka< Matrix_, Filter_ >.
|
inlineoverridevirtual |
Solver application method.
This method applies the solver represented by this object onto a given defect vector and returns the corresponding correction vector.
correct() method which corrects an initial solution instead of starting with the null vector.| [out] | vec_cor | The 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_def | The vector that represents the right-hand-side of the linear system to be solved. |
Definition at line 157 of file jacobi_precond.hpp.
References FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::_inv_diag, and FEAT::Solver::success.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Numeric finalization method.
This method is called to release any data allocated in the numeric initialization step.
Reimplemented in FEAT::Solver::GenericUmfpack< Matrix_ >.
|
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 128 of file jacobi_precond.hpp.
References FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::_inv_diag.
|
inlinevirtualinherited |
|
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 134 of file jacobi_precond.hpp.
References FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::_inv_diag, FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::_matrix, and FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::_omega.
|
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 122 of file jacobi_precond.hpp.
References FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::_inv_diag, and FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::_matrix.
|
inlineoverridevirtual |
Returns a descriptive string.
Implements FEAT::Solver::SolverBase< Matrix_::VectorTypeL >.
Definition at line 116 of file jacobi_precond.hpp.
|
inline |
Sets the damping parameter.
| [in] | omega | The new damping parameter. |
Definition at line 150 of file jacobi_precond.hpp.
References FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::_omega, and XASSERT.
|
protected |
The filter for projecting solution and defect to subspaces.
Definition at line 52 of file jacobi_precond.hpp.
|
protected |
The component-wise inverted diagonal of _matrix.
Definition at line 56 of file jacobi_precond.hpp.
Referenced by FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::apply(), FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::done_symbolic(), FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::init_numeric(), and FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::init_symbolic().
|
protected |
The system matrix.
Definition at line 50 of file jacobi_precond.hpp.
Referenced by FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::init_numeric(), and FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::init_symbolic().
|
protected |
The damping parameter.
Definition at line 54 of file jacobi_precond.hpp.
Referenced by FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::init_numeric(), and FEAT::Solver::JacobiPrecond< Matrix_, Filter_ >::set_omega().