LOCA::Abstract::Iterator Class Reference

An abstract interface for implementing iteration. More...

#include <LOCA_Abstract_Iterator.H>

Inheritance diagram for LOCA::Abstract::Iterator:

List of all members.

Public Types

enum  IteratorStatus { LastIteration = 2, Finished = 1, Failed = 0, NotFinished = -1 }
 Enumerated type for status of the iterator.
enum  StepStatus { Successful = 1, Unsuccessful = 0, Provisional = -1 }
 Enumerated type for status of each step of iterator.

Public Member Functions

 Iterator (NOX::Parameter::List &p)
 Iterator (const Iterator &it)
 Copy Constructor.
virtual ~Iterator ()
virtual bool resetIterator (NOX::Parameter::List &p)
 Reset the iterator to start a new iteration.
virtual IteratorStatus getIteratorStatus () const
 Return the status of the iterator.
virtual int getStepNumber () const
 Returns the number of accepted steps.
virtual int getNumFailedSteps () const
 Returns the number of failed steps.
virtual int getNumTotalSteps () const
 Returns the total number of steps attempted.
virtual IteratorStatus run ()
 Run the iterator.

Protected Member Functions

 Iterator ()
virtual IteratorStatus iterate ()
 Perform iteration.
virtual IteratorStatus stop (StepStatus)
 Check stopping criteria.
virtual IteratorStatus start ()=0
 Intialize iterator.
virtual IteratorStatus finish (IteratorStatus)=0
 Finalize iterator.
virtual StepStatus preprocess (StepStatus)=0
 Preprocess step.
virtual StepStatus compute (StepStatus)=0
 Compute step.
virtual StepStatus postprocess (StepStatus)=0
 Postprocess step.
virtual void setLastIteration ()
 Set iterator status as LastIteration.
virtual bool isLastIteration ()
 Returns true of the iteratorStatus is LastIteration.
virtual StepStatus computeStepStatus (StepStatus preStatus, StepStatus compStatus, StepStatus postStatus)
 Compute step, iterator status from status of each component of step.

Protected Attributes

int stepNumber
 Current step number of continuation algorithm (does not include failed steps).
int numFailedSteps
 Number of continuation steps that have failed.
int numTotalSteps
 Total number of steps attempeted (includes failed and successful steps).
int maxSteps
 Maximum number of continuation steps to take. Defaults to 100.
IteratorStatus iteratorStatus
 Current status of the iterator.

Detailed Description

An abstract interface for implementing iteration.

The LOCA::Abstract::Iterator defines an interface for implementing many kinds of iterative processes. In LOCA, this is used to implement the Stepper which computes points along a continuation curve.

Many iterative processes can be abstracted in the following manner:

The run method of the iterator implements this iterative process with start, finish, preprocess, compute and postprocess left as pure virtual methods to be implemented for the specific iterative process.

The iterator has one parameter, "Max Steps" (default 100) giving the maximum number of steps the iterator should take. The default implementation of stop only stops the iterator when this maximum number of steps has been reached.

The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:40:41 2008 for NOX by doxygen