Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
OdeSystemInformation< ODE_SYSTEM > Class Template Reference

#include <OdeSystemInformation.hpp>

+ Inheritance diagram for OdeSystemInformation< ODE_SYSTEM >:
+ Collaboration diagram for OdeSystemInformation< ODE_SYSTEM >:

Static Public Member Functions

static boost::shared_ptr< OdeSystemInformation< ODE_SYSTEM > > Instance ()
 

Protected Member Functions

 OdeSystemInformation ()
 
 OdeSystemInformation (const OdeSystemInformation< ODE_SYSTEM > &)
 
OdeSystemInformationoperator= (const OdeSystemInformation< ODE_SYSTEM > &)
 
void Initialise ()
 
void Initialise ()
 
void Initialise ()
 
void Initialise (void)
 
void Initialise (void)
 
void Initialise (void)
 
void Initialise (void)
 
void Initialise (void)
 
void Initialise (void)
 
void Initialise ()
 
void Initialise ()
 
void Initialise ()
 

Static Private Attributes

static boost::shared_ptr< OdeSystemInformation< ODE_SYSTEM > > mpInstance
 

Additional Inherited Members

- Public Member Functions inherited from AbstractOdeSystemInformation
 AbstractOdeSystemInformation ()
 
virtual ~AbstractOdeSystemInformation ()
 
std::string GetSystemName () const
 
std::string GetFreeVariableName () const
 
std::string GetFreeVariableUnits () const
 
void SetDefaultInitialConditions (const std::vector< double > &rInitialConditions)
 
void SetDefaultInitialCondition (unsigned index, double initialCondition)
 
std::vector< doubleGetInitialConditions () const
 
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
 
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
 
unsigned GetNumberOfParameters () const
 
unsigned GetAnyVariableIndex (const std::string &rName) const
 
bool HasAnyVariable (const std::string &rName) const
 
std::string GetAnyVariableUnits (unsigned index) const
 
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 GetNumberOfDerivedQuantities () const
 
unsigned GetNumberOfAttributes () const
 
bool HasAttribute (const std::string &rName) const
 
double GetAttribute (const std::string &rName) const
 
- Protected Attributes inherited from AbstractOdeSystemInformation
std::string mSystemName
 
std::string mFreeVariableName
 
std::string mFreeVariableUnits
 
std::vector< std::string > mVariableNames
 
std::vector< std::string > mVariableUnits
 
std::vector< std::string > mParameterNames
 
std::vector< std::string > mParameterUnits
 
std::vector< std::string > mDerivedQuantityNames
 
std::vector< std::string > mDerivedQuantityUnits
 
std::map< std::string, doublemAttributes
 
std::vector< doublemInitialConditions
 
bool mInitialised
 

Detailed Description

template<class ODE_SYSTEM>
class OdeSystemInformation< ODE_SYSTEM >

A concrete implementation of AbstractOdeSystemInformation, that uses templates to provide an implementation for any ODE system class.

All ODE system developers need to do is provide a specialisation of the Initialise method of this class, and set mpSystemInfo in their constructor: mpSystemInfo = OdeSystemInformation<CLASS>::Instance();

This class contains all the machinery to make it a singleton, hence providing exactly one instance per value of the template parameter.

Definition at line 55 of file OdeSystemInformation.hpp.

Constructor & Destructor Documentation

◆ OdeSystemInformation() [1/2]

template<class ODE_SYSTEM >
OdeSystemInformation< ODE_SYSTEM >::OdeSystemInformation ( )
protected

Default constructor.

Not user accessible - to obtain an instance of this class use the Instance method.

Definition at line 125 of file OdeSystemInformation.hpp.

◆ OdeSystemInformation() [2/2]

template<class ODE_SYSTEM >
OdeSystemInformation< ODE_SYSTEM >::OdeSystemInformation ( const OdeSystemInformation< ODE_SYSTEM > &  )
protected

Copy constructor.

Member Function Documentation

◆ Initialise() [1/12]

void OdeSystemInformation< TysonNovak2001OdeSystem >::Initialise ( )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 254 of file TysonNovak2001OdeSystem.cpp.

◆ Initialise() [2/12]

void OdeSystemInformation< Kerchoffs2003ContractionModel >::Initialise ( )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 155 of file Kerchoffs2003ContractionModel.cpp.

◆ Initialise() [3/12]

void OdeSystemInformation< Nash2004ContractionModel >::Initialise ( )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 42 of file Nash2004ContractionModel.cpp.

◆ Initialise() [4/12]

template<class ODE_SYSTEM >
void OdeSystemInformation< ODE_SYSTEM >::Initialise ( void  )
protectedvirtual

Generic implementation of Initialise, which does nothing.

Developers should specialise this method to their ODE system. For example,

template<> void OdeSystemInformation<MyNewOdeSystem>::Initialise() { this->mVariableNames.push_back("Variable_1"); this->mVariableUnits.push_back("Units_1"); this->mInitialConditions.push_back(0.0);

this->mInitialised = true; }

Implements AbstractOdeSystemInformation.

Definition at line 132 of file OdeSystemInformation.hpp.

◆ Initialise() [5/12]

void OdeSystemInformation< OdeSystemForCoupledHeatEquation >::Initialise ( )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 91 of file OdeSystemForCoupledHeatEquation.hpp.

◆ Initialise() [6/12]

void OdeSystemInformation< OdeSystemForCoupledHeatEquationWithSource >::Initialise ( )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 97 of file OdeSystemForCoupledHeatEquationWithSource.hpp.

◆ Initialise() [7/12]

void OdeSystemInformation< NhsContractionModel >::Initialise ( void  )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 219 of file NhsContractionModel.cpp.

◆ Initialise() [8/12]

void OdeSystemInformation< FakeBathCell >::Initialise ( void  )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 73 of file FakeBathCell.cpp.

◆ Initialise() [9/12]

void OdeSystemInformation< FitzHughNagumo1961OdeSystem >::Initialise ( void  )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 93 of file FitzHughNagumo1961OdeSystem.cpp.

◆ Initialise() [10/12]

void OdeSystemInformation< CML_noble_varghese_kohl_noble_1998_basic_with_sac >::Initialise ( void  )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 619 of file NobleVargheseKohlNoble1998WithSac.cpp.

◆ Initialise() [11/12]

void OdeSystemInformation< CorriasBuistICCModified >::Initialise ( void  )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 424 of file CorriasBuistICCModified.cpp.

◆ Initialise() [12/12]

void OdeSystemInformation< CorriasBuistSMCModified >::Initialise ( void  )
protectedvirtual

Initialise the ODE system information.

This must be provided by subclasses.

Implements AbstractOdeSystemInformation.

Definition at line 330 of file CorriasBuistSMCModified.cpp.

◆ Instance()

◆ operator=()

template<class ODE_SYSTEM >
OdeSystemInformation & OdeSystemInformation< ODE_SYSTEM >::operator= ( const OdeSystemInformation< ODE_SYSTEM > &  )
protected
Returns
reference to this object (as language convention) Overloaded assignment operator.

Member Data Documentation

◆ mpInstance

template<class ODE_SYSTEM >
boost::shared_ptr< OdeSystemInformation< ODE_SYSTEM > > OdeSystemInformation< ODE_SYSTEM >::mpInstance
staticprivate

The single instance of this class, for this ODE_SYSTEM.

Todo:
see if using weak_ptr would work and give funkier semantics (automatically destroy the singleton when no ODE systems were using it)

Definition of the instance static member.

Definition at line 65 of file OdeSystemInformation.hpp.


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