#include <AbstractOdeSystemInformation.hpp>
Public Member Functions | |
AbstractOdeSystemInformation () | |
virtual | ~AbstractOdeSystemInformation () |
void | SetInitialConditions (const std::vector< double > &rInitialConditions) |
void | SetInitialConditionsComponent (unsigned index, double initialCondition) throw (std::out_of_range) |
std::vector< double > | GetInitialConditions () const |
const std::vector< std::string > & | rGetVariableNames () const |
const std::vector< std::string > & | rGetVariableUnits () const |
unsigned | GetStateVariableNumberByName (const std::string &rName) const |
std::string | GetStateVariableUnitsByNumber (unsigned varNumber) const |
const std::vector< std::string > & | rGetParameterNames () const |
const std::vector< std::string > & | rGetParameterUnits () const |
Protected Member Functions | |
virtual void | Initialise ()=0 |
Protected Attributes | |
std::vector< std::string > | mVariableNames |
std::vector< std::string > | mVariableUnits |
std::vector< std::string > | mParameterNames |
std::vector< std::string > | mParameterUnits |
std::vector< double > | mInitialConditions |
bool | mInitialised |
The information available includes:
This class requires a subclass defining the Initialise method in order to set up the information. Developers may do this by defining their own subclass, but the most convenient method is likely to be to use the OdeSystemInformation class, which is a templated singleton subclass of this AbstractOdeSystemInformation class. See its documentation for details of how to use it.
Definition at line 52 of file AbstractOdeSystemInformation.hpp.
AbstractOdeSystemInformation::AbstractOdeSystemInformation | ( | ) |
Constructor.
Definition at line 35 of file AbstractOdeSystemInformation.cpp.
AbstractOdeSystemInformation::~AbstractOdeSystemInformation | ( | ) | [virtual] |
Virtual destructor since we have virtual methods.
Definition at line 40 of file AbstractOdeSystemInformation.cpp.
virtual void AbstractOdeSystemInformation::Initialise | ( | ) | [protected, pure virtual] |
Initialise the ODE system information.
This must be provided by subclasses.
Implemented in CombinedOdeSystemInformation, OdeSystemInformation< ODE_SYSTEM >, CellwiseOdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, CellwiseOdeSystemInformation< ODE_SYSTEM >, OdeSystemInformation< ODE_SYSTEM >, and CellwiseOdeSystemInformation< ODE_SYSTEM >.
void AbstractOdeSystemInformation::SetInitialConditions | ( | const std::vector< double > & | rInitialConditions | ) |
Set the suggested initial conditions to use.
rInitialConditions | vector containing initial values for the state variables |
Definition at line 44 of file AbstractOdeSystemInformation.cpp.
References mInitialConditions, and mInitialised.
void AbstractOdeSystemInformation::SetInitialConditionsComponent | ( | unsigned | index, | |
double | initialCondition | |||
) | throw (std::out_of_range) |
Set a single component of the suggested initial conditions to use.
index | the index of the state variable in the system | |
initialCondition | the initial value for the state variable |
Definition at line 50 of file AbstractOdeSystemInformation.cpp.
References mInitialConditions, and mInitialised.
std::vector< double > AbstractOdeSystemInformation::GetInitialConditions | ( | ) | const |
Get a copy of the suggested initial conditions.
Definition at line 56 of file AbstractOdeSystemInformation.cpp.
References mInitialConditions, and mInitialised.
const std::vector< std::string > & AbstractOdeSystemInformation::rGetVariableNames | ( | ) | const |
Get the variable names vector.
Definition at line 62 of file AbstractOdeSystemInformation.cpp.
References mInitialised, and mVariableNames.
const std::vector< std::string > & AbstractOdeSystemInformation::rGetVariableUnits | ( | ) | const |
Get the variable units vector.
Definition at line 68 of file AbstractOdeSystemInformation.cpp.
References mInitialised, and mVariableUnits.
unsigned AbstractOdeSystemInformation::GetStateVariableNumberByName | ( | const std::string & | rName | ) | const |
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 method GetStateVariableUnitsByNumber.
rName | the name of a state variable |
Definition at line 74 of file AbstractOdeSystemInformation.cpp.
References mInitialised, and mVariableNames.
std::string AbstractOdeSystemInformation::GetStateVariableUnitsByNumber | ( | unsigned | varNumber | ) | const |
Get the units of a state variable given its index in the ODE system.
varNumber | a state variable's position within the vector of state variables associated with the ODE system. |
Definition at line 87 of file AbstractOdeSystemInformation.cpp.
References mInitialised, and mVariableUnits.
const std::vector< std::string > & AbstractOdeSystemInformation::rGetParameterNames | ( | ) | const |
Get the vector of parameter names.
Definition at line 94 of file AbstractOdeSystemInformation.cpp.
References mInitialised, and mParameterNames.
const std::vector< std::string > & AbstractOdeSystemInformation::rGetParameterUnits | ( | ) | const |
Get the vector of parameter units.
Definition at line 100 of file AbstractOdeSystemInformation.cpp.
References mInitialised, and mParameterUnits.
std::vector<std::string> AbstractOdeSystemInformation::mVariableNames [protected] |
State variable names
Definition at line 57 of file AbstractOdeSystemInformation.hpp.
Referenced by CombinedOdeSystemInformation::CombinedOdeSystemInformation(), GetStateVariableNumberByName(), OdeSystemInformation< ODE_SYSTEM >::Initialise(), CellwiseOdeSystemInformation< ODE_SYSTEM >::Initialise(), and rGetVariableNames().
std::vector<std::string> AbstractOdeSystemInformation::mVariableUnits [protected] |
State variable units
Definition at line 60 of file AbstractOdeSystemInformation.hpp.
Referenced by CombinedOdeSystemInformation::CombinedOdeSystemInformation(), GetStateVariableUnitsByNumber(), OdeSystemInformation< ODE_SYSTEM >::Initialise(), CellwiseOdeSystemInformation< ODE_SYSTEM >::Initialise(), and rGetVariableUnits().
std::vector<std::string> AbstractOdeSystemInformation::mParameterNames [protected] |
Parameter names
Definition at line 63 of file AbstractOdeSystemInformation.hpp.
Referenced by rGetParameterNames().
std::vector<std::string> AbstractOdeSystemInformation::mParameterUnits [protected] |
Parameter units
Definition at line 66 of file AbstractOdeSystemInformation.hpp.
Referenced by rGetParameterUnits().
std::vector<double> AbstractOdeSystemInformation::mInitialConditions [protected] |
Suggested initial conditions
Definition at line 69 of file AbstractOdeSystemInformation.hpp.
Referenced by CombinedOdeSystemInformation::CombinedOdeSystemInformation(), GetInitialConditions(), OdeSystemInformation< ODE_SYSTEM >::Initialise(), CellwiseOdeSystemInformation< ODE_SYSTEM >::Initialise(), SetInitialConditions(), and SetInitialConditionsComponent().
bool AbstractOdeSystemInformation::mInitialised [protected] |
Whether a 'real' Initialise method has been called
Definition at line 72 of file AbstractOdeSystemInformation.hpp.
Referenced by CombinedOdeSystemInformation::CombinedOdeSystemInformation(), GetInitialConditions(), GetStateVariableNumberByName(), GetStateVariableUnitsByNumber(), OdeSystemInformation< ODE_SYSTEM >::Initialise(), CellwiseOdeSystemInformation< ODE_SYSTEM >::Initialise(), rGetParameterNames(), rGetParameterUnits(), rGetVariableNames(), rGetVariableUnits(), SetInitialConditions(), and SetInitialConditionsComponent().