LOCA::StepSize::AbstractStrategy Class Reference

Abstract interface class for step size control strategies. More...

#include <LOCA_StepSize_AbstractStrategy.H>

Inheritance diagram for LOCA::StepSize::AbstractStrategy:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 AbstractStrategy ()
 Constructor.
virtual ~AbstractStrategy ()
 Destructor.
virtual
NOX::Abstract::Group::ReturnType 
computeStepSize (LOCA::MultiContinuation::AbstractStrategy &curGroup, const LOCA::MultiContinuation::ExtendedVector &predictor, const NOX::Solver::Generic &solver, const LOCA::Abstract::Iterator::StepStatus &stepStatus, const LOCA::Stepper &stepper, double &stepSize)=0
 Compute step size.
virtual double getPrevStepSize () const =0
 Return the previous step size.
virtual double getStartStepSize () const =0
 Return the initial step size.

Private Member Functions

 AbstractStrategy (const AbstractStrategy &)
 Private to prohibit copying.
AbstractStrategyoperator= (const AbstractStrategy &)
 Private to prohibit copying.


Detailed Description

Abstract interface class for step size control strategies.

AbstractStrategy defines an abstract interface for step size control strategies. It is used by LOCA::Stepper to the step size for each continuation step.

The interface currently defines three pure virtual methods, computeStepSize() to compute the step size, getPrevSteSize() to get the step size from the previous step, and getStartStepSize() to get the initial step size. Derived classes should implement this method for a particular strategy. Constructors for derived classes should be of the form:

 class Derived : public AbstractStrategy {
 public:
   Derived(
   const Teuchos::RCP<LOCA::GlobalData>& global_data,
   const Teuchos::RCP<LOCA::Parameter::SublistParser>& topParams,
         const Teuchos::RCP<Teuchos::ParameterList>& stepsizeParams);
   ...
 };

where global_data is the LOCA global data object, topParams is the parsed top-level parameter list, and stepsizeParams is a parameter list of step size control parameters.

This class and its children follow the Strategy pattern as defined in Erich Gamma, et al. "Design Patterns: Elements of Reusable Object-Oriented Software." Addison Wesley, Boston, MA, 1995.

Definition at line 99 of file LOCA_StepSize_AbstractStrategy.H.


Constructor & Destructor Documentation

LOCA::StepSize::AbstractStrategy::AbstractStrategy (  )  [inline]

Constructor.

Definition at line 104 of file LOCA_StepSize_AbstractStrategy.H.

virtual LOCA::StepSize::AbstractStrategy::~AbstractStrategy (  )  [inline, virtual]

Destructor.

Definition at line 107 of file LOCA_StepSize_AbstractStrategy.H.

LOCA::StepSize::AbstractStrategy::AbstractStrategy ( const AbstractStrategy  )  [private]

Private to prohibit copying.


Member Function Documentation

virtual NOX::Abstract::Group::ReturnType LOCA::StepSize::AbstractStrategy::computeStepSize ( LOCA::MultiContinuation::AbstractStrategy curGroup,
const LOCA::MultiContinuation::ExtendedVector predictor,
const NOX::Solver::Generic solver,
const LOCA::Abstract::Iterator::StepStatus stepStatus,
const LOCA::Stepper stepper,
double &  stepSize 
) [pure virtual]

Compute step size.

Parameters:
curGroup [in] Current continuation group
predictor [in] Current predictor direction
solver [in] Solver from previous step
stepStatus [in] Status of previous step
stepper [in] Stepper
stepSize [out] Computed step size
Returns:
ReturnType code indicating success or failure

Implemented in LOCA::StepSize::Adaptive, and LOCA::StepSize::Constant.

virtual double LOCA::StepSize::AbstractStrategy::getPrevStepSize (  )  const [pure virtual]

Return the previous step size.

Implemented in LOCA::StepSize::Constant.

virtual double LOCA::StepSize::AbstractStrategy::getStartStepSize (  )  const [pure virtual]

Return the initial step size.

Implemented in LOCA::StepSize::Constant.

AbstractStrategy& LOCA::StepSize::AbstractStrategy::operator= ( const AbstractStrategy  )  [private]

Private to prohibit copying.


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

Generated on Thu Dec 17 11:03:00 2009 for Nonlinear Solver Project by  doxygen 1.5.9