Chaste Commit::29c3c4ab2bee00ddd311a035a1e522c03cbe928a
AbstractSteadyStateRunner Class Referenceabstract

#include <AbstractSteadyStateRunner.hpp>

+ Inheritance diagram for AbstractSteadyStateRunner:
+ Collaboration diagram for AbstractSteadyStateRunner:

Public Member Functions

 AbstractSteadyStateRunner (boost::shared_ptr< AbstractCvodeCell > pModel)
 
virtual ~AbstractSteadyStateRunner ()
 
bool RunToSteadyState ()
 
void SuppressOutput (bool suppress=true)
 
void SuppressWarnings (bool suppress=true)
 
unsigned GetNumEvaluations ()
 
void SetMaxNumPaces (unsigned numPaces)
 

Protected Member Functions

virtual void RunToSteadyStateImplementation ()=0
 

Protected Attributes

boost::shared_ptr< AbstractCvodeCell > mpModel
 
unsigned mNumEvaluations
 
unsigned mMaxNumPaces
 
bool mSuppressOutput
 
bool mSuppressWarnings
 

Private Member Functions

 AbstractSteadyStateRunner ()
 

Detailed Description

This class is abstract to investigate different ways of getting a cell model to steady state.

A simple concrete example is SteadyStateRunner.

Definition at line 50 of file AbstractSteadyStateRunner.hpp.

Constructor & Destructor Documentation

◆ AbstractSteadyStateRunner() [1/2]

AbstractSteadyStateRunner::AbstractSteadyStateRunner ( )
inlineprivate

Default constructor is private to ensure it is never used.

Definition at line 56 of file AbstractSteadyStateRunner.hpp.

◆ AbstractSteadyStateRunner() [2/2]

AbstractSteadyStateRunner::AbstractSteadyStateRunner ( boost::shared_ptr< AbstractCvodeCell >  pModel)

Constructor

Parameters
pModelThe cell model to run to steady state.

Definition at line 38 of file AbstractSteadyStateRunner.cpp.

◆ ~AbstractSteadyStateRunner()

virtual AbstractSteadyStateRunner::~AbstractSteadyStateRunner ( )
inlinevirtual

Destructor (empty)

Definition at line 97 of file AbstractSteadyStateRunner.hpp.

Member Function Documentation

◆ GetNumEvaluations()

unsigned AbstractSteadyStateRunner::GetNumEvaluations ( )
Returns
The number of cell model 'paces/beats' that had to be evaluated.

Definition at line 89 of file AbstractSteadyStateRunner.cpp.

References mNumEvaluations.

Referenced by RunToSteadyState().

◆ RunToSteadyState()

bool AbstractSteadyStateRunner::RunToSteadyState ( )

Run the cell model to steady state (defined by a small change in state variables between beats)

Requires a method called RunToSteadyStateImplementation which must be overridden in subclasses for different approximations.

Returns
whether the model reached steady state within the maximum number of evaluations

Definition at line 47 of file AbstractSteadyStateRunner.cpp.

References EXCEPTION, GetNumEvaluations(), mMaxNumPaces, mNumEvaluations, mpModel, mSuppressOutput, mSuppressWarnings, and RunToSteadyStateImplementation().

◆ RunToSteadyStateImplementation()

virtual void AbstractSteadyStateRunner::RunToSteadyStateImplementation ( )
protectedpure virtual

Run the cell model to steady state (defined by a small change in state variables between beats)

Must be overridden in subclasses for different approximations.

Subclasses must check they don't do more than mMaxNumPaces and should increment mNumEvaluations to reflect how many paces were simulated

Implemented in SteadyStateRunner.

Referenced by RunToSteadyState().

◆ SetMaxNumPaces()

void AbstractSteadyStateRunner::SetMaxNumPaces ( unsigned  numPaces)
Parameters
numPacesThe maximum number of paces to do on the way to steady state

Definition at line 94 of file AbstractSteadyStateRunner.cpp.

References EXCEPTION, and mMaxNumPaces.

◆ SuppressOutput()

void AbstractSteadyStateRunner::SuppressOutput ( bool  suppress = true)

Stop class, and subclasses printing output to std::cout

Parameters
suppresswhether to suppress output.

Definition at line 79 of file AbstractSteadyStateRunner.cpp.

References mSuppressOutput.

◆ SuppressWarnings()

void AbstractSteadyStateRunner::SuppressWarnings ( bool  suppress = true)

Prevent this class and subclasses from emitting warnings

Parameters
suppresswhether to suppress warnings.

Definition at line 84 of file AbstractSteadyStateRunner.cpp.

References mSuppressWarnings.

Member Data Documentation

◆ mMaxNumPaces

unsigned AbstractSteadyStateRunner::mMaxNumPaces
protected

The maximum number of paces that are allowed

Definition at line 66 of file AbstractSteadyStateRunner.hpp.

Referenced by RunToSteadyState(), SteadyStateRunner::RunToSteadyStateImplementation(), and SetMaxNumPaces().

◆ mNumEvaluations

unsigned AbstractSteadyStateRunner::mNumEvaluations
protected

The number of evaluations that it took

Definition at line 63 of file AbstractSteadyStateRunner.hpp.

Referenced by GetNumEvaluations(), RunToSteadyState(), and SteadyStateRunner::RunToSteadyStateImplementation().

◆ mpModel

boost::shared_ptr<AbstractCvodeCell> AbstractSteadyStateRunner::mpModel
protected

The cell model to run to steady state

Definition at line 60 of file AbstractSteadyStateRunner.hpp.

Referenced by RunToSteadyState(), and SteadyStateRunner::RunToSteadyStateImplementation().

◆ mSuppressOutput

bool AbstractSteadyStateRunner::mSuppressOutput
protected

Whether to suppress output from this class (defaults to false)

Definition at line 69 of file AbstractSteadyStateRunner.hpp.

Referenced by RunToSteadyState(), and SuppressOutput().

◆ mSuppressWarnings

bool AbstractSteadyStateRunner::mSuppressWarnings
protected

Whether to suppress warnings from this class (defaults to false)

Definition at line 72 of file AbstractSteadyStateRunner.hpp.

Referenced by RunToSteadyState(), and SuppressWarnings().


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