AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <AbstractCardiacTissue.hpp>

Inheritance diagram for AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >:

Inheritance graph
[legend]
Collaboration diagram for AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AbstractCardiacTissue (AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM > *pCellFactory)
 AbstractCardiacTissue (std::vector< AbstractCardiacCell * > &rCellsDistributed, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
virtual ~AbstractCardiacTissue ()
void MergeCells (const std::vector< AbstractCardiacCell * > &rOtherCells)
void SetCacheReplication (bool doCacheReplication)
bool GetDoCacheReplication ()
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 * > & 
rGetCellsDistributed () const
const AbstractTetrahedralMesh
< ELEMENT_DIM, SPACE_DIM > * 
pGetMesh () const
template<class Archive>
void SaveCardiacCells (Archive &archive, const unsigned int version) const

Static Public Member Functions

template<class Archive>
static void LoadCardiacCells (Archive &archive, const unsigned int version, std::vector< AbstractCardiacCell * > &rCells, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)

Protected Attributes

AbstractTetrahedralMesh
< ELEMENT_DIM, SPACE_DIM > * 
mpMesh
AbstractConductivityTensors
< ELEMENT_DIM, SPACE_DIM > * 
mpIntracellularConductivityTensors
std::vector
< AbstractCardiacCell * > 
mCellsDistributed
ReplicatableVector mIionicCacheReplicated
ReplicatableVector mIntracellularStimulusCacheReplicated
HeartConfigmpConfig
bool mDoCacheReplication
DistributedVectorFactorympDistributedVectorFactory
bool mMeshUnarchived
std::string mFibreFilePathNoExtension

Private Member Functions

template<class Archive>
void save (Archive &archive, const unsigned int version) const
template<class Archive>
void load (Archive &archive, const unsigned int version)
void CreateIntracellularConductivityTensor ()

Friends

class boost::serialization::access


Detailed Description

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

Class containing "tissue-like" functionality used in monodomain and bidomain problems.

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

Also contains knowledge of parallelisation in the form of the distributed vector factory. This class deals with created a distributed vector of cells, and getting the ionic current and stimuli from these cells and putting them in replicated arrays for the PDE solvers to call.

Definition at line 68 of file AbstractCardiacTissue.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::AbstractCardiacTissue ( AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM > *  pCellFactory  )  [inline]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::AbstractCardiacTissue ( std::vector< AbstractCardiacCell * > &  rCellsDistributed,
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh 
) [inline]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::~AbstractCardiacTissue (  )  [inline, virtual]


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
template<class Archive>
void AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::save ( Archive &  archive,
const unsigned int  version 
) const [inline, private]

Archive the member variables.

Parameters:
archive 
version 

Definition at line 81 of file AbstractCardiacTissue.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
template<class Archive>
void AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::load ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Unarchive the member variables.

Parameters:
archive 
version 

Definition at line 147 of file AbstractCardiacTissue.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::CreateIntracellularConductivityTensor (  )  [inline, private]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::MergeCells ( const std::vector< AbstractCardiacCell * > &  rOtherCells  )  [inline]

Add more cells to this class.

This method is used by the checkpoint migration code to load a simulation checkpointed in parallel onto a single process. It adds the cells previously contained on one of the non-master processes to this process' collection.

Parameters:
rOtherCells the cells to add. This vector will have the same length as our collection, but contain non-NULL pointers in (some of) the places we have NULLs.

Definition at line 144 of file AbstractCardiacTissue.cpp.

References AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mCellsDistributed.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCardiacTissue< ELEMENT_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 272 of file AbstractCardiacTissue.cpp.

References AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mDoCacheReplication.

Referenced by BasicMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::BasicMonodomainSolver(), and MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::MatrixBasedMonodomainSolver().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::GetDoCacheReplication (  )  [inline]

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

Returns:
mDoCacheReplication - true if the cache needs to be replicated

Definition at line 278 of file AbstractCardiacTissue.cpp.

References AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mDoCacheReplication.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
const c_matrix< double, SPACE_DIM, SPACE_DIM > & AbstractCardiacTissue< ELEMENT_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 284 of file AbstractCardiacTissue.cpp.

References AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mpIntracellularConductivityTensors.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCardiacCell * AbstractCardiacTissue< ELEMENT_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 291 of file AbstractCardiacTissue.cpp.

References DistributedVectorFactory::GetHigh(), DistributedVectorFactory::GetLow(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mCellsDistributed, and AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory.

Referenced by CardiacSimulation::CreateAndRun().

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ReplicatableVector & AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::rGetIionicCacheReplicated (  )  [inline]

Get the entire ionic current cache

Definition at line 340 of file AbstractCardiacTissue.cpp.

References AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mIionicCacheReplicated.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ReplicatableVector & AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::rGetIntracellularStimulusCacheReplicated (  )  [inline]

Get the entire stimulus current cache

Definition at line 346 of file AbstractCardiacTissue.cpp.

References AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mIntracellularStimulusCacheReplicated.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCardiacTissue< ELEMENT_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 352 of file AbstractCardiacTissue.cpp.

References AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mCellsDistributed, AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mIionicCacheReplicated, and AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mIntracellularStimulusCacheReplicated.

Referenced by AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SolveCellSystems().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::ReplicateCaches (  )  [inline]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
const std::vector< AbstractCardiacCell * > & AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::rGetCellsDistributed (  )  const [inline]

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

Definition at line 366 of file AbstractCardiacTissue.cpp.

References AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mCellsDistributed.

Referenced by AbstractCardiacTissue< SPACE_DIM >::SaveCardiacCells().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
const AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::pGetMesh (  )  const [inline]

Returns a pointer to the mesh object

Returns:
pointer to mesh object

Definition at line 372 of file AbstractCardiacTissue.cpp.

References AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mpMesh.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
template<class Archive>
void AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SaveCardiacCells ( Archive &  archive,
const unsigned int  version 
) const [inline]

Save our tissue to an archive.

Writes:

  1. mpDistributedVectorFactory
  2. number of cells on this process
  3. each cell pointer in turn

Parameters:
archive the master archive; cells will actually be written to the process-specific archive.
version 

Definition at line 354 of file AbstractCardiacTissue.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
template<class Archive>
static void AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::LoadCardiacCells ( Archive &  archive,
const unsigned int  version,
std::vector< AbstractCardiacCell * > &  rCells,
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh 
) [inline, static]

Load our tissue from an archive.

Handles the checkpoint migration case, deleting loaded cells immediately if they are not local to this process.

Parameters:
archive the process-specific archive to load from
version archive version
rCells vector to fill in with pointers to local cells
pMesh the mesh, so we can get at the node permutation, if any

Todo:
#1199 test this

Definition at line 391 of file AbstractCardiacTissue.hpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::LoadExtraArchive().


Friends And Related Function Documentation

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


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mpMesh [protected]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
AbstractConductivityTensors<ELEMENT_DIM,SPACE_DIM>* AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mpIntracellularConductivityTensors [protected]

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
ReplicatableVector AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mIionicCacheReplicated [protected]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
ReplicatableVector AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mIntracellularStimulusCacheReplicated [protected]

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
HeartConfig* AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mpConfig [protected]

Local pointer to the HeartConfig singleton instance, for convenience.

Definition at line 203 of file AbstractCardiacTissue.hpp.

Referenced by AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::CreateIntracellularConductivityTensor().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool AbstractCardiacTissue< ELEMENT_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 214 of file AbstractCardiacTissue.hpp.

Referenced by AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::GetDoCacheReplication(), AbstractCardiacTissue< SPACE_DIM >::load(), AbstractCardiacTissue< SPACE_DIM >::save(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SetCacheReplication(), and AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SolveCellSystems().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
DistributedVectorFactory* AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mpDistributedVectorFactory [protected]

Local pointer to the distributed vector factory associated with the mesh object used.

Used to retrieve node ownership range when needed.

NB: This is set from mpMesh->GetDistributedVectorFactory() and thus always equal to that. We never assume ownership of the object.

Definition at line 224 of file AbstractCardiacTissue.hpp.

Referenced by AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::AbstractCardiacTissue(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::GetCardiacCell(), AbstractCardiacTissue< SPACE_DIM >::load(), AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::ReplicateCaches(), AbstractCardiacTissue< SPACE_DIM >::save(), and AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SolveCellSystems().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
bool AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mMeshUnarchived [protected]

Whether the mesh was unarchived or got from elsewhere.

Definition at line 229 of file AbstractCardiacTissue.hpp.

Referenced by AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::~AbstractCardiacTissue().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM = ELEMENT_DIM>
std::string AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::mFibreFilePathNoExtension [protected]


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

Generated on Mon Nov 1 12:35:35 2010 for Chaste by  doxygen 1.5.5