AbstractOdeBasedContractionModel Class Reference

#include <AbstractOdeBasedContractionModel.hpp>

Inherits AbstractOdeSystem, and AbstractContractionModel.

Inherited by Kerchoffs2003ContractionModel, Nash2004ContractionModel, and NhsContractionModel.

Collaboration diagram for AbstractOdeBasedContractionModel:
Collaboration graph
[legend]

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 51 of file AbstractOdeBasedContractionModel.hpp.


Constructor & Destructor Documentation

AbstractOdeBasedContractionModel::AbstractOdeBasedContractionModel ( unsigned  numStateVariables  )  [inline]

Constructor

Parameters:
numStateVariables number of state variables

Definition at line 67 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:
startTime start time
endTime end time
timeStep timestep for integrating ODEs

Implements AbstractContractionModel.

Reimplemented in NhsModelWithBackwardSolver.

Definition at line 135 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:
startTime start time
endTime end time
timeStep timestep for integrating ODEs

Implements AbstractContractionModel.

Reimplemented in NhsModelWithBackwardSolver.

Definition at line 86 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 114 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:
Generated on Thu Dec 22 13:01:21 2011 for Chaste by  doxygen 1.6.3