AbstractParameterisedSystem< VECTOR > Class Template Reference

#include <AbstractParameterisedSystem.hpp>

Inheritance diagram for AbstractParameterisedSystem< VECTOR >:

Inheritance graph
[legend]
Collaboration diagram for AbstractParameterisedSystem< VECTOR >:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

template<typename VECTOR>
class AbstractParameterisedSystem< VECTOR >

This class contains the state variable and parameter vectors for an ODE system, along with methods to access these. It also holds the AbstractOdeSystemInformation pointer, and methods to access this object to provide information about the ODE system, such as state variable/parameter names and units.

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.


Constructor & Destructor Documentation

template<typename VECTOR>
AbstractParameterisedSystem< VECTOR >::AbstractParameterisedSystem ( unsigned  numberOfStateVariables  )  [inline]

Constructor.

Parameters:
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.

template<typename VECTOR>
AbstractParameterisedSystem< VECTOR >::~AbstractParameterisedSystem (  )  [inline, virtual]

Virtual destructor.

Definition at line 50 of file AbstractParameterisedSystem.cpp.


Member Function Documentation

template<typename VECTOR>
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().

template<typename VECTOR>
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.

template<typename VECTOR>
unsigned AbstractParameterisedSystem< VECTOR >::GetNumberOfStateVariables (  )  const [inline]

template<typename VECTOR>
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().

template<typename VECTOR>
double AbstractParameterisedSystem< VECTOR >::GetStateVariable ( unsigned  index  )  const [inline]

Get the value of a given state variable.

Parameters:
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.

template<typename VECTOR>
void AbstractParameterisedSystem< VECTOR >::SetStateVariable ( unsigned  index,
double  newValue 
) [inline]

Set the value of a single state variable in the ODE system.

Parameters:
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().

template<typename VECTOR>
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.

template<typename VECTOR>
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.

template<typename VECTOR>
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.

Parameters:
rName 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 120 of file AbstractParameterisedSystem.cpp.

References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.

template<typename VECTOR>
std::string AbstractParameterisedSystem< VECTOR >::GetStateVariableUnits ( unsigned  index  )  const [inline]

Get the units of a state variable given its index in the ODE system.

Parameters:
index 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 127 of file AbstractParameterisedSystem.cpp.

References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.

template<typename VECTOR>
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.

template<typename VECTOR>
double AbstractParameterisedSystem< VECTOR >::GetParameter ( unsigned  index  )  const [inline]

Get the value of a given parameter.

Parameters:
index the index of the parameter

Definition at line 144 of file AbstractParameterisedSystem.cpp.

References EXCEPTION, GetVectorComponent(), GetVectorSize(), and AbstractParameterisedSystem< VECTOR >::mParameters.

template<typename VECTOR>
void AbstractParameterisedSystem< VECTOR >::SetParameter ( const std::string &  rName,
double  value 
) [inline]

Set the value of a given parameter.

Parameters:
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().

template<typename VECTOR>
void AbstractParameterisedSystem< VECTOR >::SetParameter ( unsigned  index,
double  value 
) [inline]

Set the value of a given parameter.

Parameters:
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().

template<typename VECTOR>
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.

template<typename VECTOR>
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.

template<typename VECTOR>
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.

Parameters:
rName the name of a parameter
Returns:
the parameter's position within the vector of parameters associated with the ODE system.

Definition at line 184 of file AbstractParameterisedSystem.cpp.

References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.

Referenced by HeartConfigRelatedCellFactory< SPACE_DIM >::SetCellParameters(), and AbstractParameterisedSystem< VECTOR >::SetParameter().

template<typename VECTOR>
std::string AbstractParameterisedSystem< VECTOR >::GetParameterUnits ( unsigned  index  )  const [inline]

Get the units of a parameter given its index in the ODE system.

Parameters:
index 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 191 of file AbstractParameterisedSystem.cpp.

References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.

template<typename VECTOR>
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.

Parameters:
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().

template<typename VECTOR>
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.

Parameters:
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().

template<typename VECTOR>
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.

Parameters:
index an index from GetAnyVariableIndex.
Returns:
the units of the variable.

Definition at line 246 of file AbstractParameterisedSystem.cpp.

References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.

template<typename VECTOR>
unsigned AbstractParameterisedSystem< VECTOR >::GetNumberOfDerivedQuantities (  )  const [inline]

template<typename VECTOR>
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.

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().

template<typename VECTOR>
VECTOR AbstractParameterisedSystem< VECTOR >::ComputeDerivedQuantitiesFromCurrentState ( double  time  )  [inline]

Compute the derived quantities based on the current system state.

Parameters:
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().

template<typename VECTOR>
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.

template<typename VECTOR>
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.

template<typename VECTOR>
unsigned AbstractParameterisedSystem< VECTOR >::GetDerivedQuantityIndex ( const std::string &  rName  )  const [inline]

Get the index of a derived quantity, given its name.

Parameters:
rName the name of a derived quantity.

Definition at line 291 of file AbstractParameterisedSystem.cpp.

References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.

template<typename VECTOR>
std::string AbstractParameterisedSystem< VECTOR >::GetDerivedQuantityUnits ( unsigned  index  )  const [inline]

Get the units of a derived quantity.

Parameters:
index an index from GetDerivedQuantityIndex.
Returns:
the units of the variable.

Definition at line 298 of file AbstractParameterisedSystem.cpp.

References AbstractParameterisedSystem< VECTOR >::mpSystemInfo.


Member Data Documentation

template<typename VECTOR>
unsigned AbstractParameterisedSystem< VECTOR >::mNumberOfStateVariables [protected]

template<typename VECTOR>
VECTOR AbstractParameterisedSystem< VECTOR >::mStateVariables [protected]

template<typename VECTOR>
VECTOR AbstractParameterisedSystem< VECTOR >::mParameters [protected]

template<typename VECTOR>
boost::shared_ptr<AbstractOdeSystemInformation> AbstractParameterisedSystem< VECTOR >::mpSystemInfo [protected]


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

Generated on Mon Nov 1 12:35:53 2010 for Chaste by  doxygen 1.5.5