AbstractCardiacPde< SPACE_DIM > Class Template Reference

#include <AbstractCardiacPde.hpp>

Inheritance diagram for AbstractCardiacPde< SPACE_DIM >:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AbstractCardiacPde (AbstractCardiacCellFactory< SPACE_DIM > *pCellFactory, const unsigned stride=1)
void SetCacheReplication (bool doCacheReplication)
const c_matrix< double,
SPACE_DIM, SPACE_DIM > & 
rGetIntracellularConductivityTensor (unsigned elementIndex)
AbstractCardiacCellGetCardiacCell (unsigned globalIndex)
virtual void SolveCellSystems (Vec currentSolution, double currentTime, double nextTime)
ReplicatableVector & rGetIionicCacheReplicated ()
ReplicatableVector & rGetIntracellularStimulusCacheReplicated ()
void UpdateCaches (unsigned globalIndex, unsigned localIndex, double nextTime)
void ReplicateCaches ()

Protected Attributes

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


Detailed Description

template<unsigned SPACE_DIM>
class AbstractCardiacPde< SPACE_DIM >

Pde containing common functionality to mono and bidomain pdes.

Definition at line 62 of file AbstractCardiacPde.hpp.


Constructor & Destructor Documentation

template<unsigned SPACE_DIM>
AbstractCardiacPde< SPACE_DIM >::AbstractCardiacPde ( AbstractCardiacCellFactory< 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

Definition at line 42 of file AbstractCardiacPde.cpp.

References DistributedVector::Begin(), AbstractCardiacCellFactory< SPACE_DIM >::CreateCardiacCellForNode(), DistributedVector::End(), AbstractCardiacCellFactory< SPACE_DIM >::FinaliseCellCreation(), AbstractCardiacCellFactory< SPACE_DIM >::GetMesh(), PetscTools::GetMyRank(), AbstractCardiacCellFactory< SPACE_DIM >::GetNumberOfCells(), AbstractCardiacPde< SPACE_DIM >::mCellsDistributed, AbstractCardiacPde< SPACE_DIM >::mIionicCacheReplicated, PetscTools::NumProcs(), DistributedVector::SetProblemSize(), and DistributedVector::SetProblemSizePerProcessor().


Member Function Documentation

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

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

Get a pointer to a cell, indexed by the global node index. Should only called by the process owning the cell though.

Definition at line 194 of file AbstractCardiacPde.cpp.

References DistributedVector::Begin(), DistributedVector::End(), and AbstractCardiacPde< SPACE_DIM >::mCellsDistributed.

template<unsigned SPACE_DIM>
void AbstractCardiacPde< SPACE_DIM >::SolveCellSystems ( Vec  currentSolution,
double  currentTime,
double  nextTime 
) [inline, virtual]

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

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

Replicate the Iionic and intracellular stimulus caches.

Definition at line 264 of file AbstractCardiacPde.cpp.

References DistributedVector::Begin(), DistributedVector::End(), and AbstractCardiacPde< SPACE_DIM >::mIionicCacheReplicated.

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


Member Data Documentation

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

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

Caches containing all the ionic and stimulus currents for each node, replicated over all processes

Definition at line 75 of file AbstractCardiacPde.hpp.

Referenced by AbstractCardiacPde< SPACE_DIM >::AbstractCardiacPde(), AbstractCardiacPde< SPACE_DIM >::ReplicateCaches(), and AbstractCardiacPde< SPACE_DIM >::UpdateCaches().

template<unsigned SPACE_DIM>
const unsigned AbstractCardiacPde< 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 84 of file AbstractCardiacPde.hpp.

template<unsigned SPACE_DIM>
bool AbstractCardiacPde< 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 97 of file AbstractCardiacPde.hpp.

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

template<unsigned SPACE_DIM>
bool AbstractCardiacPde< 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 103 of file AbstractCardiacPde.hpp.

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


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

Generated on Wed Mar 18 12:52:01 2009 for Chaste by  doxygen 1.5.5