Chaste Release::3.1
AbstractOdeBasedContractionModel Class Reference

#include <AbstractOdeBasedContractionModel.hpp>

Inheritance diagram for AbstractOdeBasedContractionModel:
Collaboration diagram for AbstractOdeBasedContractionModel:

List of all members.

Public Member Functions

 AbstractOdeBasedContractionModel (unsigned numStateVariables)
virtual void RunDoNotUpdate (double startTime, double endTime, double timeStep)
void UpdateStateVariables ()
void RunAndUpdate (double startTime, double endTime, double timeStep)

Protected Attributes

std::vector< doublemTemporaryStateVariables
double mTime

Detailed Description

Abstract base class for ODE-based contraction models. Inherits from AbstractOdeSystem and AbstractContractionModel and deals with the ODE solving.

Usage is either: // for the explicit electromechanics algorithm RunAndUpdate(); // solves and updates state variables to the solution

or // for the implicit electromechanics algorithm RunDoNotUpdate(); // .. UpdateStateVariables(); // if keeping this solution

Definition at line 58 of file AbstractOdeBasedContractionModel.hpp.


Constructor & Destructor Documentation

AbstractOdeBasedContractionModel::AbstractOdeBasedContractionModel ( unsigned  numStateVariables) [inline]

Constructor

Parameters:
numStateVariablesnumber of state variables

Definition at line 74 of file AbstractOdeBasedContractionModel.hpp.


Member Function Documentation

void AbstractOdeBasedContractionModel::RunAndUpdate ( double  startTime,
double  endTime,
double  timeStep 
) [inline, virtual]

Solves the ODEs and updates the state variable to the new solution

Alternative usage: RunDoNotUpdate(); // .. UpdateStateVariables(); // if keeping this solution

Parameters:
startTimestart time
endTimeend time
timeSteptimestep for integrating ODEs

Implements AbstractContractionModel.

Reimplemented in NhsModelWithBackwardSolver.

Definition at line 142 of file AbstractOdeBasedContractionModel.hpp.

References mTime, and AbstractIvpOdeSolver::SolveAndUpdateStateVariable().

Referenced by RunDoNotUpdate().

virtual void AbstractOdeBasedContractionModel::RunDoNotUpdate ( double  startTime,
double  endTime,
double  timeStep 
) [inline, virtual]

Solves the ODEs, but doesn't update the state variables, instead keeps them in a temporary store. Call UpdateStateVariables() to save the new values. Call GetNextActiveTension() to get the active tension corresponding to the new values (if UpdateStateVariables() has not been called). Also saves the time (using endTime).

Parameters:
startTimestart time
endTimeend time
timeSteptimestep for integrating ODEs

Implements AbstractContractionModel.

Reimplemented in NhsModelWithBackwardSolver.

Definition at line 93 of file AbstractOdeBasedContractionModel.hpp.

References AbstractParameterisedSystem< std::vector< double > >::mStateVariables, mTemporaryStateVariables, and RunAndUpdate().

void AbstractOdeBasedContractionModel::UpdateStateVariables ( ) [inline, virtual]

After RunDoNotUpdate() has been called, this call be used to update the state variables to the new (saved) values

Implements AbstractContractionModel.

Definition at line 121 of file AbstractOdeBasedContractionModel.hpp.

References AbstractParameterisedSystem< std::vector< double > >::mStateVariables, and mTemporaryStateVariables.

Referenced by NhsModelWithBackwardSolver::RunAndUpdate().


Member Data Documentation


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