Chaste Release::3.1
|
#include <AbstractBackwardEulerCardiacCell.hpp>
Public Member Functions | |
AbstractBackwardEulerCardiacCell (unsigned numberOfStateVariables, unsigned voltageIndex, boost::shared_ptr< AbstractStimulusFunction > pIntracellularStimulus) | |
virtual | ~AbstractBackwardEulerCardiacCell () |
virtual void | ComputeResidual (double time, const double rCurrentGuess[SIZE], double rResidual[SIZE])=0 |
virtual void | ComputeJacobian (double time, const double rCurrentGuess[SIZE], double rJacobian[SIZE][SIZE])=0 |
OdeSolution | Compute (double tStart, double tEnd, double tSamp=0.0) |
void | ComputeExceptVoltage (double tStart, double tEnd) |
void | SolveAndUpdateState (double tStart, double tEnd) |
Protected Member Functions | |
virtual void | ComputeOneStepExceptVoltage (double tStart)=0 |
virtual void | UpdateTransmembranePotential (double time)=0 |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
void | EvaluateYDerivatives (double time, const std::vector< double > &rY, std::vector< double > &rDY) |
Friends | |
class | boost::serialization::access |
This is the base class for cardiac cells solved using a (decoupled) backward Euler approach (see http://dx.doi.org/10.1109/TBME.2006.879425).
The basic approach to solving such models is:
Definition at line 67 of file AbstractBackwardEulerCardiacCell.hpp.
AbstractBackwardEulerCardiacCell< SIZE >::AbstractBackwardEulerCardiacCell | ( | unsigned | numberOfStateVariables, |
unsigned | voltageIndex, | ||
boost::shared_ptr< AbstractStimulusFunction > | pIntracellularStimulus | ||
) |
Standard constructor for a cell.
numberOfStateVariables | the size of the ODE system |
voltageIndex | the index of the variable representing the transmembrane potential within the state variable vector |
pIntracellularStimulus | the intracellular stimulus function |
Some notes for future reference:
Definition at line 205 of file AbstractBackwardEulerCardiacCell.hpp.
AbstractBackwardEulerCardiacCell< SIZE >::~AbstractBackwardEulerCardiacCell | ( | ) | [virtual] |
Virtual destructor
Definition at line 216 of file AbstractBackwardEulerCardiacCell.hpp.
OdeSolution AbstractBackwardEulerCardiacCell< SIZE >::Compute | ( | double | tStart, |
double | tEnd, | ||
double | tSamp = 0.0 |
||
) | [virtual] |
Simulates this cell's behaviour between the time interval [tStart, tEnd], with timestep mDt. Uses a forward Euler step to update the transmembrane potential at each timestep.
The length of the time interval must be a multiple of the timestep.
tStart | beginning of the time interval to simulate |
tEnd | end of the time interval to simulate |
tSamp | sampling interval for returned results (defaults to mDt) |
Reimplemented from AbstractCardiacCell.
Definition at line 220 of file AbstractBackwardEulerCardiacCell.hpp.
References OdeSolution::rGetSolutions(), OdeSolution::rGetTimes(), OdeSolution::SetNumberOfTimeSteps(), and OdeSolution::SetOdeSystemInformation().
void AbstractBackwardEulerCardiacCell< SIZE >::ComputeExceptVoltage | ( | double | tStart, |
double | tEnd | ||
) | [virtual] |
Simulates this cell's behaviour between the time interval [tStart, tEnd], with timestep mDt. The transmembrane potential is kept fixed throughout.
The length of the time interval must be a multiple of the timestep.
tStart | beginning of the time interval to simulate |
tEnd | end of the time interval to simulate |
Reimplemented from AbstractCardiacCell.
Definition at line 272 of file AbstractBackwardEulerCardiacCell.hpp.
virtual void AbstractBackwardEulerCardiacCell< SIZE >::ComputeJacobian | ( | double | time, |
const double | rCurrentGuess[SIZE], | ||
double | rJacobian[SIZE][SIZE] | ||
) | [pure virtual] |
Compute the Jacobian matrix for the nonlinear system portion of the cell model.
time | the current time |
rCurrentGuess | the current guess for |
rJacobian | to be filled in with the Jacobian matrix |
virtual void AbstractBackwardEulerCardiacCell< SIZE >::ComputeOneStepExceptVoltage | ( | double | tStart | ) | [protected, pure virtual] |
Compute the values of all state variables, except the voltage, using backward Euler, for one timestep from tStart.
tStart | start of this timestep |
virtual void AbstractBackwardEulerCardiacCell< SIZE >::ComputeResidual | ( | double | time, |
const double | rCurrentGuess[SIZE], | ||
double | rResidual[SIZE] | ||
) | [pure virtual] |
Compute the residual of the nonlinear system portion of the cell model.
time | the current time |
rCurrentGuess | the current guess for |
rResidual | to be filled in with the residual vector |
void AbstractBackwardEulerCardiacCell< SIZE >::EvaluateYDerivatives | ( | double | time, |
const std::vector< double > & | rY, | ||
std::vector< double > & | rDY | ||
) | [inline, private, virtual] |
This function should never be called - the cell class incorporates its own solver.
time | |
rY | |
rDY |
Implements AbstractOdeSystem.
Definition at line 170 of file AbstractBackwardEulerCardiacCell.hpp.
References NEVER_REACHED.
void AbstractBackwardEulerCardiacCell< SIZE >::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) | [inline, private] |
Archive the member variables.
archive | |
version |
Reimplemented from AbstractCardiacCell.
Definition at line 79 of file AbstractBackwardEulerCardiacCell.hpp.
void AbstractBackwardEulerCardiacCell< SIZE >::SolveAndUpdateState | ( | double | tStart, |
double | tEnd | ||
) | [virtual] |
Simulate this cell's behaviour between the time interval [tStart, tEnd], with timestemp mDt, updating the internal state variable values.
tStart | beginning of the time interval to simulate |
tEnd | end of the time interval to simulate |
Reimplemented from AbstractCardiacCell.
Definition at line 298 of file AbstractBackwardEulerCardiacCell.hpp.
References TimeStepper::AdvanceOneTimeStep(), TimeStepper::GetTime(), and TimeStepper::IsTimeAtEnd().
virtual void AbstractBackwardEulerCardiacCell< SIZE >::UpdateTransmembranePotential | ( | double | time | ) | [protected, pure virtual] |
Perform a forward Euler step to update the transmembrane potential.
time | start of this timestep |
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from AbstractCardiacCell.
Definition at line 71 of file AbstractBackwardEulerCardiacCell.hpp.