Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_NLS_LOCA::StepSizeControl Class Reference

Adaptive step size control strategy More...

#include <N_NLS_LOCA_StepSizeControl.h>

Inheritance diagram for N_NLS_LOCA::StepSizeControl:
Collaboration diagram for N_NLS_LOCA::StepSizeControl:

Public Member Functions

 StepSizeControl ()
 Constructor. More...
 
virtual ~StepSizeControl ()
 Destructor. More...
 
virtual
NOX::Abstract::Group::ReturnType 
reset (NOX::Parameter::List &params)
 
virtual
NOX::Abstract::Group::ReturnType 
compute (LOCA::Continuation::ExtendedGroup &curGroup, const LOCA::Continuation::ExtendedVector &predictor, const NOX::Solver::Generic &solver, const LOCA::Abstract::Iterator::StepStatus &stepStatus, const LOCA::Stepper &stepper, double &stepSize)
 
virtual
NOX::Abstract::Group::ReturnType 
compute (LOCA::MultiContinuation::AbstractStrategy &curGroup, const LOCA::MultiContinuation::ExtendedVector &predictor, const NOX::Solver::Generic &solver, const LOCA::Abstract::Iterator::StepStatus &stepStatus, const LOCA::NewStepper &stepper, double &stepSize)
 
virtual double getPrevStepSize () const
 
virtual double getStartStepSize () const
 

Protected Member Functions

virtual
NOX::Abstract::Group::ReturnType 
clipStepSize (double &stepSize)
 

Protected Attributes

double maxStepSize
 Maximum step size. More...
 
double minStepSize
 Minimum step size. More...
 
double startStepSize
 Initial step size. More...
 
double failedFactor
 Factor by which step size is reduced after a failed step. More...
 
double successFactor
 Factor by which step size is increased after a successful step. More...
 
double prevStepSize
 Previous step size. More...
 
bool isFirstStep
 Flag indicating if this is the first step. More...
 
double agrValue
 Stores the aggressiveness factor $a$. More...
 

Detailed Description

Adaptive step size control strategy

This class implements an adaptive step size control strategy derived from the strategy implemented in the LOCA::StepSize::Constant class. If the previous step was unsucessful, the step size is cut in half as in the constant strategy, but if the step was sucessful this strategy increases the step size based on the number of nonlinear solver iterations required in the previous step. In particular, the new step size $\Delta s_{new}$ is given by

\[ \Delta s_{new} = \Delta s_{old}\left(1 + a\left(\frac{N_{max} - N}{N_{max}}\right)^2\right) \]

where $a\in[0,1]$ is an aggressiveness factor, $N$ is the number of nonlinear solver iterations in the previous step, and $N_{max}$ is the maximum number of nonlinear solver iterations.

The parameters used by this class supplied in the constructor or reset method are the same as used by the Constant class in addition to:

  • "Aggressiveness" - Aggressiveness factor $a$ (Default 0.0)

Definition at line 79 of file N_NLS_LOCA_StepSizeControl.h.

Constructor & Destructor Documentation

N_NLS_LOCA::StepSizeControl::StepSizeControl ( )

Constructor.

Definition at line 63 of file N_NLS_LOCA_StepSizeControl.C.

N_NLS_LOCA::StepSizeControl::~StepSizeControl ( )
virtual

Destructor.

Definition at line 71 of file N_NLS_LOCA_StepSizeControl.C.

Member Function Documentation

NOX::Abstract::Group::ReturnType N_NLS_LOCA::StepSizeControl::clipStepSize ( double &  stepSize)
protectedvirtual

Definition at line 216 of file N_NLS_LOCA_StepSizeControl.C.

NOX::Abstract::Group::ReturnType N_NLS_LOCA::StepSizeControl::compute ( LOCA::Continuation::ExtendedGroup &  curGroup,
const LOCA::Continuation::ExtendedVector &  predictor,
const NOX::Solver::Generic &  solver,
const LOCA::Abstract::Iterator::StepStatus &  stepStatus,
const LOCA::Stepper &  stepper,
double &  stepSize 
)
virtual

Definition at line 91 of file N_NLS_LOCA_StepSizeControl.C.

NOX::Abstract::Group::ReturnType N_NLS_LOCA::StepSizeControl::compute ( LOCA::MultiContinuation::AbstractStrategy &  curGroup,
const LOCA::MultiContinuation::ExtendedVector &  predictor,
const NOX::Solver::Generic &  solver,
const LOCA::Abstract::Iterator::StepStatus &  stepStatus,
const LOCA::NewStepper &  stepper,
double &  stepSize 
)
virtual

Definition at line 153 of file N_NLS_LOCA_StepSizeControl.C.

double N_NLS_LOCA::StepSizeControl::getPrevStepSize ( ) const
virtual

Definition at line 243 of file N_NLS_LOCA_StepSizeControl.C.

double N_NLS_LOCA::StepSizeControl::getStartStepSize ( ) const
virtual

Definition at line 248 of file N_NLS_LOCA_StepSizeControl.C.

NOX::Abstract::Group::ReturnType N_NLS_LOCA::StepSizeControl::reset ( NOX::Parameter::List &  params)
virtual

Definition at line 76 of file N_NLS_LOCA_StepSizeControl.C.

Member Data Documentation

double N_NLS_LOCA::StepSizeControl::agrValue
protected

Stores the aggressiveness factor $a$.

Definition at line 140 of file N_NLS_LOCA_StepSizeControl.h.

double N_NLS_LOCA::StepSizeControl::failedFactor
protected

Factor by which step size is reduced after a failed step.

Definition at line 128 of file N_NLS_LOCA_StepSizeControl.h.

bool N_NLS_LOCA::StepSizeControl::isFirstStep
protected

Flag indicating if this is the first step.

Definition at line 137 of file N_NLS_LOCA_StepSizeControl.h.

double N_NLS_LOCA::StepSizeControl::maxStepSize
protected

Maximum step size.

Definition at line 119 of file N_NLS_LOCA_StepSizeControl.h.

double N_NLS_LOCA::StepSizeControl::minStepSize
protected

Minimum step size.

Definition at line 122 of file N_NLS_LOCA_StepSizeControl.h.

double N_NLS_LOCA::StepSizeControl::prevStepSize
protected

Previous step size.

Definition at line 134 of file N_NLS_LOCA_StepSizeControl.h.

double N_NLS_LOCA::StepSizeControl::startStepSize
protected

Initial step size.

Definition at line 125 of file N_NLS_LOCA_StepSizeControl.h.

double N_NLS_LOCA::StepSizeControl::successFactor
protected

Factor by which step size is increased after a successful step.

Definition at line 131 of file N_NLS_LOCA_StepSizeControl.h.


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