AbstractOdeSystem Class Reference

#include <AbstractOdeSystem.hpp>

Inheritance diagram for AbstractOdeSystem:

Inheritance graph
[legend]
Collaboration diagram for AbstractOdeSystem:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AbstractOdeSystem (unsigned numberOfStateVariables=0)
virtual ~AbstractOdeSystem ()
virtual void EvaluateYDerivatives (double time, const std::vector< double > &rY, std::vector< double > &rDY)=0
unsigned GetNumberOfStateVariables () const
void SetInitialConditions (const std::vector< double > &rInitialConditions)
void SetInitialConditionsComponent (unsigned index, double initialCondition)
std::vector< double > GetInitialConditions () const
void SetStateVariables (const std::vector< double > &rStateVariables)
std::vector< double > & rGetStateVariables ()
std::vector< std::string > & rGetVariableNames ()
std::vector< std::string > & rGetVariableUnits ()
virtual bool CalculateStoppingEvent (double time, const std::vector< double > &rY)
virtual double CalculateRootFunction (double time, const std::vector< double > &rY)
bool GetUseAnalytic ()
unsigned GetStateVariableNumberByName (const std::string name)
double GetStateVariableValueByNumber (unsigned varNumber) const
std::string GetStateVariableUnitsByNumber (unsigned varNumber) const

Protected Member Functions

std::string DumpState (const std::string &message, std::vector< double > Y=std::vector< double >())

Protected Attributes

unsigned mNumberOfStateVariables
std::vector< double > mStateVariables
boost::shared_ptr
< AbstractOdeSystemInformation
mpSystemInfo
bool mUseAnalytic
 Whether to use an analytic Jacobian.

Friends

class TestAbstractOdeSystem


Detailed Description

Abstract OdeSystem class. Sets up variables and functions for a general ODE system.

Definition at line 46 of file AbstractOdeSystem.hpp.


Constructor & Destructor Documentation

AbstractOdeSystem::AbstractOdeSystem ( unsigned  numberOfStateVariables = 0  ) 

Constructor for an ODE system.

Parameters:
numberOfStateVariables how many ODEs make up the system

Definition at line 32 of file AbstractOdeSystem.cpp.

References mUseAnalytic.

AbstractOdeSystem::~AbstractOdeSystem (  )  [virtual]

Virtual destructor since we have virtual methods.

Definition at line 38 of file AbstractOdeSystem.cpp.


Member Function Documentation

virtual void AbstractOdeSystem::EvaluateYDerivatives ( double  time,
const std::vector< double > &  rY,
std::vector< double > &  rDY 
) [pure virtual]

bool AbstractOdeSystem::CalculateStoppingEvent ( double  time,
const std::vector< double > &  rY 
) [virtual]

CalculateStoppingEvent() - can be overloaded if the ODE is to be solved only until a particular event (for example, only until the y value becomes negative.

After each timestep the solver will call this method on the ODE to see if it should stop there. By default, false is returned here.

Reimplemented in IngeWntSwatCellCycleOdeSystem, TysonNovak2001OdeSystem, and WntCellCycleOdeSystem.

Definition at line 42 of file AbstractOdeSystem.cpp.

Referenced by CalculateRootFunction(), RungeKuttaFehlbergIvpOdeSolver::InternalSolve(), AbstractOneStepIvpOdeSolver::InternalSolve(), RungeKuttaFehlbergIvpOdeSolver::Solve(), and AbstractOneStepIvpOdeSolver::Solve().

virtual double AbstractOdeSystem::CalculateRootFunction ( double  time,
const std::vector< double > &  rY 
) [inline, virtual]

An alternative approach to stopping events; currently only useful with CVODE. CVODE can search for roots (zeros) of this function while solving the ODE system, and home in on them to find sign transitions to high precision.

The default implementation here fakes a root function using CalculateStoppingEvent.

Reimplemented in IngeWntSwatCellCycleOdeSystem, TysonNovak2001OdeSystem, and WntCellCycleOdeSystem.

Definition at line 164 of file AbstractOdeSystem.hpp.

References CalculateStoppingEvent().

unsigned AbstractOdeSystem::GetStateVariableNumberByName ( const std::string  name  )  [inline]

This method is used to establish a state varible's position within the vector of state variables of an ODE system. This number can then be used with the methods GetStateVariableValueByNumber and GetStateVariableUnitsByNumber.

Parameters:
name The name of a state variable.
Returns:
The state variable's position within the vector of state variables associated with the ODE system.

Definition at line 186 of file AbstractOdeSystem.hpp.

References mpSystemInfo.

double AbstractOdeSystem::GetStateVariableValueByNumber ( unsigned  varNumber  )  const [inline]

Parameters:
varNumber A state variable's position within the vector of state variables associated with the ODE system.
Returns:
The current value of the state variable.

Definition at line 197 of file AbstractOdeSystem.hpp.

std::string AbstractOdeSystem::GetStateVariableUnitsByNumber ( unsigned  varNumber  )  const [inline]

Parameters:
varNumber A state variable's position within the vector of state variables associated with the ODE system.
Returns:
The units of the state variable.

Definition at line 208 of file AbstractOdeSystem.hpp.

References mpSystemInfo.

std::string AbstractOdeSystem::DumpState ( const std::string &  message,
std::vector< double >  Y = std::vector<double>() 
) [protected]

Used to include extra debugging information in exception messages. For example, EXCEPTION(DumpState("Gating variable out of range"));

Definition at line 47 of file AbstractOdeSystem.cpp.

Referenced by FoxModel2002Modified::EvaluateYDerivatives(), TenTusscher2006OdeSystem::VerifyStateVariables(), LuoRudyIModel1991OdeSystem::VerifyStateVariables(), and DiFrancescoNoble1985OdeSystem::VerifyStateVariables().


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Wed Mar 18 12:52:09 2009 for Chaste by  doxygen 1.5.5