#include <dune/istl/paamg/twolevelmethod.hh>
|
| TwoLevelMethod (const FineOperatorType &op, std::shared_ptr< SmootherType > smoother, const LevelTransferPolicy< FineOperatorType, CoarseOperatorType > &policy, CoarseLevelSolverPolicy &coarsePolicy, std::size_t preSteps=1, std::size_t postSteps=1) |
| Constructs a two level method. More...
|
|
| TwoLevelMethod (const TwoLevelMethod &other) |
|
| ~TwoLevelMethod () |
|
void | pre (FineDomainType &x, FineRangeType &b) |
|
void | post (FineDomainType &x) |
|
void | apply (FineDomainType &v, const FineRangeType &d) |
|
virtual SolverCategory::Category | category () const |
| Category of the preconditioner (see SolverCategory::Category) More...
|
|
virtual void | pre (FO::domain_type &x, FO::range_type &b)=0 |
| Prepare the preconditioner. More...
|
|
virtual void | apply (FO::domain_type &v, const FO::range_type &d)=0 |
| Apply one step of the preconditioner to the system A(v)=d. More...
|
|
virtual void | post (FO::domain_type &x)=0 |
| Clean up. More...
|
|
template<class FO, class CSP, class S>
class Dune::Amg::TwoLevelMethod< FO, CSP, S >
- Template Parameters
-
FO | The type of the fine level linear operator. |
CSP | The type of the coarse level solver policy. |
S | The type of the fine level smoother used. |
◆ CoarseDomainType
template<class FO , class CSP , class S >
The type of the domain of the coarse level operator.
◆ CoarseLevelSolver
template<class FO , class CSP , class S >
The type of the coarse level solver.
◆ CoarseLevelSolverPolicy
template<class FO , class CSP , class S >
The type of the policy for constructing the coarse level solver.
◆ CoarseOperatorType
template<class FO , class CSP , class S >
◆ CoarseRangeType
template<class FO , class CSP , class S >
The type of the range of the coarse level operator.
◆ domain_type
The domain type of the preconditioner.
◆ field_type
The field type of the preconditioner.
◆ FineDomainType
template<class FO , class CSP , class S >
The type of the domain of the fine level operator.
◆ FineOperatorType
template<class FO , class CSP , class S >
◆ FineRangeType
template<class FO , class CSP , class S >
The type of the range of the fine level operator.
◆ range_type
The range type of the preconditioner.
◆ SmootherType
template<class FO , class CSP , class S >
The type of the fine level smoother.
◆ TwoLevelMethod() [1/2]
template<class FO , class CSP , class S >
Constructs a two level method.
- Template Parameters
-
- Parameters
-
op | The fine level operator. |
smoother | The fine level smoother. |
policy | The level transfer policy. |
coarsePolicy | The policy for constructing the coarse level solver. |
preSteps | The number of smoothing steps to apply before the coarse level correction. |
preSteps | The number of smoothing steps to apply after the coarse level correction. |
◆ TwoLevelMethod() [2/2]
template<class FO , class CSP , class S >
◆ ~TwoLevelMethod()
template<class FO , class CSP , class S >
◆ apply() [1/2]
virtual void Dune::Preconditioner< FO::domain_type , FO::range_type >::apply |
( |
FO::domain_type & |
v, |
|
|
const FO::range_type & |
d |
|
) |
| |
|
pure virtualinherited |
Apply one step of the preconditioner to the system A(v)=d.
On entry v=0 and d=b-A(x) (although this might not be computed in that way. On exit v contains the update, i.e one step computes
where
is the approximate inverse of the operator
characterizing the preconditioner.
- Parameters
-
[out] | v | The update to be computed |
| d | The current defect. |
◆ apply() [2/2]
template<class FO , class CSP , class S >
◆ category()
template<class FO , class CSP , class S >
◆ post() [1/2]
Clean up.
This method is called after the last apply call for the linear system to be solved. Memory may be deallocated safely here. x is the solution of the linear equation.
- Parameters
-
x | The right hand side of the equation. |
◆ post() [2/2]
template<class FO , class CSP , class S >
◆ pre() [1/2]
virtual void Dune::Preconditioner< FO::domain_type , FO::range_type >::pre |
( |
FO::domain_type & |
x, |
|
|
FO::range_type & |
b |
|
) |
| |
|
pure virtualinherited |
Prepare the preconditioner.
A solver solves a linear operator equation A(x)=b by applying one or several steps of the preconditioner. The method pre() is called before the first apply operation. b and x are right hand side and solution vector of the linear system respectively. It may. e.g., scale the system, allocate memory or compute a (I)LU decomposition. Note: The ILU decomposition could also be computed in the constructor or with a separate method of the derived method if several linear systems with the same matrix are to be solved.
- Parameters
-
x | The left hand side of the equation. |
b | The right hand side of the equation. |
◆ pre() [2/2]
template<class FO , class CSP , class S >
The documentation for this class was generated from the following file: