AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM > Class Template Reference

#include <AbstractCardiacCellFactory.hpp>

Inheritance diagram for AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >:

Inheritance graph
[legend]
Collaboration diagram for AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual AbstractCardiacCellCreateCardiacCellForNode (unsigned nodeIndex)
virtual AbstractCardiacCellCreateCardiacCellForTissueNode (unsigned nodeIndex)=0
virtual void FinaliseCellCreation (std::vector< AbstractCardiacCell * > *pCellsDistributed, unsigned lo, unsigned hi)
virtual unsigned GetNumberOfCells ()
 AbstractCardiacCellFactory (boost::shared_ptr< AbstractIvpOdeSolver > pSolver=boost::shared_ptr< AbstractIvpOdeSolver >(new EulerIvpOdeSolver))
virtual ~AbstractCardiacCellFactory ()
void SetMesh (AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM > *pMesh)
AbstractTetrahedralMesh
< ELEM_DIM, SPACE_DIM > * 
GetMesh ()

Protected Attributes

boost::shared_ptr< ZeroStimulusmpZeroStimulus
boost::shared_ptr
< AbstractIvpOdeSolver
mpSolver
AbstractCardiacCellmpFakeCell

Private Attributes

AbstractTetrahedralMesh
< ELEM_DIM, SPACE_DIM > * 
mpMesh


Detailed Description

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
class AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >

A factory to ease creating cardiac cell objects for use in a mono/bidomain simulation.

The user should implement their own concrete class, in particular implementing CreateCardiacCellForTissueNode(unsigned), which should return the cell corresponding to a given node. The user should also implement GetNumberOfCells() if this isn't equal to the number of nodes. FinaliseCellCreation() can be used to (eg) add stimuli to certain cells after they have been created.

This class saves the user having to create cells in parallel, that work is done by the pde instead.

Definition at line 54 of file AbstractCardiacCellFactory.hpp.


Constructor & Destructor Documentation

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::AbstractCardiacCellFactory ( boost::shared_ptr< AbstractIvpOdeSolver pSolver = boost::shared_ptr<AbstractIvpOdeSolver>(new EulerIvpOdeSolver)  )  [inline]

Default constructor.

Parameters:
pSolver the ODE solver to use to simulate this cell.

Definition at line 63 of file AbstractCardiacCellFactory.cpp.

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::~AbstractCardiacCellFactory (  )  [inline, virtual]

Destructor: free solver, zero stimulus and fake bath cell.

Definition at line 73 of file AbstractCardiacCellFactory.cpp.

References AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::mpFakeCell.


Member Function Documentation

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
AbstractCardiacCell * AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::CreateCardiacCellForNode ( unsigned  nodeIndex  )  [inline, virtual]

Create a cell object for the given node.

The default implementation checks whether the node is in the bath (in which case a pointer to a (unique) fake cell is returned) and if not, calls CreateCardiacCellForTissueNode (which must be defined by subclasses).

Parameters:
nodeIndex Global node index.

Definition at line 34 of file AbstractCardiacCellFactory.cpp.

References HeartRegionCode::BATH, AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::CreateCardiacCellForTissueNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::mpFakeCell, and AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::mpMesh.

Referenced by AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::AbstractCardiacPde().

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
virtual AbstractCardiacCell* AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::CreateCardiacCellForTissueNode ( unsigned  nodeIndex  )  [pure virtual]

Must be overridden by subclasses to return a cell object for the given node.

Parameters:
nodeIndex Global node index.

Implemented in QuarterStimulusCellFactory< CELL, DIM >, PlaneStimulusCellFactory< CELL, ELEM_DIM, SPACE_DIM >, and ZeroStimulusCellFactory< CELL, DIM >.

Referenced by AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::CreateCardiacCellForNode().

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
void AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::FinaliseCellCreation ( std::vector< AbstractCardiacCell * > *  pCellsDistributed,
unsigned  lo,
unsigned  hi 
) [inline, virtual]

May be overridden by subclasses to perform any necessary work after all cells have been created.

Parameters:
pCellsDistributed Pointer to a vector of cardiac cell pointers.
lo Lowest index owned by this process.
hi Highest index owned by this process.

Definition at line 48 of file AbstractCardiacCellFactory.cpp.

Referenced by AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::AbstractCardiacPde().

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
unsigned AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::GetNumberOfCells (  )  [inline, virtual]

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
void AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::SetMesh ( AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM > *  pMesh  )  [inline]

Parameters:
pMesh the mesh for which to create cardiac cells.

Definition at line 79 of file AbstractCardiacCellFactory.cpp.

References AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::mpMesh.

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM > * AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::GetMesh (  )  [inline]


Member Data Documentation

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
AbstractTetrahedralMesh<ELEM_DIM,SPACE_DIM>* AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::mpMesh [private]

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
boost::shared_ptr<ZeroStimulus> AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::mpZeroStimulus [protected]

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
boost::shared_ptr<AbstractIvpOdeSolver> AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::mpSolver [protected]

The solver to give each of the cells

Definition at line 65 of file AbstractCardiacCellFactory.hpp.

Referenced by PlaneStimulusCellFactory< CELL, ELEM_DIM, SPACE_DIM >::CreateCardiacCellForTissueNode().

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
AbstractCardiacCell* AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::mpFakeCell [protected]


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

Generated on Tue Aug 4 16:10:32 2009 for Chaste by  doxygen 1.5.5