#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 () |
VECTOR | GetStateVariables () |
void | SetStateVariables (const VECTOR &rStateVariables) |
double | GetStateVariable (unsigned index) const |
double | GetStateVariable (const std::string &rName) const |
void | SetStateVariable (unsigned index, double newValue) |
void | SetStateVariable (const std::string &rName, double newValue) |
const std::vector< std::string > & | rGetStateVariableNames () const |
const std::vector< std::string > & | rGetStateVariableUnits () const |
unsigned | GetStateVariableIndex (const std::string &rName) const |
bool | HasStateVariable (const std::string &rName) const |
std::string | GetStateVariableUnits (unsigned index) const |
void | SetDefaultInitialConditions (const VECTOR &rInitialConditions) |
void | SetDefaultInitialCondition (unsigned index, double initialCondition) |
VECTOR | GetInitialConditions () const |
void | ResetToInitialConditions () |
unsigned | GetNumberOfParameters () const |
double | GetParameter (unsigned index) const |
double | GetParameter (const std::string &rName) 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 |
bool | HasParameter (const std::string &rName) const |
std::string | GetParameterUnits (unsigned index) const |
double | GetAnyVariable (unsigned index, double time=0.0, VECTOR *pDerivedQuantities=NULL) |
double | GetAnyVariable (const std::string &rName, double time=0.0, VECTOR *pDerivedQuantities=NULL) |
unsigned | GetAnyVariableIndex (const std::string &rName) const |
bool | HasAnyVariable (const std::string &rName) const |
void | SetAnyVariable (unsigned index, double value) |
void | SetAnyVariable (const std::string &rName, double value) |
std::string | GetAnyVariableUnits (unsigned index) const |
std::string | GetAnyVariableUnits (const std::string &rName) 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 |
bool | HasDerivedQuantity (const std::string &rName) const |
std::string | GetDerivedQuantityUnits (unsigned index) const |
unsigned | GetNumberOfAttributes () const |
bool | HasAttribute (const std::string &rName) const |
double | GetAttribute (const std::string &rName) 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 OdeSolution::CalculateDerivedQuantitiesAndParameters(), CvodeAdaptor::Solve(), and AbstractOneStepIvpOdeSolver::Solve().
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(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SolveCellSystems(), 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(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SolveCellSystems(), and AbstractOdeBasedCellCycleModel::UpdateCellCyclePhase().
VECTOR AbstractParameterisedSystem< VECTOR >::GetStateVariables | ( | ) | [inline] |
Get a copy of the state variable vector. Caller takes responsibility for freeing the vector (if required for the VECTOR type).
Definition at line 86 of file AbstractParameterisedSystem.cpp.
References CopyVector(), and AbstractParameterisedSystem< VECTOR >::mStateVariables.
void AbstractParameterisedSystem< VECTOR >::SetStateVariables | ( | const VECTOR & | rStateVariables | ) | [inline] |
Set the state variables equal to the values in the given vector.
rStateVariables | new values for the state variables |
Definition at line 92 of file AbstractParameterisedSystem.cpp.
References CreateVectorIfEmpty(), EXCEPTION, GetVectorComponent(), GetVectorSize(), AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables, AbstractParameterisedSystem< VECTOR >::mStateVariables, and SetVectorComponent().
Referenced by WntCellCycleModel::Initialise(), SingleOdeWntCellCycleModel::Initialise(), AbstractVanLeeuwen2009WntSwatCellCycleModel::Initialise(), TysonNovakCellCycleModel::Initialise(), Alarcon2004OxygenBasedCellCycleModel::Initialise(), TysonNovakCellCycleModel::ResetForDivision(), AbstractParameterisedSystem< VECTOR >::ResetToInitialConditions(), AbstractOdeBasedCellCycleModel::SetProteinConcentrationsForTestsOnly(), CellCycleModelOdeHandler::SetStateVariables(), and AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SolveCellSystems().
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 106 of file AbstractParameterisedSystem.cpp.
References EXCEPTION, GetVectorComponent(), AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables, and AbstractParameterisedSystem< VECTOR >::mStateVariables.
Referenced by AbstractParameterisedSystem< VECTOR >::GetStateVariable().
double AbstractParameterisedSystem< VECTOR >::GetStateVariable | ( | const std::string & | rName | ) | const [inline] |
Get the value of a given state variable.
rName | the name of the state variable |
Definition at line 116 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::GetStateVariable(), and AbstractParameterisedSystem< VECTOR >::GetStateVariableIndex().
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 122 of file AbstractParameterisedSystem.cpp.
References EXCEPTION, AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables, AbstractParameterisedSystem< VECTOR >::mStateVariables, and SetVectorComponent().
Referenced by AdaptiveBidomainProblem::InitializeSolutionOnAdaptedMesh(), and AbstractParameterisedSystem< VECTOR >::SetStateVariable().
void AbstractParameterisedSystem< VECTOR >::SetStateVariable | ( | const std::string & | rName, | |
double | newValue | |||
) | [inline] |
Set the value of a single state variable in the ODE system.
rName | name of the state variable to be set | |
newValue | new value of the state variable |
Definition at line 132 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::GetStateVariableIndex(), and AbstractParameterisedSystem< VECTOR >::SetStateVariable().
const std::vector< std::string > & AbstractParameterisedSystem< VECTOR >::rGetStateVariableNames | ( | ) | const [inline] |
Get the names of the state variables in the ODE system.
Definition at line 138 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by AdaptiveBidomainProblem::AddCurrentSolutionToAdaptiveMesh(), and AdaptiveBidomainProblem::InitializeSolutionOnAdaptedMesh().
const std::vector< std::string > & AbstractParameterisedSystem< VECTOR >::rGetStateVariableUnits | ( | ) | const [inline] |
Get the units of the state variables in the ODE system.
Definition at line 145 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 152 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by AbstractParameterisedSystem< VECTOR >::GetStateVariable(), and AbstractParameterisedSystem< VECTOR >::SetStateVariable().
bool AbstractParameterisedSystem< VECTOR >::HasStateVariable | ( | const std::string & | rName | ) | const [inline] |
This method is used to establish whether a state variable is in an ODE system. You can then safely call GetStateVariableIndex without a try...catch statement.
rName | the name of a state variable |
Definition at line 159 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 166 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
void AbstractParameterisedSystem< VECTOR >::SetDefaultInitialConditions | ( | const VECTOR & | rInitialConditions | ) | [inline] |
Set the default initial conditions for the system.
This method DOES NOT change the state variables of the object on which it is called.
rInitialConditions | vector containing initial values for the state variables |
Definition at line 177 of file AbstractParameterisedSystem.cpp.
References CopyToStdVector(), EXCEPTION, GetVectorSize(), AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables, and AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
void AbstractParameterisedSystem< VECTOR >::SetDefaultInitialCondition | ( | unsigned | index, | |
double | initialCondition | |||
) | [inline] |
Set a single component of the default initial conditions for the system.
This method DOES NOT change the state variables of the object on which it is called.
index | the index of the state variable in the system | |
initialCondition | the initial value for the state variable |
Definition at line 190 of file AbstractParameterisedSystem.cpp.
References EXCEPTION, AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables, and AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
VECTOR AbstractParameterisedSystem< VECTOR >::GetInitialConditions | ( | ) | const [inline] |
Get the default initial conditions for this system.
Definition at line 201 of file AbstractParameterisedSystem.cpp.
References CopyFromStdVector(), CreateVectorIfEmpty(), InitialiseEmptyVector(), AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables, and AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by WntCellCycleModel::Initialise(), SingleOdeWntCellCycleModel::Initialise(), AbstractVanLeeuwen2009WntSwatCellCycleModel::Initialise(), TysonNovakCellCycleModel::Initialise(), Alarcon2004OxygenBasedCellCycleModel::Initialise(), AbstractWntOdeBasedCellCycleModel::ResetForDivision(), TysonNovakCellCycleModel::ResetForDivision(), Alarcon2004OxygenBasedCellCycleModel::ResetForDivision(), and AbstractParameterisedSystem< VECTOR >::ResetToInitialConditions().
void AbstractParameterisedSystem< VECTOR >::ResetToInitialConditions | ( | ) | [inline] |
Reset the system's state variables to the default initial conditions.
Definition at line 212 of file AbstractParameterisedSystem.cpp.
References DeleteVector(), AbstractParameterisedSystem< VECTOR >::GetInitialConditions(), and AbstractParameterisedSystem< VECTOR >::SetStateVariables().
unsigned AbstractParameterisedSystem< VECTOR >::GetNumberOfParameters | ( | ) | const [inline] |
Get the number of parameters.
Definition at line 224 of file AbstractParameterisedSystem.cpp.
References GetVectorSize(), and AbstractParameterisedSystem< VECTOR >::mParameters.
Referenced by OdeSolution::rGetParameters().
double AbstractParameterisedSystem< VECTOR >::GetParameter | ( | unsigned | index | ) | const [inline] |
Get the value of a given parameter.
index | the index of the parameter |
Definition at line 230 of file AbstractParameterisedSystem.cpp.
References EXCEPTION, GetVectorComponent(), GetVectorSize(), and AbstractParameterisedSystem< VECTOR >::mParameters.
Referenced by AbstractParameterisedSystem< VECTOR >::GetParameter(), OdeSolution::rGetParameters(), and HeartConfigRelatedCellFactory< SPACE_DIM >::SetCellParameters().
double AbstractParameterisedSystem< VECTOR >::GetParameter | ( | const std::string & | rName | ) | const [inline] |
Get the value of a given parameter.
rName | the name of the parameter |
Definition at line 256 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::GetParameter(), and AbstractParameterisedSystem< VECTOR >::GetParameterIndex().
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 250 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 240 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 262 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 269 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 276 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by AbstractParameterisedSystem< VECTOR >::GetParameter(), HeartConfigRelatedCellFactory< SPACE_DIM >::SetCellParameters(), and AbstractParameterisedSystem< VECTOR >::SetParameter().
bool AbstractParameterisedSystem< VECTOR >::HasParameter | ( | const std::string & | rName | ) | const [inline] |
This method is used to establish whether a parameter is in an ODE system. You can then safely call GetParameterIndex without a try...catch statement.
rName | the name of a parameter |
Definition at line 283 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::SetCellParameters().
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 290 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 301 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 AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), and AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteExtraVariablesOneStep().
double AbstractParameterisedSystem< VECTOR >::GetAnyVariable | ( | const std::string & | rName, | |
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.
rName | the name of the variable, (this method is the same as doing GetAnyVariableIndex(rName) and then calling the method above). | |
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 338 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), and AbstractParameterisedSystem< VECTOR >::GetAnyVariableIndex().
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, GetAnyVariable, etc.
rName | the name of a variable |
Definition at line 346 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), AbstractParameterisedSystem< VECTOR >::GetAnyVariableUnits(), AbstractParameterisedSystem< VECTOR >::SetAnyVariable(), and AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteExtraVariablesOneStep().
bool AbstractParameterisedSystem< VECTOR >::HasAnyVariable | ( | const std::string & | rName | ) | const [inline] |
This method is used to establish whether a variable is in an ODE system's state vars, parameters or derived quantitites. You can then safely call GetAnyVariableIndex without a try...catch statement.
rName | the name of a variable |
Definition at line 353 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
void AbstractParameterisedSystem< VECTOR >::SetAnyVariable | ( | unsigned | index, | |
double | value | |||
) | [inline] |
Set the value of a variable, whether a state variable or parameter. Attempting to set the value of a derived quantity will raise an exception.
index | the index of the variable, as given by GetAnyVariableIndex. | |
value | the value to give the variable. |
Definition at line 360 of file AbstractParameterisedSystem.cpp.
References EXCEPTION, GetVectorSize(), AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables, AbstractParameterisedSystem< VECTOR >::mParameters, AbstractParameterisedSystem< VECTOR >::mStateVariables, and SetVectorComponent().
Referenced by AbstractParameterisedSystem< VECTOR >::SetAnyVariable().
void AbstractParameterisedSystem< VECTOR >::SetAnyVariable | ( | const std::string & | rName, | |
double | value | |||
) | [inline] |
Set the value of a variable, whether a state variable or parameter. Attempting to set the value of a derived quantity will raise an exception.
rName | the name of the variable. | |
value | the value to give the variable. |
Definition at line 377 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::GetAnyVariableIndex(), and AbstractParameterisedSystem< VECTOR >::SetAnyVariable().
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 383 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by AbstractParameterisedSystem< VECTOR >::GetAnyVariableUnits().
std::string AbstractParameterisedSystem< VECTOR >::GetAnyVariableUnits | ( | const std::string & | rName | ) | const [inline] |
Get the units of a variable, whether a state variable, parameter, or derived quantity, given its index as returned by GetAnyVariableIndex.
rName | the name of any variable in the model. |
Definition at line 390 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::GetAnyVariableIndex(), and AbstractParameterisedSystem< VECTOR >::GetAnyVariableUnits().
unsigned AbstractParameterisedSystem< VECTOR >::GetNumberOfDerivedQuantities | ( | ) | const [inline] |
Get the number of derived quantities.
Definition at line 400 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
Referenced by AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), and OdeSolution::rGetDerivedQuantities().
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 407 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 414 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 420 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 427 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 434 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
bool AbstractParameterisedSystem< VECTOR >::HasDerivedQuantity | ( | const std::string & | rName | ) | const [inline] |
This method is used to establish whether a derived quantity is in an ODE system. You can then safely call GetDerivedQuantityIndex without a try...catch statement.
rName | the name of a derived quantity |
Definition at line 441 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 448 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
unsigned AbstractParameterisedSystem< VECTOR >::GetNumberOfAttributes | ( | ) | const [inline] |
Return the number of named attributes that this system has.
Definition at line 456 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
bool AbstractParameterisedSystem< VECTOR >::HasAttribute | ( | const std::string & | rName | ) | const [inline] |
Test whether this system has a particular named attribute.
rName | the attribute name. |
Definition at line 463 of file AbstractParameterisedSystem.cpp.
References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.
double AbstractParameterisedSystem< VECTOR >::GetAttribute | ( | const std::string & | rName | ) | const [inline] |
Get the value of a named attribute.
rName | the attribute name. |
Definition at line 470 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 >::GetInitialConditions(), AbstractParameterisedSystem< VECTOR >::GetNumberOfStateVariables(), AbstractParameterisedSystem< VECTOR >::GetStateVariable(), AbstractParameterisedSystem< VECTOR >::SetAnyVariable(), AbstractParameterisedSystem< VECTOR >::SetDefaultInitialCondition(), AbstractParameterisedSystem< VECTOR >::SetDefaultInitialConditions(), AbstractParameterisedSystem< VECTOR >::SetStateVariable(), and AbstractParameterisedSystem< VECTOR >::SetStateVariables().
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 >::GetStateVariables(), AbstractParameterisedSystem< VECTOR >::rGetStateVariables(), AbstractParameterisedSystem< VECTOR >::SetAnyVariable(), AbstractParameterisedSystem< VECTOR >::SetStateVariable(), and AbstractParameterisedSystem< VECTOR >::SetStateVariables().
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(), AbstractParameterisedSystem< VECTOR >::SetAnyVariable(), 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 >::GetAttribute(), AbstractParameterisedSystem< VECTOR >::GetDerivedQuantityIndex(), AbstractParameterisedSystem< VECTOR >::GetDerivedQuantityUnits(), AbstractParameterisedSystem< VECTOR >::GetInitialConditions(), AbstractParameterisedSystem< VECTOR >::GetNumberOfAttributes(), AbstractParameterisedSystem< VECTOR >::GetNumberOfDerivedQuantities(), AbstractParameterisedSystem< VECTOR >::GetParameterIndex(), AbstractParameterisedSystem< VECTOR >::GetParameterUnits(), AbstractParameterisedSystem< VECTOR >::GetStateVariableIndex(), AbstractParameterisedSystem< VECTOR >::GetStateVariableUnits(), AbstractParameterisedSystem< VECTOR >::GetSystemInformation(), AbstractParameterisedSystem< VECTOR >::GetSystemName(), AbstractParameterisedSystem< VECTOR >::HasAnyVariable(), AbstractParameterisedSystem< VECTOR >::HasAttribute(), AbstractParameterisedSystem< VECTOR >::HasDerivedQuantity(), AbstractParameterisedSystem< VECTOR >::HasParameter(), AbstractParameterisedSystem< VECTOR >::HasStateVariable(), AbstractParameterisedSystem< VECTOR >::rGetDerivedQuantityNames(), AbstractParameterisedSystem< VECTOR >::rGetDerivedQuantityUnits(), AbstractParameterisedSystem< VECTOR >::rGetParameterNames(), AbstractParameterisedSystem< VECTOR >::rGetParameterUnits(), AbstractParameterisedSystem< VECTOR >::rGetStateVariableNames(), AbstractParameterisedSystem< VECTOR >::rGetStateVariableUnits(), AbstractParameterisedSystem< VECTOR >::SetDefaultInitialCondition(), and AbstractParameterisedSystem< VECTOR >::SetDefaultInitialConditions().