#include <AbstractCardiacCellFactory.hpp>
Public Member Functions | |
virtual AbstractCardiacCell * | CreateCardiacCellForNode (unsigned) |
virtual AbstractCardiacCell * | CreateCardiacCellForTissueNode (unsigned)=0 |
virtual void | FinaliseCellCreation (std::vector< AbstractCardiacCell * > *pCellsDistributed, unsigned lo, unsigned hi) |
virtual unsigned | GetNumberOfCells () |
AbstractCardiacCellFactory (AbstractIvpOdeSolver *pSolver=new EulerIvpOdeSolver) | |
virtual | ~AbstractCardiacCellFactory () |
void | SetMesh (AbstractMesh< SPACE_DIM, SPACE_DIM > *pMesh) |
AbstractMesh< SPACE_DIM, SPACE_DIM > * | GetMesh () |
Protected Attributes | |
ZeroStimulus * | mpZeroStimulus |
AbstractIvpOdeSolver * | mpSolver |
AbstractMesh< SPACE_DIM, SPACE_DIM > * | mpMesh |
AbstractCardiacCell * | mpFakeCell |
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.
AbstractCardiacCellFactory< SPACE_DIM >::AbstractCardiacCellFactory | ( | AbstractIvpOdeSolver * | pSolver = new EulerIvpOdeSolver |
) | [inline] |
Default constructor.
NB: The ODE solver passed to this class *must* have been allocated with new, since this class deletes the solver in its destructor.
Definition at line 63 of file AbstractCardiacCellFactory.cpp.
References AbstractCardiacCellFactory< SPACE_DIM >::mpFakeCell, AbstractCardiacCellFactory< SPACE_DIM >::mpMesh, and AbstractCardiacCellFactory< SPACE_DIM >::mpZeroStimulus.
AbstractCardiacCellFactory< SPACE_DIM >::~AbstractCardiacCellFactory | ( | ) | [inline, virtual] |
Destructor: free solver, zero stimulus and fake bath cell.
Definition at line 72 of file AbstractCardiacCellFactory.cpp.
References AbstractCardiacCellFactory< SPACE_DIM >::mpFakeCell, and AbstractCardiacCellFactory< SPACE_DIM >::mpZeroStimulus.
AbstractCardiacCell * AbstractCardiacCellFactory< 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).
Definition at line 34 of file AbstractCardiacCellFactory.cpp.
References AbstractCardiacCellFactory< SPACE_DIM >::CreateCardiacCellForTissueNode(), AbstractCardiacCellFactory< SPACE_DIM >::mpFakeCell, and AbstractCardiacCellFactory< SPACE_DIM >::mpMesh.
Referenced by AbstractCardiacPde< SPACE_DIM >::AbstractCardiacPde().
virtual AbstractCardiacCell* AbstractCardiacCellFactory< SPACE_DIM >::CreateCardiacCellForTissueNode | ( | unsigned | ) | [pure virtual] |
Must be overridden by subclasses to return a cell object for the given node.
Implemented in QuarterStimulusCellFactory< CELL, DIM >.
Referenced by AbstractCardiacCellFactory< SPACE_DIM >::CreateCardiacCellForNode().
void AbstractCardiacCellFactory< 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.
Definition at line 48 of file AbstractCardiacCellFactory.cpp.
Referenced by AbstractCardiacPde< SPACE_DIM >::AbstractCardiacPde().
ZeroStimulus* AbstractCardiacCellFactory< SPACE_DIM >::mpZeroStimulus [protected] |
For use at unstimulated cells.
Definition at line 58 of file AbstractCardiacCellFactory.hpp.
Referenced by AbstractCardiacCellFactory< SPACE_DIM >::AbstractCardiacCellFactory(), and AbstractCardiacCellFactory< SPACE_DIM >::~AbstractCardiacCellFactory().
AbstractMesh<SPACE_DIM,SPACE_DIM>* AbstractCardiacCellFactory< SPACE_DIM >::mpMesh [protected] |
The mesh is automatically set in MonodomainProblem and BidomainProblem.
Definition at line 62 of file AbstractCardiacCellFactory.hpp.
Referenced by AbstractCardiacCellFactory< SPACE_DIM >::AbstractCardiacCellFactory(), and AbstractCardiacCellFactory< SPACE_DIM >::CreateCardiacCellForNode().
AbstractCardiacCell* AbstractCardiacCellFactory< SPACE_DIM >::mpFakeCell [protected] |
A fake cell object to use at bath nodes.
Definition at line 64 of file AbstractCardiacCellFactory.hpp.
Referenced by AbstractCardiacCellFactory< SPACE_DIM >::AbstractCardiacCellFactory(), AbstractCardiacCellFactory< SPACE_DIM >::CreateCardiacCellForNode(), and AbstractCardiacCellFactory< SPACE_DIM >::~AbstractCardiacCellFactory().