Public Member Functions | Static Public Member Functions | Protected Attributes

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)
 ReductionControl (const SolverControl &c)
ReductionControloperator= (const SolverControl &c)
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%.

Author:
Guido Kanschat

Definition at line 460 of file solver_control.h.


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.

ReductionControl::ReductionControl ( const SolverControl c )

Initialize with a SolverControl object. The result will emulate SolverControl by setting reduce to zero.

virtual ReductionControl::~ReductionControl (  ) [virtual]

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


Member Function Documentation

ReductionControl& ReductionControl::operator= ( const SolverControl c )

Assign a SolverControl object to ReductionControl. The result of the assignment will emulate SolverControl by setting reduce to zero.

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.

Definition at line 535 of file solver_control.h.

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

Definition at line 543 of file solver_control.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:11 by doxygen 1.7.2