AbstractCardiacPde< ELEM_DIM, SPACE_DIM > Class Template Reference

#include <AbstractCardiacPde.hpp>

Inheritance diagram for AbstractCardiacPde< ELEM_DIM, SPACE_DIM >:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AbstractCardiacPde (AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM > *pCellFactory, const unsigned stride=1)
 AbstractCardiacPde (std::vector< AbstractCardiacCell * > &rCellsDistributed, const unsigned stride=1)
virtual ~AbstractCardiacPde ()
void SetCacheReplication (bool doCacheReplication)
const c_matrix< double,
SPACE_DIM, SPACE_DIM > & 
rGetIntracellularConductivityTensor (unsigned elementIndex)
AbstractCardiacCellGetCardiacCell (unsigned globalIndex)
virtual void SolveCellSystems (Vec existingSolution, double time, double nextTime)
ReplicatableVectorrGetIionicCacheReplicated ()
ReplicatableVectorrGetIntracellularStimulusCacheReplicated ()
void UpdateCaches (unsigned globalIndex, unsigned localIndex, double nextTime)
void ReplicateCaches ()
const std::vector
< AbstractCardiacCell * > & 
GetCellsDistributed () const

Protected Attributes

AbstractConductivityTensors
< SPACE_DIM > * 
mpIntracellularConductivityTensors
std::vector
< AbstractCardiacCell * > 
mCellsDistributed
ReplicatableVector mIionicCacheReplicated
ReplicatableVector mIntracellularStimulusCacheReplicated
const unsigned mStride
HeartConfigmpConfig
bool mDoCacheReplication
bool mDoOneCacheReplication
DistributedVectorFactorympDistributedVectorFactory
bool mpFactoryWasUnarchived

Private Member Functions

template<class Archive>
void serialize (Archive &archive, const unsigned int version)

Friends

class boost::serialization::access


Detailed Description

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

Class containing common functionality to monodomain and bidomain PDEs.

Contains the cardiac cells (ODE systems for each node of the mesh), conductivity tensors (dependent on fibre directions).

Also contains knowledge of parallelisation in the form of the distributed vector factory.

Definition at line 77 of file AbstractCardiacPde.hpp.


Constructor & Destructor Documentation

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::AbstractCardiacPde ( AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM > *  pCellFactory,
const unsigned  stride = 1 
) [inline]

This constructor is called from the Initialise() method of the CardiacProblem class. It creates all the cell objects, and sets up the conductivities.

Todo:
tidy up using extract method refactoring
Parameters:
pCellFactory factory to use to create cells.
stride determines how to access $V_m$ in the solution vector (1 for monodomain, 2 for bidomain).

Todo:
Create a class defining constant tensors to be used when no fibre orientation is provided.

Todo:
Create a class defining constant tensors to be used when no fibre orientation is provided.

Definition at line 42 of file AbstractCardiacPde.cpp.

References AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::CreateCardiacCellForNode(), AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::FinaliseCellCreation(), HeartConfig::GetConductivityHeterogeneities(), HeartConfig::GetConductivityHeterogeneitiesProvided(), HeartConfig::GetConductivityMedia(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetDistributedVectorFactory(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), DistributedVectorFactory::GetHigh(), HeartConfig::GetIntracellularConductivities(), HeartConfig::GetLoadMesh(), DistributedVectorFactory::GetLocalOwnership(), DistributedVectorFactory::GetLow(), AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::GetMesh(), HeartConfig::GetMeshName(), AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM >::GetNumberOfCells(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), HeartConfig::Instance(), HeartConfig::IsMeshProvided(), AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mCellsDistributed, AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mIionicCacheReplicated, AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mIntracellularStimulusCacheReplicated, AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mpConfig, AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mpDistributedVectorFactory, AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mpIntracellularConductivityTensors, and ReplicatableVector::resize().

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::AbstractCardiacPde ( std::vector< AbstractCardiacCell * > &  rCellsDistributed,
const unsigned  stride = 1 
) [inline]

This constructor is called by the archiver

Parameters:
rCellsDistributed pointers to the cardiac cells.
stride determines how to access $V_m$ in the solution vector (1 for monodomain, 2 for bidomain).

Todo:
: #98: The state of the object is inconsistent since mpIntracellularConductivityTensors has not been set.

Definition at line 150 of file AbstractCardiacPde.cpp.

References AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mpIntracellularConductivityTensors.

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


Member Function Documentation

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
template<class Archive>
void AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Archive the member variables.

Parameters:
archive 
version 

Todo:
#98 Check that mpIntracellularConductivityTensors is archived properly here.

Reimplemented in BidomainPde< SPACE_DIM >, MonodomainPde< ELEM_DIM, SPACE_DIM >, BidomainPde< DIM >, MonodomainPde< ELEM_DIM, ELEM_DIM >, and MonodomainPde< ELEMENT_DIM, SPACE_DIM >.

Definition at line 90 of file AbstractCardiacPde.hpp.

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
void AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::SetCacheReplication ( bool  doCacheReplication  )  [inline]

Set whether or not to replicate the caches across all processors.

See also mDoCacheReplication.

Parameters:
doCacheReplication - true if the cache needs to be replicated

Definition at line 192 of file AbstractCardiacPde.cpp.

References AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mDoCacheReplication.

Referenced by MonodomainMatrixBasedAssembler< ELEMENT_DIM, SPACE_DIM >::MonodomainMatrixBasedAssembler().

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
const c_matrix< double, SPACE_DIM, SPACE_DIM > & AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::rGetIntracellularConductivityTensor ( unsigned  elementIndex  )  [inline]

Get the intracellular conductivity tensor for the given element

Parameters:
elementIndex index of the element of interest

Definition at line 198 of file AbstractCardiacPde.cpp.

References AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mpIntracellularConductivityTensors.

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
AbstractCardiacCell * AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::GetCardiacCell ( unsigned  globalIndex  )  [inline]

Get a pointer to a cell, indexed by the global node index.

Note:
Should only called by the process owning the cell - triggers an assertion otherwise.
Parameters:
globalIndex global node index for which to retrieve a cell

Definition at line 205 of file AbstractCardiacPde.cpp.

References DistributedVectorFactory::GetHigh(), DistributedVectorFactory::GetLow(), AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mCellsDistributed, and AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mpDistributedVectorFactory.

Referenced by CardiacElectroMechanicsProblem< DIM >::WriteWatchedLocationData().

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
void AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::SolveCellSystems ( Vec  existingSolution,
double  time,
double  nextTime 
) [inline, virtual]

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
ReplicatableVector & AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::rGetIionicCacheReplicated (  )  [inline]

Get the entire ionic current cache

Definition at line 256 of file AbstractCardiacPde.cpp.

References AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mIionicCacheReplicated.

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
ReplicatableVector & AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::rGetIntracellularStimulusCacheReplicated (  )  [inline]

Get the entire stimulus current cache

Definition at line 262 of file AbstractCardiacPde.cpp.

References AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mIntracellularStimulusCacheReplicated.

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
void AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::UpdateCaches ( unsigned  globalIndex,
unsigned  localIndex,
double  nextTime 
) [inline]

Update the Iionic and intracellular stimulus caches.

Parameters:
globalIndex global index of the entry to update
localIndex local index of the entry to update
nextTime the next PDE time point, at which to evaluate the stimulus current

Definition at line 268 of file AbstractCardiacPde.cpp.

References AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mCellsDistributed, AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mIionicCacheReplicated, and AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mIntracellularStimulusCacheReplicated.

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

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
void AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::ReplicateCaches (  )  [inline]

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
const std::vector< AbstractCardiacCell * > & AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::GetCellsDistributed (  )  const [inline]

Returns a reference to the vector of distributed cells. Needed for archiving.

Definition at line 282 of file AbstractCardiacPde.cpp.

References AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mCellsDistributed.


Friends And Related Function Documentation

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
friend class boost::serialization::access [friend]


Member Data Documentation

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
AbstractConductivityTensors<SPACE_DIM>* AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mpIntracellularConductivityTensors [protected]

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
std::vector< AbstractCardiacCell* > AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mCellsDistributed [protected]

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
ReplicatableVector AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mIionicCacheReplicated [protected]

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
ReplicatableVector AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mIntracellularStimulusCacheReplicated [protected]

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
const unsigned AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mStride [protected]

Constant set to 1 in monodomain and 2 in bidomain. Used when accessing the voltage components in the solution vector (because the solution vector is of the form (V_1, phi_1, V_2, phi_2, ......, V_N, phi_N), where V_j is the voltage at node j and phi_j is the extracellular potential at node j.

Definition at line 127 of file AbstractCardiacPde.hpp.

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
HeartConfig* AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mpConfig [protected]

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
bool AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mDoCacheReplication [protected]

Whether we need to replicate the caches.

When doing matrix-based RHS assembly, we only actually need information from cells/nodes local to the processor, so replicating the caches is an unnecessary communication overhead.

Defaults to true.

Definition at line 141 of file AbstractCardiacPde.hpp.

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

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
bool AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mDoOneCacheReplication [protected]

This is to mark the conventional assembly on the first time step.

Todo:
maybe we don't want the conventional assembly even in the first time step.

Definition at line 148 of file AbstractCardiacPde.hpp.

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

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
DistributedVectorFactory* AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mpDistributedVectorFactory [protected]

template<unsigned ELEM_DIM, unsigned SPACE_DIM = ELEM_DIM>
bool AbstractCardiacPde< ELEM_DIM, SPACE_DIM >::mpFactoryWasUnarchived [protected]

Wether the distributed vector factory was unarchived or got from the cell factory.

Definition at line 160 of file AbstractCardiacPde.hpp.

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


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