Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM > Class Template Reference

#include <ExtendedBidomainSolver.hpp>

+ Inheritance diagram for ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >:
+ Collaboration diagram for ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >:

Public Member Functions

 ExtendedBidomainSolver (bool bathSimulation, AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM > *pMesh, ExtendedBidomainTissue< SPACE_DIM > *pTissue, BoundaryConditionsContainer< ELEM_DIM, SPACE_DIM, 3 > *pBoundaryConditions)
 
 ~ExtendedBidomainSolver ()
 
- Public Member Functions inherited from AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >
 AbstractExtendedBidomainSolver (bool bathSimulation, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, ExtendedBidomainTissue< SPACE_DIM > *pTissue, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 3 > *pBcc)
 
virtual ~AbstractExtendedBidomainSolver ()
 
void SetFixedExtracellularPotentialNodes (std::vector< unsigned > fixedExtracellularPotentialNodes)
 
void SetRowForAverageOfPhiZeroed (unsigned rowMeanPhiEZero)
 
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 3 > * GetBoundaryConditions ()
 
- Public Member Functions inherited from AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 3 >
 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
 
ExtendedBidomainAssembler< ELEM_DIM, SPACE_DIM > * mpExtendedBidomainAssembler
 
ExtendedBidomainNeumannSurfaceTermAssembler< ELEM_DIM, SPACE_DIM > * mpExtendedBidomainNeumannSurfaceTermAssembler
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >
virtual void CheckCompatibilityCondition ()
 
void PrepareForSetupLinearSystem (Vec existingSolution)
 
virtual void FinaliseLinearSystem (Vec existingSolution)
 
virtual Vec GenerateNullBasis () const
 
- Protected Member Functions inherited from AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 3 >
void InitialiseHdf5Writer ()
 
void WriteOneStep (double time, Vec solution)
 
- Protected Attributes inherited from AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >
bool mBathSimulation
 
ExtendedBidomainTissue< SPACE_DIM > * mpExtendedBidomainTissue
 
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 3 > * mpBoundaryConditions
 
ExtendedBidomainAssembler< ELEMENT_DIM, SPACE_DIM > * mpExtendedBidomainAssembler
 
HeartConfigmpConfig
 
bool mNullSpaceCreated
 
std::vector< unsignedmFixedExtracellularPotentialNodes
 
unsigned mRowForAverageOfPhiZeroed
 
- Protected Attributes inherited from AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, 3 >
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 ELEM_DIM, unsigned SPACE_DIM>
class ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >

An extended bidomain solver, which computes the right-hand-side (RHS) vector of the linear system to be solved using matrix-vector products.

Definition at line 59 of file ExtendedBidomainSolver.hpp.

Constructor & Destructor Documentation

◆ ExtendedBidomainSolver()

◆ ~ExtendedBidomainSolver()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::~ExtendedBidomainSolver ( )

Destructor

Definition at line 211 of file ExtendedBidomainSolver.cpp.

References PetscTools::Destroy().

Member Function Documentation

◆ InitialiseForSolve()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ExtendedBidomainSolver< 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 AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >.

Definition at line 42 of file ExtendedBidomainSolver.cpp.

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

◆ SetupLinearSystem()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem ( Vec  currentSolution,
bool  computeMatrix 
)
privatevirtual

Implementation of SetupLinearSystem() which uses the assembler to compute the LHS matrix, but sets up the RHS vector using the mass-matrix (constructed using a separate assembler) multiplied by a vector

Parameters
currentSolutionSolution at current time
computeMatrixWhether to compute the matrix of the linear system
Todo:
turn these into exceptions somewhere else

The following line should also have

  • intracellular_stimulus_first_cell - intracellular_stimulus_second_cell in the summation, but they are zero...

Implements AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.

Definition at line 64 of file ExtendedBidomainSolver.cpp.

References AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::Assemble(), DistributedVector::Begin(), GenericEventHandler< 16, HeartEventHandler >::BeginEvent(), DistributedVectorFactory::CreateDistributedVector(), DistributedVector::End(), GenericEventHandler< 16, HeartEventHandler >::EndEvent(), PetscMatTools::Finalise(), PdeSimulationTime::GetPdeTimeStep(), DistributedVector::Restore(), and AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::SetMatrixToAssemble().

Member Data Documentation

◆ mMassMatrix

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
Mat ExtendedBidomainSolver< ELEM_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 66 of file ExtendedBidomainSolver.hpp.

◆ mpExtendedBidomainAssembler

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
ExtendedBidomainAssembler<ELEM_DIM,SPACE_DIM>* ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainAssembler
private

The bidomain assembler, used to set up the LHS matrix

Definition at line 75 of file ExtendedBidomainSolver.hpp.

Referenced by ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::ExtendedBidomainSolver().

◆ mpExtendedBidomainNeumannSurfaceTermAssembler

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
ExtendedBidomainNeumannSurfaceTermAssembler<ELEM_DIM,SPACE_DIM>* ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainNeumannSurfaceTermAssembler
private

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

Definition at line 78 of file ExtendedBidomainSolver.hpp.

Referenced by ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::ExtendedBidomainSolver().

◆ mVecForConstructingRhs

template<unsigned ELEM_DIM, unsigned SPACE_DIM>
Vec ExtendedBidomainSolver< ELEM_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 72 of file ExtendedBidomainSolver.hpp.

Referenced by ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::ExtendedBidomainSolver().


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