A common interface for (adaptive stepsize) ODE drivers. More...
#include <Evolved.h>
Inheritance diagram for evolved::Evolved< A >:
Collaboration diagram for evolved::Evolved< A >:Public Types | |
| typedef boost::function< void(double, const A &, A &)> | Derivs |
| the strategy functor to calculate time derivative at a given time (3rd argument for output) | |
| typedef boost::shared_ptr< Evolved > | Ptr |
| typedef boost::shared_ptr< const Evolved > | ConstPtr |
Public Types inherited from evolved::EvolvedIO< A > | |
| typedef boost::shared_ptr< EvolvedIO > | Ptr |
| typedef boost::shared_ptr< const EvolvedIO > | ConstPtr |
Public Member Functions | |
| Evolved (A &, Derivs, double dtInit, double epsRel, double epsAbs) | |
| straightforward constructor More... | |
| void | step (double deltaT) |
| takes a single adaptive step More... | |
| std::ostream & | displayParameters (std::ostream &os) const |
| delegates to private virtual | |
| size_t | nFailedSteps () const |
| number of failed steps in the last timestep (delegates to pure virtual) | |
Getter | |
| const Derivs | getDerivs () const |
Public Member Functions inherited from evolved::EvolvedIO< A > | |
| EvolvedIO (A &, double dtInit, double epsRel, double epsAbs) | |
| straightforward constructor More... | |
| A & | getA () |
| A const & | getA () const |
| virtual | ~EvolvedIO () |
| necessary in order that EvolvedIO be polymorphic | |
Public Member Functions inherited from evolved::TimeStepBookkeeper | |
| double | getDtDid () const |
| returns the last performed timestep | |
| double | getDtTry () const |
| returns the timestep to try in the next step | |
| void | setDtTry (double dtTry) |
| Sets the timestep to try in the next step. More... | |
| void | update (double t, double dtTry) |
| TimeStepBookkeeper & | operator= (const TimeStepBookkeeper &) |
| straightforward assignment operator that avoids self-assignment | |
| double | getTime () const |
| void | setTime (double t) |
| double | getEpsRel () const |
| relative precision | |
| double | getEpsAbs () const |
| absolute precision | |
Additional Inherited Members | |
Protected Member Functions inherited from evolved::TimeStepBookkeeper | |
| TimeStepBookkeeper (double dtInit, double epsRel, double epsAbs) | |
| straightforward constructor More... | |
A common interface for (adaptive stepsize) ODE drivers.
It takes the array type it operates on as template parameter. A given array type can be adapted to the form expected by Evolved by suitable specializations of “memory traits” functions. (cf. ArrayTraits.h, for an implementation for blitz::Array cf. BlitzArrayTraits.h)
The array which is actually "evolved" is not owned by Evolved.
The class uses the strategy idiom for calculating the time derivative. The use of boost::function assures that a rather wide range of entities will be accepted as strategy functor.
| A | the array type |
| evolved::Evolved< A >::Evolved | ( | A & | , |
| Derivs | , | ||
| double | dtInit, | ||
| double | epsRel, | ||
| double | epsAbs | ||
| ) |
straightforward constructor
| void evolved::Evolved< A >::step | ( | double | deltaT | ) |
takes a single adaptive step
| deltaT | maximum length of the timestep |