#include <AbstractCardiacPde.hpp>
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) |
AbstractCardiacCell * | GetCardiacCell (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 |
Definition at line 62 of file AbstractCardiacPde.hpp.
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.
pCellFactory | factory to use to create cells. | |
stride | determines how to access V_m in the solution vector (1 for monodomain, 2 for bidomain). |
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().
void AbstractCardiacPde< SPACE_DIM >::SetCacheReplication | ( | bool | doCacheReplication | ) | [inline] |
Set whether or not to replicate the caches across all processors.
See also mDoCacheReplication.
Definition at line 181 of file AbstractCardiacPde.cpp.
References AbstractCardiacPde< SPACE_DIM >::mDoCacheReplication.
Referenced by BidomainMatrixBasedAssembler< ELEMENT_DIM, SPACE_DIM >::BidomainMatrixBasedAssembler(), and MonodomainMatrixBasedAssembler< ELEMENT_DIM, SPACE_DIM >::MonodomainMatrixBasedAssembler().
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.
void AbstractCardiacPde< SPACE_DIM >::SolveCellSystems | ( | Vec | currentSolution, | |
double | currentTime, | |||
double | nextTime | |||
) | [inline, virtual] |
Integrate the cell ODEs and update ionic current etc for each of the cells, between the two times provided.
NOTE: this used to be PrepareForAssembleSystem, but that method is now a virtual method in the assemblers not the pdes.
Definition at line 203 of file AbstractCardiacPde.cpp.
References DistributedVector::Begin(), GenericEventHandler< 11, HeartEventHandler >::BeginEvent(), DistributedVector::End(), GenericEventHandler< 11, HeartEventHandler >::EndEvent(), AbstractCardiacPde< SPACE_DIM >::mCellsDistributed, AbstractCardiacPde< SPACE_DIM >::mDoCacheReplication, AbstractCardiacPde< SPACE_DIM >::mDoOneCacheReplication, AbstractCardiacPde< SPACE_DIM >::ReplicateCaches(), PetscTools::ReplicateException(), and AbstractCardiacPde< SPACE_DIM >::UpdateCaches().
void AbstractCardiacPde< SPACE_DIM >::UpdateCaches | ( | unsigned | globalIndex, | |
unsigned | localIndex, | |||
double | nextTime | |||
) | [inline] |
Update the Iionic and intracellular stimulus caches.
Definition at line 257 of file AbstractCardiacPde.cpp.
References AbstractCardiacPde< SPACE_DIM >::mCellsDistributed, and AbstractCardiacPde< SPACE_DIM >::mIionicCacheReplicated.
Referenced by AbstractCardiacPde< SPACE_DIM >::SolveCellSystems().
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().
std::vector< AbstractCardiacCell* > AbstractCardiacPde< SPACE_DIM >::mCellsDistributed [protected] |
The vector of cells. Distributed.
Definition at line 69 of file AbstractCardiacPde.hpp.
Referenced by AbstractCardiacPde< SPACE_DIM >::AbstractCardiacPde(), AbstractCardiacPde< SPACE_DIM >::GetCardiacCell(), AbstractCardiacPde< SPACE_DIM >::SolveCellSystems(), and AbstractCardiacPde< SPACE_DIM >::UpdateCaches().
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().
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.
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().
bool AbstractCardiacPde< SPACE_DIM >::mDoOneCacheReplication [protected] |
This is to mark the conventional assembly on the first time step.
Definition at line 103 of file AbstractCardiacPde.hpp.
Referenced by AbstractCardiacPde< SPACE_DIM >::SolveCellSystems().