Documentation


animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF > Struct Template Reference

#include <explicit_stepper.h>

Inheritance diagram for animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >:

animal::integration::Stepper_Function< SolverF, HSmallerF, HLargerF, IsDifferentF > animal::integration::Step_Back_And_Forth< SolverF, HSmallerF, HLargerF, IsDifferentF > List of all members.

Detailed Description

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
struct animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >

Adaptive stepsize control for explicit integration methods.

This straightforward technique take each step twice, once as a full step, and, independently, as two half steps.

The difference between the two final state estimates is a convenient indicator of error. It is this difference that we shall endeavor to keep to a desired degree of accuracy, neither too large nor too small. We do this by adjusting time step value.

Declaration/Definition file: animal/integration/stepper.h (creation date: March 28, 2000).

Author:
David Bourguignon
iMAGIS/GRAVIR, 2000

Definition at line 39 of file explicit_stepper.h.

Public Member Functions

 Step_Doubling ()
 Default constructor, does nothing.

 Step_Doubling (const SolverF &slf, const HSmallerF &hsf, const HLargerF &hlf, const IsDifferentF &isdf)
 Constructor.

void resize (const typename Derivative::sizeype size)
 To take dynamic modifications of the model into account.

Call operator
void operator() (const Model &M, State &S, const Real t, const Real htry, Real &hdid, Real &hnext)
void operator() (const Model &M, const State &initial_S, State &final_S, const Real t, const Real htry, Real &hdid, Real &hnext)

Public Attributes

State initial_S_copy
 Copy of the initial state.

State final_S_eval
 Value at final state.

Derivative initial_D
 Derivative first evaluation.

unsigned int ngood
 number of "good" steps taken

unsigned int nbad
 number of "bad" (but retried and fixed) steps taken


Constructor & Destructor Documentation

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::Step_Doubling  )  [inline]
 

Default constructor, does nothing.

Definition at line 52 of file explicit_stepper.h.

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::Step_Doubling const SolverF &  slf,
const HSmallerF &  hsf,
const HLargerF &  hlf,
const IsDifferentF &  isdf
[inline]
 

Constructor.

Definition at line 57 of file explicit_stepper.h.


Member Function Documentation

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
void animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::operator() const Model M,
const State initial_S,
State final_S,
const Real  t,
const Real  htry,
Real hdid,
Real hnext
[inline]
 

Reimplemented from animal::integration::Stepper_Function< SolverF, HSmallerF, HLargerF, IsDifferentF >.

Reimplemented in animal::integration::Step_Back_And_Forth< SolverF, HSmallerF, HLargerF, IsDifferentF >.

Definition at line 96 of file explicit_stepper.h.

References animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::final_S_eval, animal::integration::Stepper_Function< SolverF, HSmallerF, HLargerF, IsDifferentF >::hlarger, animal::integration::Stepper_Function< SolverF, HSmallerF, HLargerF, IsDifferentF >::hsmaller, animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::initial_D, animal::integration::Stepper_Function< SolverF, HSmallerF, HLargerF, IsDifferentF >::isDifferent, animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::nbad, animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::ngood, and animal::integration::Stepper_Function< SolverF, HSmallerF, HLargerF, IsDifferentF >::solve.

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
void animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::operator() const Model M,
State S,
const Real  t,
const Real  htry,
Real hdid,
Real hnext
[inline]
 

Reimplemented from animal::integration::Stepper_Function< SolverF, HSmallerF, HLargerF, IsDifferentF >.

Reimplemented in animal::integration::Step_Back_And_Forth< SolverF, HSmallerF, HLargerF, IsDifferentF >.

Definition at line 88 of file explicit_stepper.h.

References animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::initial_S_copy.

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
void animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::resize const typename Derivative::sizeype  size  )  [inline]
 

To take dynamic modifications of the model into account.

Definition at line 77 of file explicit_stepper.h.

References animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::final_S_eval, animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::initial_D, and animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::initial_S_copy.


Member Data Documentation

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
State animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::final_S_eval
 

Value at final state.

Definition at line 43 of file explicit_stepper.h.

Referenced by animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::operator()(), and animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::resize().

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
Derivative animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::initial_D
 

Derivative first evaluation.

Definition at line 46 of file explicit_stepper.h.

Referenced by animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::operator()(), and animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::resize().

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
State animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::initial_S_copy
 

Copy of the initial state.

Definition at line 42 of file explicit_stepper.h.

Referenced by animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::operator()(), and animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::resize().

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
unsigned int animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::nbad
 

number of "bad" (but retried and fixed) steps taken

Definition at line 49 of file explicit_stepper.h.

Referenced by animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::operator()().

template<class SolverF, class HSmallerF, class HLargerF, class IsDifferentF>
unsigned int animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::ngood
 

number of "good" steps taken

Definition at line 48 of file explicit_stepper.h.

Referenced by animal::integration::Step_Doubling< SolverF, HSmallerF, HLargerF, IsDifferentF >::operator()().


The documentation for this struct was generated from the following file:
Generated on Thu Dec 23 13:52:31 2004 by doxygen 1.3.6