Chaste  Release::2017.1
AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <AbstractStimulusFactory.hpp>

+ Inheritance diagram for AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

virtual boost::shared_ptr< AbstractStimulusFunctionCreateStimulusForNode (Node< SPACE_DIM > *pNode)
 
virtual unsigned GetNumberOfCells ()
 
virtual void SetCompatibleExtracellularStimulus ()
 
 AbstractStimulusFactory ()
 
virtual ~AbstractStimulusFactory ()
 
void SetMesh (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
 
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * GetMesh ()
 
std::vector< AbstractChasteRegion< SPACE_DIM > * > GetRegionsToBeGrounded ()
 

Protected Attributes

AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * mpMesh
 
std::vector< AbstractChasteRegion< SPACE_DIM > * > mGroundedRegions
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
class AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >

Abstract class that specifies a stimulus factory. The core method is CreateStimulusForNode which creates a stimulus object at each node in the mesh. The default implementation (here) specifies a ZeroStimulus. child classes may override this method.

The other crucial method is SetCompatibleExtracellularStimulus which ensures that the stimulus specified obeys compatibility conditions. The implementation here is empty (compatible with ZeroStimulus which implicitly obeys compatibility conditions). child classes may over-ride the method.

Definition at line 60 of file AbstractStimulusFactory.hpp.

Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::AbstractStimulusFactory ( )

Default constructor.

Definition at line 56 of file AbstractStimulusFactory.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::~AbstractStimulusFactory ( )
virtual

Destructor

Definition at line 63 of file AbstractStimulusFactory.cpp.

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
boost::shared_ptr< AbstractStimulusFunction > AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::CreateStimulusForNode ( Node< SPACE_DIM > *  pNode)
virtual
Returns
a stimulus object for the given node. Default implementation here returns a zero stimulus.

May be overridden by child classes.

Parameters
pNodepointer to the node object

Definition at line 41 of file AbstractStimulusFactory.cpp.

Referenced by ExtendedBidomainTissue< SPACE_DIM >::ExtendedBidomainTissue().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::GetMesh ( )
Returns
the mesh used to create the stimuli.

Definition at line 80 of file AbstractStimulusFactory.cpp.

References EXCEPTION, and AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::mpMesh.

Referenced by ExtendedBidomainTissue< SPACE_DIM >::ExtendedBidomainTissue().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
unsigned AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::GetNumberOfCells ( )
virtual
Returns
The number of cells

Definition at line 49 of file AbstractStimulusFactory.cpp.

Referenced by ExtendedBidomainTissue< SPACE_DIM >::ExtendedBidomainTissue().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< AbstractChasteRegion< SPACE_DIM > * > AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::GetRegionsToBeGrounded ( )
Returns
access to the variable mGroundedRegions which stores the regions to be grounded

Definition at line 96 of file AbstractStimulusFactory.cpp.

References AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::mGroundedRegions.

Referenced by ExtendedBidomainProblem< DIM >::ProcessExtracellularStimulus().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::SetCompatibleExtracellularStimulus ( )
virtual

Empty default implementation that is compatible with the default implementation of CreateStimulusForNode (i.e., empty implementation for zero stimulus).

If needed, over-ride this

Reimplemented in ElectrodesStimulusFactory< DIM >.

Definition at line 74 of file AbstractStimulusFactory.cpp.

Referenced by ExtendedBidomainProblem< DIM >::ProcessExtracellularStimulus().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::SetMesh ( AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh)
Parameters
pMeshthe mesh for which to create stimuli.

Definition at line 68 of file AbstractStimulusFactory.cpp.

References AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::mpMesh.

Referenced by ExtendedBidomainProblem< DIM >::ProcessExtracellularStimulus().

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::vector<AbstractChasteRegion<SPACE_DIM>* > AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::mGroundedRegions
protected

Vector of regions of nodes to be grounded

Definition at line 70 of file AbstractStimulusFactory.hpp.

Referenced by AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::GetRegionsToBeGrounded().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractStimulusFactory< ELEMENT_DIM, SPACE_DIM >::mpMesh
protected

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