#include <MonodomainDg0Assembler.hpp>
Public Member Functions | |
MonodomainDg0Assembler (AbstractMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, MonodomainPde< SPACE_DIM > *pPde, BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 1 > *pBcc, unsigned numQuadPoints=2) | |
Static Public Attributes | |
static const unsigned | E_DIM = ELEMENT_DIM |
static const unsigned | S_DIM = SPACE_DIM |
static const unsigned | P_DIM = 1u |
Protected Types | |
typedef MonodomainDg0Assembler < ELEMENT_DIM, SPACE_DIM > | SelfType |
typedef SimpleDg0ParabolicAssembler < ELEMENT_DIM, SPACE_DIM, false, SelfType > | BaseClassType |
Protected Member Functions | |
virtual c_vector< double, 1 *(ELEMENT_DIM+1)> | ComputeVectorTerm (c_vector< double, ELEMENT_DIM+1 > &rPhi, c_matrix< double, ELEMENT_DIM, ELEMENT_DIM+1 > &rGradPhi, ChastePoint< SPACE_DIM > &rX, c_vector< double, 1 > &u, c_matrix< double, 1, SPACE_DIM > &rGradU, Element< ELEMENT_DIM, SPACE_DIM > *pElement) |
void | ResetInterpolatedQuantities (void) |
void | IncrementInterpolatedQuantities (double phi_i, const Node< SPACE_DIM > *pNode) |
virtual void | PrepareForAssembleSystem (Vec currentSolution, double currentTime) |
void | InitialiseForSolve (Vec initialSolution) |
Protected Attributes | |
double | mSourceTerm |
MonodomainPde< SPACE_DIM > * | mpMonodomainPde |
Friends | |
class | AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, 1u, false, BaseClassType > |
Allow the AbstractStaticAssembler to call our private/protected methods using static polymorphism. |
This is essentially the same as the SimpleDg0ParabolicAssembler (which it inherits from), except that the source term (ie ionic current + stimulus) is interpolated from their nodal values, instead of computed at the gauss point, since they are only known at the nodes.
Also, the MonodomainAssembler automatically creates zero neumann boundary conditions when constructed and therefore does not need to take in a BoundaryConditionsContainer.
The user should call Solve() from the superclass AbstractDynamicAssemblerMixin.
Definition at line 52 of file MonodomainDg0Assembler.hpp.
MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::MonodomainDg0Assembler | ( | AbstractMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh, | |
MonodomainPde< SPACE_DIM > * | pPde, | |||
BoundaryConditionsContainer< ELEMENT_DIM, SPACE_DIM, 1 > * | pBcc, | |||
unsigned | numQuadPoints = 2 | |||
) | [inline] |
Constructor stores the mesh and pde and sets up boundary conditions.
Definition at line 93 of file MonodomainDg0Assembler.cpp.
References AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpBoundaryConditions, and AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, SimpleDg0ParabolicAssembler< ELEMENT_DIM, SPACE_DIM, NON_HEART, MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM > > >::SetMesh().
c_vector< double, 1 *(ELEMENT_DIM+1)> MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::ComputeVectorTerm | ( | c_vector< double, ELEMENT_DIM+1 > & | rPhi, | |
c_matrix< double, ELEMENT_DIM, ELEMENT_DIM+1 > & | rGradPhi, | |||
ChastePoint< SPACE_DIM > & | rX, | |||
c_vector< double, 1 > & | u, | |||
c_matrix< double, 1, SPACE_DIM > & | rGradU, | |||
Element< ELEMENT_DIM, SPACE_DIM > * | pElement | |||
) | [inline, protected, virtual] |
This method is called by AssembleOnElement() and tells the assembler the contribution to add to the element stiffness vector.
Here, the SimpleDg0ParabolicAssembler version of this method is overloaded using the interpolated source term
Definition at line 35 of file MonodomainDg0Assembler.cpp.
void MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::ResetInterpolatedQuantities | ( | void | ) | [inline, protected, virtual] |
The concrete subclass can overload this and IncrementInterpolatedQuantities() if there are some quantities which need to be computed at each Gauss point. They are called in AssembleOnElement()
Reimplemented from AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Definition at line 49 of file MonodomainDg0Assembler.cpp.
void MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::IncrementInterpolatedQuantities | ( | double | phi_i, | |
const Node< SPACE_DIM > * | pNode | |||
) | [inline, protected, virtual] |
The concrete subclass can overload this and ResetInterpolatedQuantities() if there are some quantities which need to be computed at each Gauss point. They are called in AssembleOnElement()
Reimplemented from AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Definition at line 56 of file MonodomainDg0Assembler.cpp.
References Node< SPACE_DIM >::GetIndex(), and AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, SimpleDg0ParabolicAssembler< ELEMENT_DIM, SPACE_DIM, NON_HEART, MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM > > >::mCurrentSolutionOrGuessReplicated.
void MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::PrepareForAssembleSystem | ( | Vec | currentSolutionOrGuess, | |
double | currentTime | |||
) | [inline, protected, virtual] |
This method is called at the beginning of AssembleSystem() and should be overloaded in the concrete assembler class if there is any work to be done before assembling, for example integrating ODEs such as in the Monodomain assembler.
Reimplemented from AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Definition at line 64 of file MonodomainDg0Assembler.cpp.
void MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve | ( | Vec | initialSolution | ) | [inline, protected, virtual] |
Create the linear system object if it hasn't been already.
Can use an initial solution as PETSc template, or base it on the mesh size.
Reimplemented from AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, 1, NON_HEART, SimpleDg0ParabolicAssembler< ELEMENT_DIM, SPACE_DIM, NON_HEART, MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM > > >.
Definition at line 72 of file MonodomainDg0Assembler.cpp.
References AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, 1, NON_HEART, SimpleDg0ParabolicAssembler< ELEMENT_DIM, SPACE_DIM, NON_HEART, CONCRETE > >::InitialiseForSolve(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, SimpleDg0ParabolicAssembler< ELEMENT_DIM, SPACE_DIM, NON_HEART, MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM > > >::mpLinearSystem, LinearSystem::SetAbsoluteTolerance(), LinearSystem::SetKspType(), LinearSystem::SetPcType(), and LinearSystem::SetRelativeTolerance().