Feel++
0.91.4
|
brief description More...
#include <iteration.hpp>
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 | |
Iteration & | operator= (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 More... | |
void | setRelativePrecision (NumericalType p) throw () |
set the relative precision to reach More... | |
void | setInitialResidual (NumericalType ninit) throw () |
initial norm for the residual More... | |
void | setRelaxation (real_type __w) |
Methods | |
bool | isFinished (NumericalType r, bool verbose=false) |
tells if the iteration finished More... | |
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 | |
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
|
inlineprotected |
Default constructor.
|
inline |
tells if the iteration finished
Three cases can occur:
r | residual to test the convergence |
verbose | true for verbose output, false otherwise |
|
inline |
initial norm for the residual
ninit | initial norm for the residual |
|
inline |
set the Max number of iterations
m | max number of iterations to perform |
|
inline |
set the relative precision to reach
p | precision |