#include <AbstractOdeSystemInformation.hpp>
Public Member Functions | |
void | SetInitialConditions (const std::vector< double > &rInitialConditions) |
void | SetInitialConditionsComponent (unsigned index, double initialCondition) throw (std::out_of_range) |
std::vector< double > | GetInitialConditions () const |
std::vector< std::string > & | rGetVariableNames () |
std::vector< std::string > & | rGetVariableUnits () |
unsigned | GetStateVariableNumberByName (const std::string &rName) const |
std::string | GetStateVariableUnitsByNumber (unsigned varNumber) const |
Protected Member Functions | |
virtual void | Initialise (void)=0 |
Protected Attributes | |
std::vector< std::string > | mVariableNames |
std::vector< std::string > | mVariableUnits |
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 51 of file AbstractOdeSystemInformation.hpp.
virtual void AbstractOdeSystemInformation::Initialise | ( | void | ) | [protected, pure virtual] |
Initialise the ODE system information.
This must be provided by subclasses.
Implemented in 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 >, 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.
Definition at line 43 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.
Definition at line 49 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 55 of file AbstractOdeSystemInformation.cpp.
References mInitialConditions, and mInitialised.
std::vector< std::string > & AbstractOdeSystemInformation::rGetVariableNames | ( | ) |
Get the variable names vector.
Definition at line 61 of file AbstractOdeSystemInformation.cpp.
References mInitialised, and mVariableNames.
std::vector< std::string > & AbstractOdeSystemInformation::rGetVariableUnits | ( | ) |
Get the variable units vector.
Definition at line 67 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.
name | The name of a state variable. |
Definition at line 73 of file AbstractOdeSystemInformation.cpp.
References mInitialised, and mVariableNames.
std::string AbstractOdeSystemInformation::GetStateVariableUnitsByNumber | ( | unsigned | varNumber | ) | const |
varNumber | A state variable's position within the vector of state variables associated with the ODE system. |
Definition at line 86 of file AbstractOdeSystemInformation.cpp.
References mInitialised, and mVariableUnits.
std::vector<std::string> AbstractOdeSystemInformation::mVariableNames [protected] |
State variable names
Definition at line 55 of file AbstractOdeSystemInformation.hpp.
Referenced by GetStateVariableNumberByName(), OdeSystemInformation< ODE_SYSTEM >::Initialise(), CellwiseOdeSystemInformation< ODE_SYSTEM >::Initialise(), and rGetVariableNames().
std::vector<std::string> AbstractOdeSystemInformation::mVariableUnits [protected] |
State variable units
Definition at line 58 of file AbstractOdeSystemInformation.hpp.
Referenced by GetStateVariableUnitsByNumber(), OdeSystemInformation< ODE_SYSTEM >::Initialise(), CellwiseOdeSystemInformation< ODE_SYSTEM >::Initialise(), and rGetVariableUnits().
std::vector<double> AbstractOdeSystemInformation::mInitialConditions [protected] |
Suggested initial conditions
Definition at line 61 of file AbstractOdeSystemInformation.hpp.
Referenced by 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 64 of file AbstractOdeSystemInformation.hpp.
Referenced by GetInitialConditions(), GetStateVariableNumberByName(), GetStateVariableUnitsByNumber(), OdeSystemInformation< ODE_SYSTEM >::Initialise(), CellwiseOdeSystemInformation< ODE_SYSTEM >::Initialise(), rGetVariableNames(), rGetVariableUnits(), SetInitialConditions(), and SetInitialConditionsComponent().