Dune Core Modules (unstable)

Dune::IterativeSolver< X, Y >::Iteration< CountType > Class Template Reference

Class for controlling iterative methods. More...

#include <dune/istl/solver.hh>

Public Member Functions

bool step (CountType i, real_type def)
 registers the iteration step, checks for invalid defect norm and convergence. More...
 

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.

Member Function Documentation

◆ 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
iThe current iteration count
defThe current norm of the defect
Returns
true is convergence is achieved
Exceptions
SolverAbortwhen def contains inf or NaN

References Dune::Simd::allTrue(), Dune::InverseOperatorResult::converged, DUNE_THROW, Dune::Simd::io(), Dune::MathOverloads::isFinite(), and Dune::InverseOperator< X, Y >::printOutput().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 20, 23:30, 2024)