dune-istl 3.0-git
|
#include <dune/istl/paamg/twolevelmethod.hh>
Public Types | |
enum | { category =SolverCategory::sequential } |
typedef CSP | CoarseLevelSolverPolicy |
The type of the policy for constructing the coarse level solver. | |
typedef CoarseLevelSolverPolicy::CoarseLevelSolver | CoarseLevelSolver |
The type of the coarse level solver. | |
typedef FO | FineOperatorType |
The linear operator of the finel level system. Has to be derived from AssembledLinearOperator. | |
typedef FineOperatorType::range_type | FineRangeType |
The type of the range of the fine level operator. | |
typedef FineOperatorType::domain_type | FineDomainType |
The type of the domain of the fine level operator. | |
typedef CSP::Operator | CoarseOperatorType |
The linear operator of the finel level system. Has to be derived from AssembledLinearOperator. | |
typedef CoarseOperatorType::range_type | CoarseRangeType |
The type of the range of the coarse level operator. | |
typedef CoarseOperatorType::domain_type | CoarseDomainType |
The type of the domain of the coarse level operator. | |
typedef S | SmootherType |
The type of the fine level smoother. | |
typedef FO::domain_type | domain_type |
The domain type of the preconditioner. | |
typedef FO::range_type | range_type |
The range type of the preconditioner. | |
typedef X::field_type | field_type |
The field type of the preconditioner. | |
Public Member Functions | |
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. | |
TwoLevelMethod (const TwoLevelMethod &other) | |
~TwoLevelMethod () | |
void | pre (FineDomainType &x, FineRangeType &b) |
void | post (FineDomainType &x) |
void | apply (FineDomainType &v, const FineRangeType &d) |
virtual void | pre (FO::domain_type &x, FO::range_type &b)=0 |
Prepare the preconditioner. | |
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. | |
virtual void | post (FO::domain_type &x)=0 |
Clean up. | |
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. |
typedef CoarseOperatorType::domain_type Dune::Amg::TwoLevelMethod< FO, CSP, S >::CoarseDomainType |
The type of the domain of the coarse level operator.
typedef CoarseLevelSolverPolicy::CoarseLevelSolver Dune::Amg::TwoLevelMethod< FO, CSP, S >::CoarseLevelSolver |
The type of the coarse level solver.
The type of the policy for constructing the coarse level solver.
typedef CSP::Operator Dune::Amg::TwoLevelMethod< FO, CSP, S >::CoarseOperatorType |
The linear operator of the finel level system. Has to be derived from AssembledLinearOperator.
typedef CoarseOperatorType::range_type Dune::Amg::TwoLevelMethod< FO, CSP, S >::CoarseRangeType |
The type of the range of the coarse level operator.
|
inherited |
The domain type of the preconditioner.
|
inherited |
The field type of the preconditioner.
typedef FineOperatorType::domain_type Dune::Amg::TwoLevelMethod< FO, CSP, S >::FineDomainType |
The type of the domain of the fine level operator.
The linear operator of the finel level system. Has to be derived from AssembledLinearOperator.
typedef FineOperatorType::range_type Dune::Amg::TwoLevelMethod< FO, CSP, S >::FineRangeType |
The type of the range of the fine level operator.
|
inherited |
The range type of the preconditioner.
The type of the fine level smoother.
|
inline |
Constructs a two level method.
CoarseSolverPolicy | The policy for constructing the coarse solver, e.g. OneStepAMGCoarseSolverPolicy |
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. |
|
inline |
|
inline |
|
inline |
|
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
[out] | v | The update to be computed |
d | The current defect. |
|
inline |
|
pure virtualinherited |
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.
x | The right hand side of the equation. |
|
inline |
|
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.
x | The left hand side of the equation. |
b | The right hand side of the equation. |