Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

STEP_CTRL Class Reference

Abstract stepsize control class. More...

#include <stepctrl.h>

Inheritance diagram for STEP_CTRL:

NAME CONST_STEP VAR_STEP_CTRL List of all members.

Public Methods

 STEP_CTRL ( const string & name )
 Constructor. More...

void SetStepSize ( double h )
 Sets a stepsize. More...

double GetStepSize () const
 Returns the current stepsize. More...

virtual double PredictFirstStep ( const PtrODENumeric ODE, PtrDataRepr Data, int order ) = 0
 Computes the first step. More...

virtual bool PredictStep ( double & hPred, double h, const PtrODENumeric ODE, const INTERVAL_VECTOR & LocErr, const INTERVAL_VECTOR & Ytight, int order ) = 0
 Computes a new stepsize. More...

double CompMinStepSize ( double t, double T )
 Computes the minimum stepsize allowed. More...

double CompNextPoint ( double h, double t, double T )
 Computes the next point. More...

double IfLastStep ( double t, double h, double T )
 Compute the last stepsize. More...

virtual void Init ( const PtrODENumeric ODE ) = 0
 Initializes a stepsize control object.

virtual ~STEP_CTRL ()
 Destructor.


Protected Methods

 STEP_CTRL ()


Detailed Description

Abstract stepsize control class.

Author(s):
Ned Nedialkov
Date:
8 June 2001


Constructor & Destructor Documentation

STEP_CTRL::STEP_CTRL ( const string & name ) [inline]
 

Constructor.

It sets a name for the stepsize control method.

Parameters:
name   name for the stepsize control method

Precondition:
!name.empty()

STEP_CTRL::~STEP_CTRL ( ) [inline, virtual]
 

Destructor.

STEP_CTRL::STEP_CTRL ( ) [inline, protected]
 


Member Function Documentation

void STEP_CTRL::SetStepSize ( double h ) [inline]
 

Sets a stepsize.

This function stores the absolute value of a stepsize.

Parameters:
h   stepsize.
Precondition:
h != 0.0

double STEP_CTRL::GetStepSize ( ) const [inline]
 

Returns the current stepsize.

This function returns the stepsize that is set by the most recent call to SetStepSize(), or 0, if SetStepSize() has not been called.

double STEP_CTRL::PredictFirstStep ( const PtrODENumeric ODE,
PtrDataRepr Data,
int order ) [pure virtual]
 

Computes the first step.

This function computes a stepsize on the first integration step.

Parameters:
ODE   pointer to problem
Data   pointer to a data representation object
order   order of the method

Returns:
the predicted initial stepsize

Precondition:
NotNull(ODE) && NotNull(Data) && order > 0

Reimplemented in CONST_STEP, and VAR_STEP_CTRL.

bool STEP_CTRL::PredictStep ( double & hPred,
double h,
const PtrODENumeric ODE,
const INTERVAL_VECTOR & LocErr,
const INTERVAL_VECTOR & Ytight,
int order ) [pure virtual]
 

Computes a new stepsize.

This function computes a stepsize after the first integration step.

Parameters:
hPred   (output) predicted stepsize
h   current stepsize
ODE   pointer to a problem
LocErr   enclosure of the local error on the current step
Ytight   tight enclosure of the solution
order   order of the method

Returns:
true if the stepsize h is accepted and false if the stepsize h is rejected

Precondition:
h != 0 && NotNull(ODE) && Dimension(LocErr) == ODE->GetSize() &&
Dimension(Ytight) == ODE->GetSize() && order > 0

Reimplemented in CONST_STEP, and VAR_STEP_CTRL.

double STEP_CTRL::CompMinStepSize ( double t,
double T )
 

Computes the minimum stepsize allowed.

Parameters:
t   current integration point
T   end of the integration interval

Precondition:
t != T
Returns:
the minimum stepsize allowed

double STEP_CTRL::CompNextPoint ( double h,
double t,
double T )
 

Computes the next point.

Parameters:
h   current stepsize
t   current integration point
T   end of the integration interval

Returns:
the next integration point

Precondition:
h != 0 && t != T

double STEP_CTRL::IfLastStep ( double t,
double h,
double T )
 

Compute the last stepsize.

If t is "too close" to T, this function reduces h and returns the reduced stepsize.

void STEP_CTRL::Init ( const PtrODENumeric ODE ) [pure virtual]
 

Initializes a stepsize control object.

Reimplemented in CONST_STEP, and VAR_STEP_CTRL.


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 12:45:42 2001 for VNODE by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000