#include <AbstractLinearAssembler.hpp>
Public Member Functions | |
AbstractLinearAssembler (unsigned numQuadPoints=2) | |
~AbstractLinearAssembler () | |
virtual Vec | Solve (Vec currentSolutionOrGuess=NULL, double currentTime=0.0) |
Protected Member Functions | |
void | SetMatrixIsConst (bool matrixIsConstant=true) |
void | ApplyDirichletConditions (Vec unusedVector, bool applyToMatrix) |
virtual void | InitialiseForSolve (Vec initialSolution) |
bool | ProblemIsNonlinear () |
virtual Vec | StaticSolve (Vec currentSolutionOrGuess=NULL, double currentTime=0.0, bool assembleMatrix=true) |
Private Attributes | |
bool | mMatrixIsConstant |
Definition at line 43 of file AbstractLinearAssembler.hpp.
AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AbstractLinearAssembler | ( | unsigned | numQuadPoints = 2 |
) | [inline] |
Constructors just call the base class versions.
numQuadPoints | number of quadrature points (defaults to 2) |
Definition at line 205 of file AbstractLinearAssembler.hpp.
AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::~AbstractLinearAssembler | ( | ) | [inline] |
Destructor: ensures that the linear solver is thrown away.
Definition at line 212 of file AbstractLinearAssembler.hpp.
void AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::SetMatrixIsConst | ( | bool | matrixIsConstant = true |
) | [inline, protected, virtual] |
Hack for dynamic mixin.
matrixIsConstant | defaults to true |
Reimplemented from AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Definition at line 148 of file AbstractLinearAssembler.hpp.
References AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::mMatrixIsConstant.
void AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::ApplyDirichletConditions | ( | Vec | unusedVector, | |
bool | applyToMatrix | |||
) | [inline, protected, virtual] |
Apply Dirichlet boundary conditions to the linear system.
unusedVector | ||
applyToMatrix |
Implements AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Definition at line 154 of file AbstractLinearAssembler.hpp.
References BoundaryConditionsContainer< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::ApplyDirichletToLinearProblem(), AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpBoundaryConditions, and AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::mpLinearSystem.
void AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::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.
initialSolution | an initial guess |
Implements AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Reimplemented in BidomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >, MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >, and BidomainDg0Assembler< DIM, DIM >.
Definition at line 160 of file AbstractLinearAssembler.hpp.
References GenericEventHandler< 11, HeartEventHandler >::BeginEvent(), GenericEventHandler< 11, HeartEventHandler >::EndEvent(), AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::mMatrixIsConstant, AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::mpLinearSystem, AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::mpMesh, and LinearSystem::SetMatrixIsConstant().
Referenced by BidomainDg0Assembler< ELEMENT_DIM, SPACE_DIM >::InitialiseForSolve(), and AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::Solve().
bool AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::ProblemIsNonlinear | ( | ) | [inline, protected, virtual] |
Whether grad_u should be calculated
Implements AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Definition at line 190 of file AbstractLinearAssembler.hpp.
Vec AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::StaticSolve | ( | Vec | currentSolutionOrGuess = NULL , |
|
double | currentTime = 0.0 , |
|||
bool | assembleMatrix = true | |||
) | [inline, protected, virtual] |
Solve a static pde, or a dynamic pde for 1 timestep.
The mesh, pde and boundary conditions container must be set first.
currentSolutionOrGuess | either the current solution (dynamic problem) or initial guess (static problem) (defaults to NULL) | |
currentTime | for a dynamic problem, the current time (defaults to 0.0) | |
assembleMatrix | whether to assemble the matrix (defaults to true) |
Implements AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.
Definition at line 196 of file AbstractLinearAssembler.hpp.
References AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::AssembleSystem(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::mpLinearSystem, and LinearSystem::Solve().
Referenced by AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::Solve().
Vec AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::Solve | ( | Vec | currentSolutionOrGuess = NULL , |
|
double | currentTime = 0.0 | |||
) | [inline, virtual] |
Solve the static pde.
The mesh, pde and boundary conditions container must be set before Solve() is called.
currentSolutionOrGuess | either the current solution or initial guess (defaults to NULL) | |
currentTime | the current time (defaults to 0.0) |
Reimplemented in SimpleDg0ParabolicAssembler< ELEMENT_DIM, SPACE_DIM, NON_HEART, CONCRETE >, and SimpleDg0ParabolicAssembler< ELEMENT_DIM, SPACE_DIM, false, MonodomainDg0Assembler< ELEMENT_DIM, SPACE_DIM > >.
Definition at line 217 of file AbstractLinearAssembler.hpp.
References AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::InitialiseForSolve(), AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::mpMesh, AbstractStaticAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::PrepareForSolve(), and AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::StaticSolve().
bool AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::mMatrixIsConstant [private] |
Whether the matrix is unchanged each time Solve() is called
Definition at line 48 of file AbstractLinearAssembler.hpp.
Referenced by AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::InitialiseForSolve(), and AbstractLinearAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, NON_HEART, CONCRETE >::SetMatrixIsConst().