Chaste Release::3.1
BidomainSolver< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <BidomainSolver.hpp>

Inheritance diagram for BidomainSolver< ELEMENT_DIM, SPACE_DIM >:
Collaboration diagram for BidomainSolver< ELEMENT_DIM, SPACE_DIM >:

List of all members.

Public Member Functions

 BidomainSolver (bool bathSimulation, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, BidomainTissue< SPACE_DIM > *pTissue, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 2 > *pBoundaryConditions, unsigned numQuadPoints=2)

Private Member Functions

void InitialiseForSolve (Vec initialSolution)
void SetupLinearSystem (Vec currentSolution, bool computeMatrix)

Private Attributes

Mat mMassMatrix
Vec mVecForConstructingRhs
BidomainAssembler< ELEMENT_DIM,
SPACE_DIM > * 
mpBidomainAssembler
BidomainNeumannSurfaceTermAssembler
< ELEMENT_DIM, SPACE_DIM > * 
mpBidomainNeumannSurfaceTermAssembler
BidomainCorrectionTermAssembler
< ELEMENT_DIM, SPACE_DIM > * 
mpBidomainCorrectionTermAssembler

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class BidomainSolver< ELEMENT_DIM, SPACE_DIM >

A bidomain solver, which uses various assemblers to set up the bidomain FEM linear system.

The discretised bidomain equation leads to the linear system (see FEM implementations document)

[ (chi*C/dt) M + K1 K1 ] [ V^{n+1} ] = [ (chi*C/dt) M V^{n} + M F^{n} + c1_surf ] [ K1 K2 ] [ PhiE^{n+1}] [ c2_surf ]

where chi is the surface-area to volume ratio, C the capacitance, dt the timestep M the mass matrix, K1 and K2 stiffness matrices, V^{n} and PhiE^{n} the vector of voltages and phi_e at time n, F^{n} the vector of (chi*Iionic + Istim) at each node, and c1_surf and c2_surf vectors arising from any surface stimuli (usually zero).

This solver uses two assemblers, one to assemble the whole LHS matrix, and also to compute c1_surf and c2_surf, and one to assemble the mass matrix M.

Also allows state variable interpolation (SVI) to be used on elements for which it will be needed, if the appropriate HeartConfig boolean is set. See wiki page ChasteGuides/StateVariableInterpolation for more details on this. In this case the vector [c_correction, 0] is added to the above, and another assembler is used to create the c_correction.

Definition at line 82 of file BidomainSolver.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
BidomainSolver< ELEMENT_DIM, SPACE_DIM >::BidomainSolver ( bool  bathSimulation,
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh,
BidomainTissue< SPACE_DIM > *  pTissue,
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 2 > *  pBoundaryConditions,
unsigned  numQuadPoints = 2 
)

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void BidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve ( Vec  initialSolution) [private, virtual]

Overloaded InitialiseForSolve() which calls base version but also initialises mMassMatrix and mVecForConstructingRhs

Parameters:
initialSolutioninitial solution

Reimplemented from AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >.

Definition at line 43 of file BidomainSolver.cpp.

References AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), and PetscTools::SetupMat().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void BidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem ( Vec  currentSolution,
bool  computeMatrix 
) [private, virtual]

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Mat BidomainSolver< ELEMENT_DIM, SPACE_DIM >::mMassMatrix [private]

Mass matrix, used to computing the RHS vector (actually: mass-matrix in voltage-voltage block, zero elsewhere)

Definition at line 88 of file BidomainSolver.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
BidomainAssembler<ELEMENT_DIM,SPACE_DIM>* BidomainSolver< ELEMENT_DIM, SPACE_DIM >::mpBidomainAssembler [private]

The bidomain assembler, used to set up the LHS matrix

Definition at line 97 of file BidomainSolver.hpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
BidomainCorrectionTermAssembler<ELEMENT_DIM,SPACE_DIM>* BidomainSolver< ELEMENT_DIM, SPACE_DIM >::mpBidomainCorrectionTermAssembler [private]

If using state variable interpolation, points to an assembler to use in computing the correction term to apply to the RHS.

Definition at line 106 of file BidomainSolver.hpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
BidomainNeumannSurfaceTermAssembler<ELEMENT_DIM,SPACE_DIM>* BidomainSolver< ELEMENT_DIM, SPACE_DIM >::mpBidomainNeumannSurfaceTermAssembler [private]

Assembler for surface integrals coming from any non-zero Neumann boundary conditions

Definition at line 100 of file BidomainSolver.hpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Vec BidomainSolver< ELEMENT_DIM, SPACE_DIM >::mVecForConstructingRhs [private]

The vector multiplied by the mass matrix. Ie, if the linear system to be solved is Ax=b, this vector is z where b=Mz.

Definition at line 94 of file BidomainSolver.hpp.

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


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