BidomainProblem< DIM > Class Template Reference

#include <BidomainProblem.hpp>

Inheritance diagram for BidomainProblem< DIM >:

Inheritance graph
[legend]
Collaboration diagram for BidomainProblem< DIM >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BidomainProblem (AbstractCardiacCellFactory< DIM > *pCellFactory, bool hasBath=false)
void SetFixedExtracellularPotentialNodes (std::vector< unsigned > nodes)
void SetNodeForAverageOfPhiZeroed (unsigned node)
BidomainPde< DIM > * GetBidomainPde ()
void WriteInfo (double time)
virtual void DefineWriterColumns ()
virtual void WriteOneStep (double time, Vec voltageVec)
void PreSolveChecks ()
void SetElectrodes (Electrodes< DIM > &rElectrodes)
void OnEndOfTimestep (double time)

Protected Member Functions

AbstractCardiacPde< DIM > * CreateCardiacPde ()
AbstractDynamicAssemblerMixin
< DIM, DIM, 2 > * 
CreateAssembler ()

Protected Attributes

BidomainPde< DIM > * mpBidomainPde

Private Member Functions

Vec CreateInitialCondition ()
void AnalyseMeshForBath ()

Private Attributes

std::vector< unsigned > mFixedExtracellularPotentialNodes
unsigned mExtracelluarColumnId
unsigned mRowForAverageOfPhiZeroed
bool mHasBath
Electrodes< DIM > * mpElectrodes
BidomainDg0Assembler< DIM, DIM > * mpAssembler

Friends

class TestBidomainWithBathAssembler


Detailed Description

template<unsigned DIM>
class BidomainProblem< DIM >

Class which specifies and solves a bidomain problem.

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 53 of file BidomainProblem.hpp.


Constructor & Destructor Documentation

template<unsigned DIM>
BidomainProblem< DIM >::BidomainProblem ( AbstractCardiacCellFactory< DIM > *  pCellFactory,
bool  hasBath = false 
) [inline]

Constructor

Parameters:
pCellFactory User defined cell factory which shows how the pde should create cells. Whether the simulation has a bath (if this is true, all elements with attribute = 1 will be set to be bath elements (the rest should have attribute = 0)).

Definition at line 172 of file BidomainProblem.cpp.


Member Function Documentation

template<unsigned DIM>
Vec BidomainProblem< DIM >::CreateInitialCondition (  )  [inline, private, virtual]

template<unsigned DIM>
void BidomainProblem< DIM >::AnalyseMeshForBath (  )  [inline, private]

Annotate bath nodes with the correct region code, if a bath is present. Will throw if mHasBath is set but no bath is present in the mesh.

Definition at line 41 of file BidomainProblem.cpp.

References BidomainProblem< DIM >::mHasBath, AbstractCardiacProblem< DIM, 2 >::mpMesh, and HeartRegionCode::TISSUE.

Referenced by BidomainProblem< DIM >::CreateCardiacPde().

template<unsigned DIM>
AbstractCardiacPde< DIM > * BidomainProblem< DIM >::CreateCardiacPde (  )  [inline, protected, virtual]

Subclasses must override this method to create a PDE object of the appropriate type.

This class will take responsibility for freeing the object when it is finished with.

Implements AbstractCardiacProblem< DIM, 2 >.

Definition at line 107 of file BidomainProblem.cpp.

References BidomainProblem< DIM >::AnalyseMeshForBath(), and AbstractCardiacProblem< DIM, 2 >::mpCellFactory.

template<unsigned DIM>
AbstractDynamicAssemblerMixin< DIM, DIM, 2 > * BidomainProblem< DIM >::CreateAssembler (  )  [inline, protected, virtual]

template<unsigned DIM>
void BidomainProblem< DIM >::SetFixedExtracellularPotentialNodes ( std::vector< unsigned >  nodes  )  [inline]

Set the nodes at which phi_e (the extracellular potential) is fixed to zero. This does not necessarily have to be called. If it is not, phi_e is only defined up to a constant.

Parameters:
the nodes to be fixed.
NOTE: currently, the value of phi_e at the fixed nodes cannot be set to be anything other than zero.

Definition at line 184 of file BidomainProblem.cpp.

template<unsigned DIM>
void BidomainProblem< DIM >::SetNodeForAverageOfPhiZeroed ( unsigned  node  )  [inline]

Set which row of the linear system should be used to enforce the condition that the average of phi_e is zero. If not called, this condition will not be used.

Definition at line 196 of file BidomainProblem.cpp.

template<unsigned DIM>
BidomainPde< DIM > * BidomainProblem< DIM >::GetBidomainPde (  )  [inline]

Get the pde. Can only be called after Initialise()

Definition at line 202 of file BidomainProblem.cpp.

template<unsigned DIM>
void BidomainProblem< DIM >::WriteInfo ( double  time  )  [inline, virtual]

Print out time and max/min voltage/phi_e values at current time.

Implements AbstractCardiacProblem< DIM, 2 >.

Definition at line 209 of file BidomainProblem.cpp.

References AbstractCardiacProblem< DIM, 2 >::mpMesh, and AbstractCardiacProblem< DIM, 2 >::mSolution.

template<unsigned DIM>
void BidomainProblem< DIM >::PreSolveChecks (  )  [inline, virtual]

Performs a series of checks before solving. It checks whether the cardiac pde has been defined, whether the simulation time is greater than zero and whether the output directory is specified (or the output is set not to be produced). It throws exceptions if any of the above checks fails.

Reimplemented from AbstractCardiacProblem< DIM, 2 >.

Definition at line 264 of file BidomainProblem.cpp.

References AbstractCardiacProblem< SPACE_DIM, PROBLEM_DIM >::PreSolveChecks().

template<unsigned DIM>
void BidomainProblem< DIM >::SetElectrodes ( Electrodes< DIM > &  rElectrodes  )  [inline]

Set an electrode class (which provides boundary conditions). Only valid if there is a bath

Definition at line 284 of file BidomainProblem.cpp.

References BidomainProblem< DIM >::mHasBath, BidomainProblem< DIM >::mpElectrodes, and AbstractCardiacProblem< DIM, 2 >::SetBoundaryConditionsContainer().

template<unsigned DIM>
void BidomainProblem< DIM >::OnEndOfTimestep ( double  time  )  [inline, virtual]


Member Data Documentation

template<unsigned DIM>
unsigned BidomainProblem< DIM >::mExtracelluarColumnId [private]

nodes at which the extracellular voltage is fixed to zero (replicated)

Definition at line 63 of file BidomainProblem.hpp.

template<unsigned DIM>
bool BidomainProblem< DIM >::mHasBath [private]

template<unsigned DIM>
Electrodes<DIM>* BidomainProblem< DIM >::mpElectrodes [private]

Electrodes used to provide a shock

Definition at line 70 of file BidomainProblem.hpp.

Referenced by BidomainProblem< DIM >::OnEndOfTimestep(), and BidomainProblem< DIM >::SetElectrodes().

template<unsigned DIM>
BidomainDg0Assembler<DIM,DIM>* BidomainProblem< DIM >::mpAssembler [private]

We need to save the assembler that is being used to switch off the electrodes (by adding default boundary conditions to the assembler)

Reimplemented from AbstractCardiacProblem< DIM, 2 >.

Definition at line 88 of file BidomainProblem.hpp.

Referenced by BidomainProblem< DIM >::CreateAssembler(), and BidomainProblem< DIM >::OnEndOfTimestep().


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

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