#include <AbstractIvpOdeSolver.hpp>
Inherited by AbstractOneStepIvpOdeSolver, and RungeKuttaFehlbergIvpOdeSolver.
Public Member Functions | |
virtual OdeSolution | Solve (AbstractOdeSystem *pAbstractOdeSystem, std::vector< double > &rYValues, double startTime, double endTime, double timeStep, double timeSampling)=0 |
virtual void | Solve (AbstractOdeSystem *pAbstractOdeSystem, std::vector< double > &rYValues, double startTime, double endTime, double timeStep)=0 |
virtual void | SolveAndUpdateStateVariable (AbstractOdeSystem *pAbstractOdeSystem, double startTime, double endTime, double timeStep) |
bool | StoppingEventOccurred () |
double | GetStoppingTime () |
AbstractIvpOdeSolver () | |
virtual | ~AbstractIvpOdeSolver () |
Protected Attributes | |
bool | mStoppingEventOccurred |
double | mStoppingTime |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | boost::serialization::access |
Abstract initial value problem ODE solver class. Sets up variables and functions for a numerical solution technique for an initial value ODE problem.
Definition at line 42 of file AbstractIvpOdeSolver.hpp.
AbstractIvpOdeSolver::AbstractIvpOdeSolver | ( | ) |
Constructor.
Definition at line 32 of file AbstractIvpOdeSolver.cpp.
AbstractIvpOdeSolver::~AbstractIvpOdeSolver | ( | ) | [virtual] |
Virtual destructor since we have virtual methods.
Definition at line 38 of file AbstractIvpOdeSolver.cpp.
double AbstractIvpOdeSolver::GetStoppingTime | ( | ) |
Get the stopping time for the solver.
Definition at line 60 of file AbstractIvpOdeSolver.cpp.
References mStoppingTime.
Referenced by TysonNovakCellCycleModel::GetOdeStopTime(), and AbstractWntOdeBasedCellCycleModel::GetOdeStopTime().
void AbstractIvpOdeSolver::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive the member variables.
archive | the archive | |
version | the current version of this class |
Reimplemented in AbstractOneStepIvpOdeSolver, BackwardEulerIvpOdeSolver, EulerIvpOdeSolver, HeunIvpOdeSolver, MockEulerIvpOdeSolver, RungeKutta2IvpOdeSolver, RungeKutta4IvpOdeSolver, and RungeKuttaFehlbergIvpOdeSolver.
Definition at line 53 of file AbstractIvpOdeSolver.hpp.
References mStoppingEventOccurred, and mStoppingTime.
virtual void AbstractIvpOdeSolver::Solve | ( | AbstractOdeSystem * | pAbstractOdeSystem, | |
std::vector< double > & | rYValues, | |||
double | startTime, | |||
double | endTime, | |||
double | timeStep | |||
) | [pure virtual] |
Second version of Solve. Solves a system of ODEs using a specified one-step ODE solver. This method does not return the solution and therefore does not take in a sampling time. Instead, the mStateVariables component in the ODE system object is updated.
pAbstractOdeSystem | pointer to the concrete ODE system to be solved | |
rYValues | a standard vector specifying the intial condition of each solution variable in the system (this can be the initial conditions vector stored in the ODE system) | |
startTime | the time at which the initial conditions are specified | |
endTime | the time to which the system should be solved and the solution returned | |
timeStep | the time interval to be used by the solver |
Implemented in AbstractOneStepIvpOdeSolver, and RungeKuttaFehlbergIvpOdeSolver.
virtual OdeSolution AbstractIvpOdeSolver::Solve | ( | AbstractOdeSystem * | pAbstractOdeSystem, | |
std::vector< double > & | rYValues, | |||
double | startTime, | |||
double | endTime, | |||
double | timeStep, | |||
double | timeSampling | |||
) | [pure virtual] |
Solves a system of ODEs using a specified one-step ODE solver and returns the solution as an OdeSolution object.
pAbstractOdeSystem | pointer to the concrete ODE system to be solved | |
rYValues | a standard vector specifying the intial condition of each solution variable in the system (this can be the initial conditions vector stored in the ODE system) | |
startTime | the time at which the initial conditions are specified | |
endTime | the time to which the system should be solved and the solution returned | |
timeStep | the time interval to be used by the solver | |
timeSampling | the interval at which to sample the solution to the ODE system |
Implemented in AbstractOneStepIvpOdeSolver, and RungeKuttaFehlbergIvpOdeSolver.
Referenced by SolveAndUpdateStateVariable().
void AbstractIvpOdeSolver::SolveAndUpdateStateVariable | ( | AbstractOdeSystem * | pAbstractOdeSystem, | |
double | startTime, | |||
double | endTime, | |||
double | timeStep | |||
) | [virtual] |
Solves a system of ODEs using a specified one-step ODE solver and update the state variables.
pAbstractOdeSystem | pointer to the concrete ODE system to be solved | |
startTime | the time at which the initial conditions are specified | |
endTime | the time to which the system should be solved and the solution returned | |
timeStep | the time interval to be used by the solver |
Definition at line 42 of file AbstractIvpOdeSolver.cpp.
References AbstractOdeSystem::GetNumberOfStateVariables(), AbstractOdeSystem::rGetStateVariables(), and Solve().
Referenced by AbstractOdeBasedContractionModel::RunAndUpdate(), TysonNovakCellCycleModel::SolveOdeToTime(), WntCellCycleModel::SolveOdeToTime(), AbstractVanLeeuwen2009WntSwatCellCycleModel::SolveOdeToTime(), and SingleOdeWntCellCycleModel::UpdateBetaCateninLevel().
bool AbstractIvpOdeSolver::StoppingEventOccurred | ( | ) |
Determine whether the solver quit due to the ODE's stopping event triggering
Definition at line 55 of file AbstractIvpOdeSolver.cpp.
References mStoppingEventOccurred.
Referenced by TysonNovakCellCycleModel::GetOdeStopTime(), AbstractWntOdeBasedCellCycleModel::GetOdeStopTime(), TysonNovakCellCycleModel::SolveOdeToTime(), WntCellCycleModel::SolveOdeToTime(), and AbstractVanLeeuwen2009WntSwatCellCycleModel::SolveOdeToTime().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented in AbstractOneStepIvpOdeSolver, BackwardEulerIvpOdeSolver, EulerIvpOdeSolver, HeunIvpOdeSolver, MockEulerIvpOdeSolver, RungeKutta2IvpOdeSolver, RungeKutta4IvpOdeSolver, and RungeKuttaFehlbergIvpOdeSolver.
Definition at line 45 of file AbstractIvpOdeSolver.hpp.
bool AbstractIvpOdeSolver::mStoppingEventOccurred [protected] |
Boolean indicating whether the solver quit due to the ODEs stopping event occuring
Definition at line 65 of file AbstractIvpOdeSolver.hpp.
Referenced by RungeKuttaFehlbergIvpOdeSolver::InternalSolve(), AbstractOneStepIvpOdeSolver::InternalSolve(), serialize(), RungeKuttaFehlbergIvpOdeSolver::Solve(), AbstractOneStepIvpOdeSolver::Solve(), and StoppingEventOccurred().
double AbstractIvpOdeSolver::mStoppingTime [protected] |
If a stopping event occurred the time is stored here. (Only valid when mStoppingEventOccurred==true)
Definition at line 68 of file AbstractIvpOdeSolver.hpp.
Referenced by GetStoppingTime(), RungeKuttaFehlbergIvpOdeSolver::InternalSolve(), AbstractOneStepIvpOdeSolver::InternalSolve(), serialize(), and AbstractOneStepIvpOdeSolver::Solve().