#include <OdeSolution.hpp>
Public Member Functions | |
unsigned | GetNumberOfTimeSteps () |
void | SetNumberOfTimeSteps (unsigned numTimeSteps) |
std::vector< double > | GetVariableAtIndex (unsigned index) |
std::vector< double > & | rGetTimes () |
std::vector< std::vector < double > > & | rGetSolutions () |
void | WriteToFile (std::string directoryName, std::string baseResultsFilename, AbstractOdeSystem *pOdeSystem, std::string timeUnits, unsigned stepsPerRow=1, bool cleanDirectory=true) |
Private Attributes | |
unsigned | mNumberOfTimeSteps |
std::vector< double > | mTimes |
std::vector< std::vector < double > > | mSolutions |
Definition at line 41 of file OdeSolution.hpp.
unsigned OdeSolution::GetNumberOfTimeSteps | ( | ) |
Get the number of timesteps.
Definition at line 32 of file OdeSolution.cpp.
References mNumberOfTimeSteps.
void OdeSolution::SetNumberOfTimeSteps | ( | unsigned | numTimeSteps | ) |
Set the number of timesteps.
numTimeSteps | the number of timesteps to use |
Definition at line 37 of file OdeSolution.cpp.
References mNumberOfTimeSteps, mSolutions, and mTimes.
Referenced by AbstractBackwardEulerCardiacCell< SIZE >::Compute(), RungeKuttaFehlbergIvpOdeSolver::InternalSolve(), and AbstractOneStepIvpOdeSolver::Solve().
std::vector< double > OdeSolution::GetVariableAtIndex | ( | unsigned | index | ) |
Get the values of a state variable with a given index in the ODE system at each timestep.
index | the index of the state variable in the system |
Definition at line 44 of file OdeSolution.cpp.
References mSolutions.
std::vector< double > & OdeSolution::rGetTimes | ( | ) |
Get the times at which the solution to the ODE system is stored.
Definition at line 55 of file OdeSolution.cpp.
References mTimes.
Referenced by AbstractBackwardEulerCardiacCell< SIZE >::Compute(), RungeKuttaFehlbergIvpOdeSolver::InternalSolve(), and AbstractOneStepIvpOdeSolver::Solve().
std::vector< std::vector< double > > & OdeSolution::rGetSolutions | ( | ) |
Get the values of the solution to the ODE system at each timestep.
Definition at line 60 of file OdeSolution.cpp.
References mSolutions.
Referenced by AbstractBackwardEulerCardiacCell< SIZE >::Compute(), RungeKuttaFehlbergIvpOdeSolver::InternalSolve(), and AbstractOneStepIvpOdeSolver::Solve().
void OdeSolution::WriteToFile | ( | std::string | directoryName, | |
std::string | baseResultsFilename, | |||
AbstractOdeSystem * | pOdeSystem, | |||
std::string | timeUnits, | |||
unsigned | stepsPerRow = 1 , |
|||
bool | cleanDirectory = true | |||
) |
Write the data to a file.
directoryName | the directory in which to write the data to file | |
baseResultsFilename | the name of the file in which to write the data | |
pOdeSystem | pointer to the ODE system solved to obtain these results (needed for state variable names and units) | |
timeUnits | name of the units of time used | |
stepsPerRow | the solution to the ODE system is written to file every this number of timesteps (defaults to 1) | |
cleanDirectory | whether to clean the directory (defaults to true) |
Definition at line 65 of file OdeSolution.cpp.
References mSolutions, mTimes, AbstractOdeSystem::rGetVariableNames(), and AbstractOdeSystem::rGetVariableUnits().
unsigned OdeSolution::mNumberOfTimeSteps [private] |
Variable for the number of timesteps.
Definition at line 46 of file OdeSolution.hpp.
Referenced by GetNumberOfTimeSteps(), and SetNumberOfTimeSteps().
std::vector<double> OdeSolution::mTimes [private] |
A vector of times at each timestep.
Definition at line 49 of file OdeSolution.hpp.
Referenced by rGetTimes(), SetNumberOfTimeSteps(), and WriteToFile().
std::vector<std::vector<double> > OdeSolution::mSolutions [private] |
Solutions for each variable at each timestep.
Definition at line 52 of file OdeSolution.hpp.
Referenced by GetVariableAtIndex(), rGetSolutions(), SetNumberOfTimeSteps(), and WriteToFile().