Chaste  Release::3.4
SteadyStateRunner Class Reference

#include <SteadyStateRunner.hpp>

+ Inheritance diagram for SteadyStateRunner:
+ Collaboration diagram for SteadyStateRunner:

Public Member Functions

 SteadyStateRunner (boost::shared_ptr< AbstractCvodeCell > pModel, bool twoPaces=false)
 
- Public Member Functions inherited from AbstractSteadyStateRunner
 AbstractSteadyStateRunner (boost::shared_ptr< AbstractCvodeCell > pModel)
 
virtual ~AbstractSteadyStateRunner ()
 
bool RunToSteadyState ()
 
unsigned GetNumEvaluations ()
 
void SetMaxNumPaces (unsigned numPaces)
 

Protected Member Functions

virtual void RunToSteadyStateImplementation ()
 

Private Attributes

bool mTwoPaceScan
 

Additional Inherited Members

- Protected Attributes inherited from AbstractSteadyStateRunner
boost::shared_ptr
< AbstractCvodeCell
mpModel
 
unsigned mNumEvaluations
 
unsigned mMaxNumPaces
 

Detailed Description

This class is to get a cell model to (approximately) steady state.

It does it by simply pacing and looking for a small change in the norm of the state variables between subsequent paces.

Note - because it looks for a small change in state variables between solves this method requires quite an accurate CVODE solution to do this efficiently (otherwise you just have to wait to get lucky on subsequent solves).

So although running with stricter tolerances takes longer per pace it can mean you detect a steady state in up to 3x fewer paces, so it is recommended to use a model with SetTolerances(1e-6, 1e-8); or stricter.

Definition at line 58 of file SteadyStateRunner.hpp.

Constructor & Destructor Documentation

SteadyStateRunner::SteadyStateRunner ( boost::shared_ptr< AbstractCvodeCell pModel,
bool  twoPaces = false 
)
inline

Constructor of a helper class for getting action potential models to steady state

Parameters
pModelThe cell model to run to steady state.
twoPacesWhether to run two paces at once, for detection of steady state alternans.

Definition at line 80 of file SteadyStateRunner.hpp.

Member Function Documentation

void SteadyStateRunner::RunToSteadyStateImplementation ( )
protectedvirtual

Run the cell model to steady state

Here we don't do anything clever - we just gradually drift to the steady state, defined by < 1e-6 change in the norm of state variables between 1 (or 2 - see mTwoPaceScan) beats.

Implements AbstractSteadyStateRunner.

Definition at line 40 of file SteadyStateRunner.cpp.

References CopyToStdVector(), RegularStimulus::GetPeriod(), AbstractSteadyStateRunner::mMaxNumPaces, AbstractSteadyStateRunner::mNumEvaluations, AbstractSteadyStateRunner::mpModel, and mTwoPaceScan.

Member Data Documentation

bool SteadyStateRunner::mTwoPaceScan
private

whether we should do two paces at once (should detect steady alternans as well as single paces)

Definition at line 62 of file SteadyStateRunner.hpp.

Referenced by RunToSteadyStateImplementation().


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