jplus-0.4.6
|
YACTS -- yet another continuous time simulator. More...
#include <src/yacts.h>
Public Member Functions | |
yacts () | |
Initializes YACTS. | |
bool | init (std::istream &script) |
Load YACTS script. | |
~yacts () | |
Frees YACTS memory. | |
virtual void | libInit () |
Initializes YACTS library functions and makes them avaliable to J. | |
bool | setOut (std::string newOut) |
Sets the name of output variable. | |
int | REPL () |
Enters read(stdin)-eval-print(stdout) loop until the end of stdin. | |
std::string | getTrajectoryFilenameBase (std::string prefix) |
Computes trajectory filename base, using hash of "important" parts of yacts script. | |
bool | initTrajectory (std::string prefix) |
Initializes ODE solver and the state either from the start of the problem or from the last saved trajectory frame. | |
int | size () |
Returns the number of computed frames in the current trajectory file. | |
bool | setFrame (int iframe) |
Sets specified frame as "current", loads it. | |
bool | hasNextFrameStored () |
Returns true if the next frame is already in the trajectory file and does not have to be (and will not be) calculated. | |
bool | nextFrame () |
Advances to the next trajectory frame by computing it (if necessary) and saving (if computed). | |
std::string | process () |
Computes and returns the "OUT" variable, corresponding to the current frame. | |
Friends | |
int | runTests () |
YACTS -- yet another continuous time simulator.
It uses J+ to specify a system of ODEs and Sundials library to solve them.
yacts::yacts | ( | ) |
Initializes YACTS.
yacts::~yacts | ( | ) |
Frees YACTS memory.
std::string yacts::getTrajectoryFilenameBase | ( | std::string | prefix | ) |
Computes trajectory filename base, using hash of "important" parts of yacts script.
prefix | trajectory filename prefix. |
bool yacts::hasNextFrameStored | ( | ) |
Returns true if the next frame is already in the trajectory file and does not have to be (and will not be) calculated.
bool yacts::init | ( | std::istream & | script | ) |
Load YACTS script.
The script must define the following variables: T, double scalar -- initial(first assignment), current and next frame time; S, double array -- initial(first assignment) and current state; dSdT, double array -- time derivative of state; OUT, character vector -- textual rendering of the current state.
script | stream to load YACTS script from. |
Reimplemented from jplus.
bool yacts::initTrajectory | ( | std::string | prefix | ) |
Initializes ODE solver and the state either from the start of the problem or from the last saved trajectory frame.
prefix | trajectory filename prefix. |
virtual void yacts::libInit | ( | ) | [virtual] |
Initializes YACTS library functions and makes them avaliable to J.
Reimplemented from jplus.
bool yacts::nextFrame | ( | ) |
Advances to the next trajectory frame by computing it (if necessary) and saving (if computed).
std::string yacts::process | ( | ) |
Computes and returns the "OUT" variable, corresponding to the current frame.
int yacts::REPL | ( | ) |
Enters read(stdin)-eval-print(stdout) loop until the end of stdin.
bool yacts::setFrame | ( | int | iframe | ) |
Sets specified frame as "current", loads it.
iframe | index of the frame to become current. |
bool yacts::setOut | ( | std::string | newOut | ) |
Sets the name of output variable.
newOut | new output variable name. |
int yacts::size | ( | ) |
Returns the number of computed frames in the current trajectory file.
Reimplemented from trjfile.
int runTests | ( | ) | [friend] |