Adaptive is basically an evolved::Evolved wrapped into the Trajectory interface. More...
#include <Trajectory.h>
Public Types | |
typedef evolved::Evolved< A > | Evolved |
Public Member Functions | |
void | step (double deltaT) |
corresponding to Evolved::step, it takes a single adaptive step More... | |
Public Member Functions inherited from trajectory::AdaptiveIO< A > | |
AdaptiveIO (Ptr) | |
cpputils::iarchive & | readState (cpputils::iarchive &iar) |
Read in the EvolvedIO from a cpputils::iarchive. More... | |
cpputils::oarchive & | writeState (cpputils::oarchive &oar) const |
Write the EvolvedIO to a cpputils::oarchive. | |
double | getTime () const |
Returns the time of the underlying EvolvedIO. | |
Public Member Functions inherited from trajectory::Trajectory | |
void | evolve (double deltaT) |
Propagation for a time interval of exactly deltaT. | |
std::ostream & | display (std::ostream &, int precision) const |
Displays a limited set of relevant physical and numerical information about the actual state of Trajectory at the actual time instant. More... | |
std::ostream & | displayParameters (std::ostream &os) const |
print header | |
std::ostream & | logOnEnd (std::ostream &os) const |
print a log at the end summarizing overall (e.g. time-averaged) physical and numerical data during the run | |
double | getTime () const |
actual time instant | |
double | getDtDid () const |
last perfomed timestep | |
cpputils::iarchive & | readState (cpputils::iarchive &iar) |
read from an archive | |
cpputils::oarchive & | writeState (cpputils::oarchive &oar) const |
write to an archive | |
Protected Types | |
typedef Evolved::ConstPtr | ConstPtr |
typedef Evolved::Ptr | Ptr |
Protected Member Functions | |
Adaptive (A &, typename Evolved::Derivs, double, double, double, const A &, const evolved::Maker< A > &) | |
Constructor taking the same parameters as needed to operate evolved::Maker. | |
Adaptive (A &, typename Evolved::Derivs, double, const ParsEvolved &, const A &, const evolved::Maker< A > &) | |
const std::string | trajectoryID () const |
redirected to a pure virtual, this is needed for serialization of trajectory metadata | |
std::ostream & | displayParameters_v (std::ostream &) const override |
virtual cpputils::iarchive & | readStateMore_v (cpputils::iarchive &iar) |
hook into Trajectory::readState | |
virtual cpputils::oarchive & | writeStateMore_v (cpputils::oarchive &oar) const |
hook into Trajectory::writeState | |
Getters | |
const ConstPtr | getEvolved () const |
const Ptr | getEvolved () |
double | getDtTry () const |
Protected Member Functions inherited from trajectory::AdaptiveIO< A > | |
const Ptr | getEvolvedIO () const |
note: not the same const-correctness as in Adaptive | |
Related Functions | |
(Note that these are not member functions.) | |
template<typename A > | |
void | run (Adaptive< A > &, double time, int dc, unsigned sdf, const std::string &ofn, const std::string &initialFileName, int precision, bool displayInfo, bool firstStateDisplay, double autoStopEpsilon, unsigned autoStopRepetition, const std::string &parsedCommandLine) |
Another version of run for running in dc-mode. More... | |
template<typename A > | |
void | run (Adaptive< A > &, const ParsRun &) |
Dispatcher. More... | |
Related Functions inherited from trajectory::Trajectory | |
void | run (Trajectory &trajectory, double time, double deltaT, unsigned sdf, const std::string &ofn, const std::string &initialFileName, int precision, bool displayInfo, bool firstStateDisplay, double autoStopEpsilon, unsigned autoStopRepetition, const std::string &parsedCommandLine) |
Running in deltaT mode (displays in equal time intervals) for a certain time. More... | |
void | run (Trajectory &, long nDt, double deltaT, unsigned sdf, const std::string &ofn, const std::string &initialFileName, int precision, bool displayInfo, bool firstStateDisplay, double autoStopEpsilon, unsigned autoStopRepetition, const std::string &parsedCommandLine) |
Same as above but runs for a certain number of time intervals deltaT. More... | |
void | run (Trajectory &, const ParsRun &p) |
Dispatcher. More... | |
Additional Inherited Members | |
Protected Attributes inherited from trajectory::AdaptiveIO< A > | |
SerializationMetadata | meta_ |
Adaptive is basically an evolved::Evolved wrapped into the Trajectory interface.
The class stores an evolved::Evolved instance by shared pointer
Definition at line 288 of file Trajectory.h.
|
protected |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
corresponding to Evolved::step, it takes a single adaptive step
It does not delegate directly to Evolved::step, as usually trajectories need to do more for a step than just propagating the ODE: instead, it is kept purely virtual
deltaT | maximum length of the timestep |
Definition at line 298 of file Trajectory.h.
|
related |
Another version of run
for running in dc-mode.
Since in addition to the Trajectory interface, Adaptive has also the capability to be propagated over a single adaptive timestep, it is possible to count the individual ODE steps. Running in dc-mode means that a fixed number of adaptive steps are performed between each display. Hence, we get denser displays in time when the timestep is small, that is, when the important things are happening in the dynamics.
dc | number of adaptive timesteps taken between two displays |
Dispatcher.
p.dc
is nonzero (dc-mode)