#include <MatrixBasedMonodomainSolver.hpp>
Public Member Functions | |
void | InitialiseForSolve (Vec initialSolution) |
MatrixBasedMonodomainSolver (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, MonodomainTissue< ELEMENT_DIM, SPACE_DIM > *pTissue, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 1 > *pBoundaryConditions, unsigned numQuadPoints=2) | |
~MatrixBasedMonodomainSolver () | |
Private Member Functions | |
void | SetupLinearSystem (Vec currentSolution, bool computeMatrix) |
Private Attributes | |
Mat | mMassMatrix |
Vec | mVecForConstructingRhs |
MonodomainCorrectionTermAssembler < ELEMENT_DIM, SPACE_DIM > * | mpMonodomainCorrectionTermAssembler |
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.
Definition at line 48 of file MatrixBasedMonodomainSolver.hpp.
MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::MatrixBasedMonodomainSolver | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh, | |
MonodomainTissue< ELEMENT_DIM, SPACE_DIM > * | pTissue, | |||
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 1 > * | pBoundaryConditions, | |||
unsigned | numQuadPoints = 2 | |||
) | [inline] |
Constructor
pMesh | pointer to the mesh | |
pTissue | pointer to the tissue | |
pBoundaryConditions | pointer to the boundary conditions | |
numQuadPoints | number of quadrature points (defaults to 2) |
Definition at line 163 of file MatrixBasedMonodomainSolver.cpp.
References HeartConfig::Instance(), AbstractMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mNumQuadPoints, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mpMonodomainCorrectionTermAssembler, AbstractMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mpMonodomainTissue, MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mVecForConstructingRhs, and AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM >::SetCacheReplication().
MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::~MatrixBasedMonodomainSolver | ( | ) | [inline] |
Destructor
Definition at line 188 of file MatrixBasedMonodomainSolver.cpp.
References MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mMassMatrix, MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mpMonodomainCorrectionTermAssembler, and MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mVecForConstructingRhs.
void MatrixBasedMonodomainSolver< 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 |
Implements AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Definition at line 35 of file MatrixBasedMonodomainSolver.cpp.
References AbstractFeObjectAssembler< ELEMENT_DIM, SPACE_DIM, 1, false, true, NORMAL >::Assemble(), PetscMatTools::AssembleFinal(), LinearSystem::AssembleFinalLhsMatrix(), LinearSystem::AssembleFinalPrecondMatrix(), AbstractFeObjectAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::AssembleMatrix(), LinearSystem::AssembleRhsVector(), AbstractFeObjectAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::AssembleVector(), DistributedVector::Begin(), GenericEventHandler< 13, HeartEventHandler >::BeginEvent(), DistributedVectorFactory::CreateDistributedVector(), DistributedVector::End(), GenericEventHandler< 13, HeartEventHandler >::EndEvent(), HeartConfig::GetCapacitance(), PdeSimulationTime::GetPdeTimeStepInverse(), HeartConfig::GetSurfaceAreaToVolumeRatio(), HeartConfig::Instance(), MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mMassMatrix, AbstractMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mNumQuadPoints, AbstractMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mpBoundaryConditions, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpLinearSystem, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, AbstractMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mpMonodomainAssembler, MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mpMonodomainCorrectionTermAssembler, AbstractMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mpMonodomainTissue, MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mVecForConstructingRhs, DistributedVector::Restore(), LinearSystem::rGetLhsMatrix(), LinearSystem::rGetPrecondMatrix(), LinearSystem::rGetRhsVector(), AbstractFeObjectAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::SetMatrixToAssemble(), AbstractFeObjectAssembler< ELEMENT_DIM, SPACE_DIM, 1, false, true, NORMAL >::SetMatrixToAssemble(), LinearSystem::SetPrecondMatrixIsDifferentFromLhs(), HeartConfig::SetUseMassLumping(), and AbstractFeObjectAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::SetVectorToAssemble().
void MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve | ( | Vec | initialSolution | ) | [inline, virtual] |
Overloaded InitialiseForSolve() which calls base version but also initialises mMassMatrix and mVecForConstructingRhs.
initialSolution | initial solution |
Reimplemented from AbstractMonodomainSolver< ELEMENT_DIM, SPACE_DIM >.
Definition at line 139 of file MatrixBasedMonodomainSolver.cpp.
References AbstractMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mMassMatrix, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpLinearSystem, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mVecForConstructingRhs, LinearSystem::rGetRhsVector(), and PetscTools::SetupMat().
Mat MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mMassMatrix [private] |
The mass matrix, used to computing the RHS vector
Definition at line 53 of file MatrixBasedMonodomainSolver.hpp.
Referenced by MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem(), and MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::~MatrixBasedMonodomainSolver().
Vec MatrixBasedMonodomainSolver< 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 58 of file MatrixBasedMonodomainSolver.hpp.
Referenced by MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::MatrixBasedMonodomainSolver(), MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem(), and MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::~MatrixBasedMonodomainSolver().
MonodomainCorrectionTermAssembler<ELEMENT_DIM,SPACE_DIM>* MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::mpMonodomainCorrectionTermAssembler [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 64 of file MatrixBasedMonodomainSolver.hpp.
Referenced by MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::MatrixBasedMonodomainSolver(), MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::SetupLinearSystem(), and MatrixBasedMonodomainSolver< ELEMENT_DIM, SPACE_DIM >::~MatrixBasedMonodomainSolver().