#include <AbstractParameterisedSystem.hpp>
Public Member Functions | |
AbstractParameterisedSystem (unsigned numberOfStateVariables) | |
virtual | ~AbstractParameterisedSystem () |
boost::shared_ptr< const AbstractOdeSystemInformation > | GetSystemInformation () const |
std::string | GetSystemName () const |
unsigned | GetNumberOfStateVariables () const |
VECTOR & | rGetStateVariables () |
double | GetStateVariable (unsigned index) const |
void | SetStateVariable (unsigned index, double newValue) |
const std::vector< std::string > & | rGetStateVariableNames () const |
const std::vector< std::string > & | rGetStateVariableUnits () const |
unsigned | GetStateVariableIndex (const std::string &rName) const |
std::string | GetStateVariableUnits (unsigned index) const |
unsigned | GetNumberOfParameters () const |
double | GetParameter (unsigned index) const |
void | SetParameter (const std::string &rName, double value) |
void | SetParameter (unsigned index, double value) |
const std::vector< std::string > & | rGetParameterNames () const |
const std::vector< std::string > & | rGetParameterUnits () const |
unsigned | GetParameterIndex (const std::string &rName) const |
std::string | GetParameterUnits (unsigned index) const |
double | GetAnyVariable (unsigned index, double time=0.0, VECTOR *pDerivedQuantities=NULL) |
unsigned | GetAnyVariableIndex (const std::string &rName) const |
std::string | GetAnyVariableUnits (unsigned index) const |
unsigned | GetNumberOfDerivedQuantities () const |
virtual VECTOR | ComputeDerivedQuantities (double time, const VECTOR &rState) |
VECTOR | ComputeDerivedQuantitiesFromCurrentState (double time) |
const std::vector< std::string > & | rGetDerivedQuantityNames () const |
const std::vector< std::string > & | rGetDerivedQuantityUnits () const |
unsigned | GetDerivedQuantityIndex (const std::string &rName) const |
std::string | GetDerivedQuantityUnits (unsigned index) const |
Protected Attributes | |
unsigned | mNumberOfStateVariables |
VECTOR | mStateVariables |
VECTOR | mParameters |
boost::shared_ptr < AbstractOdeSystemInformation > | mpSystemInfo |
Its main purpose is to be a common base class for both AbstractOdeSystem and AbstractCvodeCell, which require similar functionality but use different vector types.
Definition at line 49 of file AbstractParameterisedSystem.hpp.
AbstractParameterisedSystem< VECTOR >::AbstractParameterisedSystem | ( | unsigned | numberOfStateVariables | ) | [inline] |
Constructor.
numberOfStateVariables | the number of state variables in the ODE system |
Definition at line 42 of file AbstractParameterisedSystem.cpp.
References InitialiseEmptyVector(), AbstractParameterisedSystem< VECTOR >::mParameters, and AbstractParameterisedSystem< VECTOR >::mStateVariables.
AbstractParameterisedSystem< VECTOR >::~AbstractParameterisedSystem | ( | ) | [inline, virtual] |
Virtual destructor.
Definition at line 50 of file AbstractParameterisedSystem.cpp.
boost::shared_ptr< const AbstractOdeSystemInformation > AbstractParameterisedSystem< VECTOR >::GetSystemInformation | ( | ) | const [inline] |
Get the object which provides information about this ODE system.
Definition at line 55 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by CvodeAdaptor::Solve(), AbstractOneStepIvpOdeSolver::Solve(), and OdeSolution::WriteToFile().
std::string AbstractParameterisedSystem< VECTOR >::GetSystemName | ( | ) | const [inline] |
Get the name of this system.
Definition at line 63 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
unsigned AbstractParameterisedSystem< VECTOR >::GetNumberOfStateVariables | ( | ) | const [inline] |
Get the number of state variables in the ODE system.
Definition at line 74 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables.
Referenced by RungeKuttaFehlbergIvpOdeSolver::CalculateNextYValue(), RungeKutta4IvpOdeSolver::CalculateNextYValue(), RungeKutta2IvpOdeSolver::CalculateNextYValue(), HeunIvpOdeSolver::CalculateNextYValue(), EulerIvpOdeSolver::CalculateNextYValue(), BackwardEulerIvpOdeSolver::CalculateNextYValue(), RungeKuttaFehlbergIvpOdeSolver::InternalSolve(), CvodeAdaptor::SetupCvode(), RungeKuttaFehlbergIvpOdeSolver::Solve(), AbstractOneStepIvpOdeSolver::Solve(), AbstractIvpOdeSolver::SolveAndUpdateStateVariable(), and AbstractOdeBasedCellCycleModel::UpdateCellCyclePhase().
VECTOR & AbstractParameterisedSystem< VECTOR >::rGetStateVariables | ( | ) | [inline] |
Get the values of the state variables in the ODE system.
Definition at line 80 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mStateVariables.
Referenced by WntCellCycleModel::AdjustOdeParameters(), SingleOdeWntCellCycleModel::AdjustOdeParameters(), AbstractVanLeeuwen2009WntSwatCellCycleModel::AdjustOdeParameters(), Alarcon2004OxygenBasedCellCycleModel::AdjustOdeParameters(), WntCellCycleModel::ChangeCellProliferativeTypeDueToCurrentBetaCateninLevel(), AbstractVanLeeuwen2009WntSwatCellCycleModel::ChangeCellProliferativeTypeDueToCurrentBetaCateninLevel(), WntCellCycleModel::CreateCellCycleModel(), VanLeeuwen2009WntSwatCellCycleModelHypothesisTwo::CreateCellCycleModel(), VanLeeuwen2009WntSwatCellCycleModelHypothesisOne::CreateCellCycleModel(), StochasticWntCellCycleModel::CreateCellCycleModel(), SingleOdeWntCellCycleModel::CreateCellCycleModel(), TysonNovakCellCycleModel::CreateCellCycleModel(), Alarcon2004OxygenBasedCellCycleModel::CreateCellCycleModel(), SingleOdeWntCellCycleModel::GetBetaCateninConcentration(), AbstractVanLeeuwen2009WntSwatCellCycleModel::GetCytoplasmicBetaCateninLevel(), AbstractVanLeeuwen2009WntSwatCellCycleModel::GetMembraneBoundBetaCateninLevel(), AbstractVanLeeuwen2009WntSwatCellCycleModel::GetNuclearBetaCateninLevel(), AbstractOdeBasedCellCycleModel::GetProteinConcentrations(), AbstractWntOdeBasedCellCycleModel::ResetForDivision(), TysonNovakCellCycleModel::ResetForDivision(), Alarcon2004OxygenBasedCellCycleModel::ResetForDivision(), AbstractOdeBasedCellCycleModel::SetProteinConcentrationsForTestsOnly(), AbstractIvpOdeSolver::SolveAndUpdateStateVariable(), and AbstractOdeBasedCellCycleModel::UpdateCellCyclePhase().
double AbstractParameterisedSystem< VECTOR >::GetStateVariable | ( | unsigned | index | ) | const [inline] |
Get the value of a given state variable.
index | the index of the state variable |
Definition at line 86 of file AbstractParameterisedSystem.cpp.
References EXCEPTION, GetVectorComponent(), AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables, and AbstractParameterisedSystem< VECTOR >::mStateVariables.
void AbstractParameterisedSystem< VECTOR >::SetStateVariable | ( | unsigned | index, | |
double | newValue | |||
) | [inline] |
Set the value of a single state variable in the ODE system.
index | index of the state variable to be set | |
newValue | new value of the state variable |
Definition at line 96 of file AbstractParameterisedSystem.cpp.
References EXCEPTION, AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables, AbstractParameterisedSystem< VECTOR >::mStateVariables, and SetVectorComponent().
const std::vector< std::string > & AbstractParameterisedSystem< VECTOR >::rGetStateVariableNames | ( | ) | const [inline] |
Get the names of the state variables in the ODE system.
Definition at line 106 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
const std::vector< std::string > & AbstractParameterisedSystem< VECTOR >::rGetStateVariableUnits | ( | ) | const [inline] |
Get the units of the state variables in the ODE system.
Definition at line 113 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
unsigned AbstractParameterisedSystem< VECTOR >::GetStateVariableIndex | ( | const std::string & | rName | ) | const [inline] |
This method is used to establish a state variable's position within the vector of state variables of an ODE system. This number can then be used with the methods GetStateVariable and GetStateVariableUnits.
rName | the name of a state variable. |
Definition at line 120 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
std::string AbstractParameterisedSystem< VECTOR >::GetStateVariableUnits | ( | unsigned | index | ) | const [inline] |
Get the units of a state variable given its index in the ODE system.
index | a state variable's position within the vector of state variables associated with the ODE system. |
Definition at line 127 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
unsigned AbstractParameterisedSystem< VECTOR >::GetNumberOfParameters | ( | ) | const [inline] |
Get the number of parameters.
Definition at line 138 of file AbstractParameterisedSystem.cpp.
References GetVectorSize(), and AbstractParameterisedSystem< VECTOR >::mParameters.
double AbstractParameterisedSystem< VECTOR >::GetParameter | ( | unsigned | index | ) | const [inline] |
Get the value of a given parameter.
index | the index of the parameter |
Definition at line 144 of file AbstractParameterisedSystem.cpp.
References EXCEPTION, GetVectorComponent(), GetVectorSize(), and AbstractParameterisedSystem< VECTOR >::mParameters.
void AbstractParameterisedSystem< VECTOR >::SetParameter | ( | const std::string & | rName, | |
double | value | |||
) | [inline] |
Set the value of a given parameter.
rName | the name of the parameter | |
value | the value |
Definition at line 164 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::GetParameterIndex(), AbstractParameterisedSystem< VECTOR >::mParameters, and SetVectorComponent().
Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::SetCellParameters().
void AbstractParameterisedSystem< VECTOR >::SetParameter | ( | unsigned | index, | |
double | value | |||
) | [inline] |
Set the value of a given parameter.
index | the index of the parameter | |
value | the value |
Definition at line 154 of file AbstractParameterisedSystem.cpp.
References EXCEPTION, GetVectorSize(), AbstractParameterisedSystem< VECTOR >::mParameters, and SetVectorComponent().
const std::vector< std::string > & AbstractParameterisedSystem< VECTOR >::rGetParameterNames | ( | ) | const [inline] |
Get the names of the parameters in the ODE system.
Definition at line 170 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
const std::vector< std::string > & AbstractParameterisedSystem< VECTOR >::rGetParameterUnits | ( | ) | const [inline] |
Get the units of the parameters in the ODE system.
Definition at line 177 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
unsigned AbstractParameterisedSystem< VECTOR >::GetParameterIndex | ( | const std::string & | rName | ) | const [inline] |
This method is used to establish a parameter's position within the vector of parameters of an ODE system. This number can then be used with the methods GetParameterUnits and GetParameter.
rName | the name of a parameter |
Definition at line 184 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::SetCellParameters(), and AbstractParameterisedSystem< VECTOR >::SetParameter().
std::string AbstractParameterisedSystem< VECTOR >::GetParameterUnits | ( | unsigned | index | ) | const [inline] |
Get the units of a parameter given its index in the ODE system.
index | a state variable's position within the vector of state variables associated with the ODE system. |
Definition at line 191 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
double AbstractParameterisedSystem< VECTOR >::GetAnyVariable | ( | unsigned | index, | |
double | time = 0.0 , |
|||
VECTOR * | pDerivedQuantities = NULL | |||
) | [inline] |
Get the value of a variable, whether a state variable, parameter, or derived quantity.
Note that if the variable is a derived quantity, this method will compute all derived quantities, so may not be very efficient. To avoid this, pass a pre-computed vector of derived quantities as the optional third argument.
index | the index of the variable, as given by GetAnyVariableIndex. | |
time | the current simulation time, possibly needed if the variable is a derived quantity. | |
pDerivedQuantities | optional vector of pre-computed derived quantity values. |
Definition at line 202 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::ComputeDerivedQuantitiesFromCurrentState(), DeleteVector(), EXCEPTION, AbstractParameterisedSystem< VECTOR >::GetNumberOfDerivedQuantities(), GetVectorComponent(), GetVectorSize(), AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables, AbstractParameterisedSystem< VECTOR >::mParameters, and AbstractParameterisedSystem< VECTOR >::mStateVariables.
Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteExtraVariablesOneStep().
unsigned AbstractParameterisedSystem< VECTOR >::GetAnyVariableIndex | ( | const std::string & | rName | ) | const [inline] |
Get the index of a variable, whether a state variable, parameter, or derived quantity, with the given name. The returned index is suitable for use with GetAnyVariableUnits and GetAnyVariable.
rName | the name of a variable |
Definition at line 239 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteExtraVariablesOneStep().
std::string AbstractParameterisedSystem< VECTOR >::GetAnyVariableUnits | ( | unsigned | index | ) | const [inline] |
Get the units of a variable, whether a state variable, parameter, or derived quantity, given its index as returned by GetAnyVariableIndex.
index | an index from GetAnyVariableIndex. |
Definition at line 246 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
unsigned AbstractParameterisedSystem< VECTOR >::GetNumberOfDerivedQuantities | ( | ) | const [inline] |
Get the number of derived quantities.
Definition at line 257 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), OdeSolution::rGetDerivedQuantities(), and OdeSolution::WriteToFile().
VECTOR AbstractParameterisedSystem< VECTOR >::ComputeDerivedQuantities | ( | double | time, | |
const VECTOR & | rState | |||
) | [inline, virtual] |
Compute the derived quantities from the given system state. Uses the current values for the parameters.
time | the time at which to compute the derived quantities | |
rState | values for the state variables |
Definition at line 264 of file AbstractParameterisedSystem.cpp.
References EXCEPTION.
Referenced by AbstractParameterisedSystem< VECTOR >::ComputeDerivedQuantitiesFromCurrentState(), and OdeSolution::rGetDerivedQuantities().
VECTOR AbstractParameterisedSystem< VECTOR >::ComputeDerivedQuantitiesFromCurrentState | ( | double | time | ) | [inline] |
Compute the derived quantities based on the current system state.
time | the time at which to compute the derived quantities |
Definition at line 271 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::ComputeDerivedQuantities(), and AbstractParameterisedSystem< VECTOR >::mStateVariables.
Referenced by AbstractParameterisedSystem< VECTOR >::GetAnyVariable().
const std::vector< std::string > & AbstractParameterisedSystem< VECTOR >::rGetDerivedQuantityNames | ( | ) | const [inline] |
Get the vector of derived quantity names.
Definition at line 277 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
const std::vector< std::string > & AbstractParameterisedSystem< VECTOR >::rGetDerivedQuantityUnits | ( | ) | const [inline] |
Get the vector of derived quantity units.
Definition at line 284 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
unsigned AbstractParameterisedSystem< VECTOR >::GetDerivedQuantityIndex | ( | const std::string & | rName | ) | const [inline] |
Get the index of a derived quantity, given its name.
rName | the name of a derived quantity. |
Definition at line 291 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
std::string AbstractParameterisedSystem< VECTOR >::GetDerivedQuantityUnits | ( | unsigned | index | ) | const [inline] |
Get the units of a derived quantity.
index | an index from GetDerivedQuantityIndex. |
Definition at line 298 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
unsigned AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables [protected] |
The number of state variables in the system.
Definition at line 53 of file AbstractParameterisedSystem.hpp.
Referenced by AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), AbstractParameterisedSystem< VECTOR >::GetNumberOfStateVariables(), AbstractParameterisedSystem< VECTOR >::GetStateVariable(), and AbstractParameterisedSystem< VECTOR >::SetStateVariable().
VECTOR AbstractParameterisedSystem< VECTOR >::mStateVariables [protected] |
Vector containing the current values of the state variables.
Definition at line 56 of file AbstractParameterisedSystem.hpp.
Referenced by AbstractParameterisedSystem< VECTOR >::AbstractParameterisedSystem(), AbstractParameterisedSystem< VECTOR >::ComputeDerivedQuantitiesFromCurrentState(), AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), AbstractParameterisedSystem< VECTOR >::GetStateVariable(), AbstractParameterisedSystem< VECTOR >::rGetStateVariables(), and AbstractParameterisedSystem< VECTOR >::SetStateVariable().
VECTOR AbstractParameterisedSystem< VECTOR >::mParameters [protected] |
Vector containing parameter values.
Definition at line 59 of file AbstractParameterisedSystem.hpp.
Referenced by AbstractParameterisedSystem< VECTOR >::AbstractParameterisedSystem(), AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), AbstractParameterisedSystem< VECTOR >::GetNumberOfParameters(), AbstractParameterisedSystem< VECTOR >::GetParameter(), and AbstractParameterisedSystem< VECTOR >::SetParameter().
boost::shared_ptr<AbstractOdeSystemInformation> AbstractParameterisedSystem< VECTOR >::mpSystemInfo [protected] |
Information about the concrete ODE system class.
Subclasses need to set this in their constructor to point to an instance of a suitable class. See for example the OdeSystemInformation class.
Definition at line 67 of file AbstractParameterisedSystem.hpp.
Referenced by AbstractParameterisedSystem< VECTOR >::GetAnyVariableIndex(), AbstractParameterisedSystem< VECTOR >::GetAnyVariableUnits(), AbstractParameterisedSystem< VECTOR >::GetDerivedQuantityIndex(), AbstractParameterisedSystem< VECTOR >::GetDerivedQuantityUnits(), AbstractParameterisedSystem< VECTOR >::GetNumberOfDerivedQuantities(), AbstractParameterisedSystem< VECTOR >::GetParameterIndex(), AbstractParameterisedSystem< VECTOR >::GetParameterUnits(), AbstractParameterisedSystem< VECTOR >::GetStateVariableIndex(), AbstractParameterisedSystem< VECTOR >::GetStateVariableUnits(), AbstractParameterisedSystem< VECTOR >::GetSystemInformation(), AbstractParameterisedSystem< VECTOR >::GetSystemName(), AbstractParameterisedSystem< VECTOR >::rGetDerivedQuantityNames(), AbstractParameterisedSystem< VECTOR >::rGetDerivedQuantityUnits(), AbstractParameterisedSystem< VECTOR >::rGetParameterNames(), AbstractParameterisedSystem< VECTOR >::rGetParameterUnits(), AbstractParameterisedSystem< VECTOR >::rGetStateVariableNames(), and AbstractParameterisedSystem< VECTOR >::rGetStateVariableUnits().