#include <ExtendedBidomainSolver.hpp>
Inherits AbstractExtendedBidomainSolver< 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, unsigned numQuadPoints=2) | |
~ExtendedBidomainSolver () | |
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 |
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 53 of file ExtendedBidomainSolver.hpp.
ExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::ExtendedBidomainSolver | ( | bool | bathSimulation, | |
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh, | |||
ExtendedBidomainTissue< SPACE_DIM > * | pTissue, | |||
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 3 > * | pBoundaryConditions, | |||
unsigned | numQuadPoints = 2 | |||
) | [inline] |
Constructor
bathSimulation | Whether the simulation involves a perfusing bath | |
pMesh | pointer to the mesh | |
pTissue | pointer to the PDE | |
pBoundaryConditions | pointer to the boundary conditions | |
numQuadPoints | number of quadrature points (defaults to 2) |
Definition at line 181 of file ExtendedBidomainSolver.cpp.
References EXCEPTION, AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mBathSimulation, AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mNumQuadPoints, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainAssembler, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainNeumannSurfaceTermAssembler, AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainTissue, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mVecForConstructingRhs, and AbstractCardiacTissue< SPACE_DIM >::SetCacheReplication().
ExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::~ExtendedBidomainSolver | ( | ) | [inline] |
Destructor
Definition at line 209 of file ExtendedBidomainSolver.cpp.
References ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mMassMatrix, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainAssembler, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainNeumannSurfaceTermAssembler, and ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mVecForConstructingRhs.
void ExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve | ( | Vec | initialSolution | ) | [inline, private, virtual] |
Overloaded InitialiseForSolve() which calls base version but also initialises mMassMatrix and mVecForConstructingRhs
initialSolution | initial solution |
Reimplemented from AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >.
Definition at line 35 of file ExtendedBidomainSolver.cpp.
References ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mMassMatrix, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpLinearSystem, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mVecForConstructingRhs, LinearSystem::rGetRhsVector(), and PetscTools::SetupMat().
void ExtendedBidomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem | ( | Vec | currentSolution, | |
bool | computeMatrix | |||
) | [inline, private, virtual] |
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
currentSolution | Solution at current time | |
computeMatrix | Whether to compute the matrix of the linear system |
The following line should also have
Implements AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Definition at line 58 of file ExtendedBidomainSolver.cpp.
References BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::ApplyDirichletToLinearProblem(), AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::Assemble(), AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::AssembleMatrix(), AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::AssembleVector(), DistributedVector::Begin(), GenericEventHandler< 16, HeartEventHandler >::BeginEvent(), DistributedVectorFactory::CreateDistributedVector(), DistributedVector::End(), GenericEventHandler< 16, HeartEventHandler >::EndEvent(), PetscMatTools::Finalise(), LinearSystem::FinaliseLhsMatrix(), LinearSystem::FinaliseRhsVector(), PdeSimulationTime::GetPdeTimeStep(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mMassMatrix, AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpBoundaryConditions, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainAssembler, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainNeumannSurfaceTermAssembler, AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainTissue, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpLinearSystem, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mVecForConstructingRhs, AbstractFeSurfaceIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::ResetBoundaryConditionsContainer(), DistributedVector::Restore(), LinearSystem::rGetLhsMatrix(), LinearSystem::rGetRhsVector(), AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::SetMatrixToAssemble(), AbstractFeAssemblerInterface< CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX >::SetVectorToAssemble(), and LinearSystem::SwitchWriteModeLhsMatrix().
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 60 of file ExtendedBidomainSolver.hpp.
Referenced by ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::InitialiseForSolve(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::SetupLinearSystem(), and ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::~ExtendedBidomainSolver().
ExtendedBidomainAssembler<ELEM_DIM,SPACE_DIM>* ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::mpExtendedBidomainAssembler [private] |
The bidomain assembler, used to set up the LHS matrix
Reimplemented from AbstractExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >.
Definition at line 69 of file ExtendedBidomainSolver.hpp.
Referenced by ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::ExtendedBidomainSolver(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::SetupLinearSystem(), and ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::~ExtendedBidomainSolver().
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 72 of file ExtendedBidomainSolver.hpp.
Referenced by ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::ExtendedBidomainSolver(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::SetupLinearSystem(), and ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::~ExtendedBidomainSolver().
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 66 of file ExtendedBidomainSolver.hpp.
Referenced by ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::ExtendedBidomainSolver(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::InitialiseForSolve(), ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::SetupLinearSystem(), and ExtendedBidomainSolver< ELEM_DIM, SPACE_DIM >::~ExtendedBidomainSolver().