Feel++  0.91.4
Protected Member Functions
Feel::Iteration< Real > Class Template Reference

brief description More...

#include <iteration.hpp>

List of all members.

Public Types

Typedefs
typedef Real NumericalType
 Numerical Type.
typedef ublas::type_traits
< Real >::value_type 
value_type
typedef ublas::type_traits
< Real >::real_type 
real_type

Public Member Functions

Operators
Iterationoperator= (Iteration< NumericalType > const &iter)
 copy operator
void operator++ () throw ()
 prefix ++ operator
Accessors
int numberOfIterations () const
real_type residual () const throw ()
 get the Residual
real_type relativePrecision () const
int maximumNumberOfIterations () const
NumericalType initialResidual () const
real_type relaxation () const
int iteration () const
Mutators
void setMaximumNumberOfIterations (int m) throw ()
 set the Max number of iterations
void setRelativePrecision (NumericalType p) throw ()
 set the relative precision to reach
void setInitialResidual (NumericalType ninit) throw ()
 initial norm for the residual
void setRelaxation (real_type __w)
Methods
bool isFinished (NumericalType r, bool verbose=false)
 tells if the iteration finished
template<typename VectorX >
bool isFinished (const VectorX &r, bool verbose=false)
bool isConverged (NumericalType r) throw ()
template<typename VectorX >
bool isConverged (VectorX const &x) throw ()
bool isFirst () const
void reset ()

Protected Member Functions

 Iteration ()
virtual void handleEvents (bool __is_finished, bool verbose)

Constructors, destructor

static Iteration< NumericalType > * New ()
 create a new instance
 Iteration (Iteration const &iter)
virtual ~Iteration ()
 destructor

Additional Inherited Members


Detailed Description

template<typename Real>
class Feel::Iteration< Real >

brief description

The Iteration object calculates whether the solution has reached the desired accuracy, or whether the maximum number of iterations has been reached. The method isFinished() checks both convergence and number of iterations. The method isConverged() only checks convergence. The isFirst() method is used to determine the first iteration of the loop.

The following notation will be used


Constructor & Destructor Documentation

template<typename Real>
Feel::Iteration< Real >::Iteration ( )
inlineprotected

Default constructor.


Member Function Documentation

template<typename Real>
bool Feel::Iteration< Real >::isFinished ( NumericalType  r,
bool  verbose = false 
)
inline

tells if the iteration finished

Three cases can occur:

  • if $ r < \epsilon $ then the iteration is over
  • if $ I > M $ then the iteration is over
  • else the iteration must continue
Parameters:
rresidual to test the convergence
verbosetrue for verbose output, false otherwise
Returns:
false if not finished and true otherwise
template<typename Real>
void Feel::Iteration< Real >::setInitialResidual ( NumericalType  ninit) throw ()
inline

initial norm for the residual

Parameters:
ninitinitial norm for the residual
template<typename Real>
void Feel::Iteration< Real >::setMaximumNumberOfIterations ( int  m) throw ()
inline

set the Max number of iterations

Parameters:
mmax number of iterations to perform
template<typename Real>
void Feel::Iteration< Real >::setRelativePrecision ( NumericalType  p) throw ()
inline

set the relative precision to reach

Parameters:
pprecision