Loading...
Searching...
No Matches
Dune::IterativeSolver< X, Y >::Iteration< CountType > Class Template Reference

Class for controlling iterative methods. More...

`#include <dune/istl/solver.hh>`

## Public Member Functions

| Iteration (const IterativeSolver &parent, InverseOperatorResult &res)
| Iteration (const Iteration &)=delete
| Iteration (Iteration &&other)
| ~Iteration ()
bool | step (CountType i, real_type def)
| registers the iteration step, checks for invalid defect norm and convergence.

## Protected Member Functions

void | finalize ()

## Protected Attributes

real_type | _def0 = 0.0
real_type | _def = 0.0
CountType | _i
Timer | _watch
InverseOperatorResult & | _res
const IterativeSolver & | _parent
bool | _valid

## Detailed Description

template<class X, class Y>
template<class CountType = unsigned int>
class Dune::IterativeSolver< X, Y >::Iteration< CountType >

Class for controlling iterative methods.

This class provides building blocks for a iterative method. It does all things that have to do with output, residual checking (NaN, infinite, convergence) and sets also the fields of InverseOperatorResult.

Instances of this class are meant to create with IterativeSolver::startIteration and stored as a local variable in the apply method. If the scope of the apply method is left the destructor of this class sets all the solver statistics in the InverseOperatorResult and prints the final output.

During the iteration in every step Iteration::step should be called with the current iteration count and norm of the residual. It returns true if convergence is achieved.

## Constructor & Destructor Documentation

## Iteration() [1/3]

template<class X, class Y>
template<class CountType = unsigned int>

Dune::IterativeSolver< X, Y >::Iteration< CountType >::Iteration | ( | const IterativeSolver & | parent,
|  | InverseOperatorResult & | res )

inline

## Iteration() [2/3]

template<class X, class Y>
template<class CountType = unsigned int>

Dune::IterativeSolver< X, Y >::Iteration< CountType >::Iteration | ( | const Iteration< CountType > & |  | ) |

delete

## Iteration() [3/3]

template<class X, class Y>
template<class CountType = unsigned int>

Dune::IterativeSolver< X, Y >::Iteration< CountType >::Iteration | ( | Iteration< CountType > && | other | ) |

inline

## ~Iteration()

template<class X, class Y>
template<class CountType = unsigned int>

Dune::IterativeSolver< X, Y >::Iteration< CountType >::~Iteration | ( |  | ) |

inline

## Member Function Documentation

## finalize()

template<class X, class Y>
template<class CountType = unsigned int>

void Dune::IterativeSolver< X, Y >::Iteration< CountType >::finalize | ( |  | ) |

inline protected

## step()

template<class X, class Y>
template<class CountType = unsigned int>

bool Dune::IterativeSolver< X, Y >::Iteration< CountType >::step | ( | CountType | i,
|  | real_type | def )

inline

registers the iteration step, checks for invalid defect norm and convergence.

Parameters

  i | The current iteration count
  def | The current norm of the defect

Returns
  true is convergence is achieved

Exceptions

  SolverAbort | when def contains inf or NaN

## Member Data Documentation

## _def

template<class X, class Y>
template<class CountType = unsigned int>

real_type Dune::IterativeSolver< X, Y >::Iteration< CountType >::_def = 0.0

protected

## _def0

template<class X, class Y>
template<class CountType = unsigned int>

real_type Dune::IterativeSolver< X, Y >::Iteration< CountType >::_def0 = 0.0

protected

## _i

template<class X, class Y>
template<class CountType = unsigned int>

CountType Dune::IterativeSolver< X, Y >::Iteration< CountType >::_i

protected

## _parent

template<class X, class Y>
template<class CountType = unsigned int>

const IterativeSolver& Dune::IterativeSolver< X, Y >::Iteration< CountType >::_parent

protected

## _res

template<class X, class Y>
template<class CountType = unsigned int>

InverseOperatorResult& Dune::IterativeSolver< X, Y >::Iteration< CountType >::_res

protected

## _valid

template<class X, class Y>
template<class CountType = unsigned int>

bool Dune::IterativeSolver< X, Y >::Iteration< CountType >::_valid

protected

## _watch

template<class X, class Y>
template<class CountType = unsigned int>

Timer Dune::IterativeSolver< X, Y >::Iteration< CountType >::_watch

protected

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

- solver.hh