Chaste  Release::3.4
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 >:

Public Member Functions

 BidomainSolver (bool bathSimulation, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, BidomainTissue< SPACE_DIM > *pTissue, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 2 > *pBoundaryConditions)
 
- Public Member Functions inherited from AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >
 AbstractBidomainSolver (bool bathSimulation, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, BidomainTissue< SPACE_DIM > *pTissue, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 2 > *pBoundaryConditions)
 
virtual ~AbstractBidomainSolver ()
 
void SetFixedExtracellularPotentialNodes (std::vector< unsigned > fixedExtracellularPotentialNodes)
 
void SetRowForAverageOfPhiZeroed (unsigned rowMeanPhiEZero)
 
BoundaryConditionsContainer
< ELEMENT_DIM, SPACE_DIM, 2 > * 
GetBoundaryConditions ()
 
void ResetBoundaryConditionsContainer (BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 2 > *pBcc)
 
- Public Member Functions inherited from AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 2 >
 AbstractDynamicLinearPdeSolver (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
 
void SetTimes (double tStart, double tEnd)
 
void SetTimeStep (double dt)
 
void SetInitialCondition (Vec initialCondition)
 
virtual Vec Solve ()
 
void SetMatrixIsNotAssembled ()
 
void SetTimeAdaptivityController (AbstractTimeAdaptivityController *pTimeAdaptivityController)
 
void SetOutputToVtk (bool output)
 
void SetOutputToParallelVtk (bool output)
 
void SetOutputToTxt (bool output)
 
void SetOutputDirectoryAndPrefix (std::string outputDirectory, std::string prefix)
 
void SetPrintingTimestepMultiple (unsigned multiple)
 
- Public Member Functions inherited from AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >
 AbstractLinearPdeSolver (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
 
virtual ~AbstractLinearPdeSolver ()
 
virtual void FollowingSolveLinearSystem (Vec currentSolution)
 
LinearSystemGetLinearSystem ()
 

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
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >
virtual void CheckCompatibilityCondition ()
 
void PrepareForSetupLinearSystem (Vec existingSolution)
 
virtual void FinaliseLinearSystem (Vec existingSolution)
 
virtual Vec GenerateNullBasis () const
 
void FinaliseForBath (bool computeMatrix, bool computeVector)
 
- Protected Member Functions inherited from AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 2 >
void InitialiseHdf5Writer ()
 
void WriteOneStep (double time, Vec solution)
 
- Protected Attributes inherited from AbstractBidomainSolver< ELEMENT_DIM, SPACE_DIM >
bool mBathSimulation
 
BidomainTissue< SPACE_DIM > * mpBidomainTissue
 
BoundaryConditionsContainer
< ELEMENT_DIM, SPACE_DIM, 2 > * 
mpBoundaryConditions
 
bool mNullSpaceCreated
 
HeartConfigmpConfig
 
std::vector< unsignedmFixedExtracellularPotentialNodes
 
unsigned mRowForAverageOfPhiZeroed
 
- Protected Attributes inherited from AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 2 >
double mTstart
 
double mTend
 
bool mTimesSet
 
Vec mInitialCondition
 
bool mMatrixIsAssembled
 
bool mMatrixIsConstant
 
double mIdealTimeStep
 
double mLastWorkingTimeStep
 
AbstractTimeAdaptivityControllermpTimeAdaptivityController
 
bool mOutputToVtk
 
bool mOutputToParallelVtk
 
bool mOutputToTxt
 
std::string mOutputDirectory
 
std::string mFilenamePrefix
 
unsigned mPrintingTimestepMultiple
 
Hdf5DataWritermpHdf5Writer
 
std::vector< int > mVariableColumnIds
 
- Protected Attributes inherited from AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >
LinearSystemmpLinearSystem
 
AbstractTetrahedralMesh
< ELEMENT_DIM, SPACE_DIM > * 
mpMesh
 

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 80 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 
)

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void BidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve ( Vec  initialSolution)
privatevirtual

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 
)
privatevirtual

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 86 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 95 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 104 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 98 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 92 of file BidomainSolver.hpp.

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


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