dune-istl
2.1.1
|
Abstract base class for all solvers. More...
#include <dune/istl/solvers.hh>
Public Types | |
typedef X | domain_type |
Type of the domain of the operator to be inverted. | |
typedef Y | range_type |
Type of the range of the operator to be inverted. | |
typedef X::field_type | field_type |
The field type of the operator. | |
Public Member Functions | |
virtual void | apply (X &x, Y &b, InverseOperatorResult &res)=0 |
Apply inverse operator,. | |
virtual void | apply (X &x, Y &b, double reduction, InverseOperatorResult &res)=0 |
apply inverse operator, with given convergence criteria. | |
virtual | ~InverseOperator () |
Destructor. | |
Protected Types | |
enum | { iterationSpacing = 5, normSpacing = 16 } |
Protected Member Functions | |
void | printHeader (std::ostream &s) const |
helper function for printing header of solver output | |
template<class DataType > | |
void | printOutput (std::ostream &s, const double iter, const DataType &norm, const DataType &norm_old) const |
helper function for printing solver output | |
template<class DataType > | |
void | printOutput (std::ostream &s, const double iter, const DataType &norm) const |
helper function for printing solver output |
Abstract base class for all solvers.
An InverseOperator computes the solution of where
is an operator. Note that the solver "knows" which operator to invert and which preconditioner to apply (if any). The user is only interested in inverting the operator. InverseOperator might be a Newton scheme, a Krylov subspace method, or a direct solver or just anything.
typedef X Dune::InverseOperator< X, Y >::domain_type |
Type of the domain of the operator to be inverted.
Reimplemented in Dune::RestartedGMResSolver< X, Y, F >, Dune::MINRESSolver< X >, Dune::BiCGSTABSolver< X >, Dune::CGSolver< X >, Dune::GradientSolver< X >, Dune::LoopSolver< X >, and Dune::SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > >.
typedef X::field_type Dune::InverseOperator< X, Y >::field_type |
The field type of the operator.
Reimplemented in Dune::RestartedGMResSolver< X, Y, F >, Dune::MINRESSolver< X >, Dune::BiCGSTABSolver< X >, Dune::CGSolver< X >, Dune::GradientSolver< X >, and Dune::LoopSolver< X >.
typedef Y Dune::InverseOperator< X, Y >::range_type |
Type of the range of the operator to be inverted.
Reimplemented in Dune::RestartedGMResSolver< X, Y, F >, Dune::MINRESSolver< X >, Dune::BiCGSTABSolver< X >, Dune::CGSolver< X >, Dune::GradientSolver< X >, Dune::LoopSolver< X >, and Dune::SuperLU< BCRSMatrix< FieldMatrix< T, n, m >, A > >.
virtual Dune::InverseOperator< X, Y >::~InverseOperator | ( | ) | [inline, virtual] |
Destructor.
virtual void Dune::InverseOperator< X, Y >::apply | ( | X & | x, |
Y & | b, | ||
InverseOperatorResult & | res | ||
) | [pure virtual] |
Apply inverse operator,.
x | The left hand side to store the result in. |
b | The right hand side |
res | Object to store the statistics about applying the operator. |
Implemented in Dune::MINRESSolver< X >, Dune::BiCGSTABSolver< X >, Dune::CGSolver< X >, Dune::GradientSolver< X >, and Dune::LoopSolver< X >.
Referenced by Dune::Amg::KAmgTwoGrid< Amg >::apply().
virtual void Dune::InverseOperator< X, Y >::apply | ( | X & | x, |
Y & | b, | ||
double | reduction, | ||
InverseOperatorResult & | res | ||
) | [pure virtual] |
apply inverse operator, with given convergence criteria.
x | The left hand side to store the result in. |
b | The right hand side |
reduction | The minimum defect reduction to achieve. |
res | Object to store the statistics about applying the operator. |
Implemented in Dune::RestartedGMResSolver< X, Y, F >, Dune::MINRESSolver< X >, Dune::BiCGSTABSolver< X >, Dune::CGSolver< X >, Dune::GradientSolver< X >, and Dune::LoopSolver< X >.
void Dune::InverseOperator< X, Y >::printHeader | ( | std::ostream & | s | ) | const [inline, protected] |
helper function for printing header of solver output
Referenced by Dune::RestartedGMResSolver< X, Y, F >::apply().
void Dune::InverseOperator< X, Y >::printOutput | ( | std::ostream & | s, |
const double | iter, | ||
const DataType & | norm, | ||
const DataType & | norm_old | ||
) | const [inline, protected] |
helper function for printing solver output
Referenced by Dune::RestartedGMResSolver< X, Y, F >::apply().
void Dune::InverseOperator< X, Y >::printOutput | ( | std::ostream & | s, |
const double | iter, | ||
const DataType & | norm | ||
) | const [inline, protected] |
helper function for printing solver output