ReductionControl Class Reference
[Linear solver classes]

Inheritance diagram for ReductionControl:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 ReductionControl (const unsigned int maxiter=100, const double tolerance=1.e-10, const double reduce=1.e-2, const bool log_history=false, const bool log_result=true)
virtual ~ReductionControl ()
void parse_parameters (ParameterHandler &param)
virtual State check (const unsigned int step, const double check_value)
double reduction () const
double set_reduction (const double)

Static Public Member Functions

static void declare_parameters (ParameterHandler &param)

Protected Attributes

double reduce
double reduced_tol


Detailed Description

Specialization of SolverControl which returns success if either the specified tolerance is achieved or if the initial residual (or whatever criterion was chosen by the solver class) is reduced by a given factor. This is useful in cases where you don't want to solve exactly, but rather want to gain two digits or if the maximal number of iterations is achieved. For example: The maximal number of iterations is 20, the reduction factor is 1% und the tolerance is 0.1%. The initial residual is 2.5. The process will break if 20 iteration are comleted or the new residual is less then 2.5*1% or if it is less then 0.1%.

Constructor & Destructor Documentation

ReductionControl::ReductionControl ( const unsigned int  maxiter = 100,
const double  tolerance = 1.e-10,
const double  reduce = 1.e-2,
const bool  log_history = false,
const bool  log_result = true 
)

Constructor. Provide the reduction factor additional to the arguments of the Control constructor.

virtual ReductionControl::~ReductionControl (  )  [virtual]

Virtual destructor is needed as there are virtual functions in this class.


Member Function Documentation

static void ReductionControl::declare_parameters ( ParameterHandler param  )  [static]

Interface to parameter file.

Reimplemented from SolverControl.

void ReductionControl::parse_parameters ( ParameterHandler param  ) 

Read parameters from file.

Reimplemented from SolverControl.

virtual State ReductionControl::check ( const unsigned int  step,
const double  check_value 
) [virtual]

Decide about success or failure of an iteration. This function calls the one in the base class, but sets the tolerance to reduction * initial value upon the first iteration.

Reimplemented from SolverControl.

double ReductionControl::reduction (  )  const

Reduction factor.

double ReductionControl::set_reduction ( const   double  ) 

Change reduction factor.


Member Data Documentation

Desired reduction factor.

Reduced tolerance. Stop iterations if either this value is achieved or if the base class indicates success.


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

deal.II documentation generated on Sat Aug 15 16:52:16 2009 by doxygen 1.5.9