#include <PdeAndBoundaryConditions.hpp>
A helper class for use in cell-based simulations with PDEs. The class contains a pointer to a linear elliptic PDE, which is to be solved on the domain defined by the cell population. The class also contains information describing the boundary condition that is to be imposed when solving the PDE. Currently we allow Neumann (imposed flux) or Dirichlet (imposed value) boundary conditions. The boundary condition may be constant on the boundary or vary spatially and/or temporally. In cell-based simulations with PDEs, one or more of these objects are accessed via the CellBasedHandler class.
Definition at line 52 of file PdeAndBoundaryConditions.hpp.
PdeAndBoundaryConditions< DIM >::PdeAndBoundaryConditions | ( | AbstractLinearEllipticPde< DIM, DIM > * | pPde = NULL , |
|
AbstractBoundaryCondition< DIM > * | pBoundaryCondition = NULL , |
|||
bool | isNeumannBoundaryCondition = true , |
|||
Vec | solution = NULL , |
|||
bool | deleteMemberPointersInDestructor = false | |||
) | [inline] |
Constructor.
pPde | A pointer to a linear elliptic PDE object (defaults to NULL) | |
pBoundaryCondition | A pointer to an abstract boundary condition (defaults to NULL, corresponding to a constant boundary condition with value zero) | |
isNeumannBoundaryCondition | Whether the boundary condition is Neumann (defaults to true) | |
solution | A solution vector (defaults to NULL) | |
deleteMemberPointersInDestructor | whether to delete member pointers in the destructor (defaults to false) |
Definition at line 32 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::mSolution.
PdeAndBoundaryConditions< DIM >::~PdeAndBoundaryConditions | ( | ) | [inline] |
Destructor.
Definition at line 50 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::DestroySolution(), PdeAndBoundaryConditions< DIM >::mDeleteMemberPointersInDestructor, PdeAndBoundaryConditions< DIM >::mpBoundaryCondition, and PdeAndBoundaryConditions< DIM >::mpPde.
void PdeAndBoundaryConditions< DIM >::DestroySolution | ( | ) | [inline] |
Call VecDestroy on mSolution.
Definition at line 105 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::mSolution.
Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile(), and PdeAndBoundaryConditions< DIM >::~PdeAndBoundaryConditions().
AbstractBoundaryCondition< DIM > * PdeAndBoundaryConditions< DIM >::GetBoundaryCondition | ( | ) | const [inline] |
Definition at line 69 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::mpBoundaryCondition.
Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().
AbstractLinearEllipticPde< DIM, DIM > * PdeAndBoundaryConditions< DIM >::GetPde | ( | ) | [inline] |
Definition at line 63 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::mpPde.
Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().
Vec PdeAndBoundaryConditions< DIM >::GetSolution | ( | ) | const [inline] |
Definition at line 81 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::mSolution.
Vec PdeAndBoundaryConditions< DIM >::GetSolution | ( | ) | [inline] |
Definition at line 75 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::mSolution.
Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile(), and CellBasedPdeHandler< DIM >::WritePdeSolution().
bool PdeAndBoundaryConditions< DIM >::HasAveragedSourcePde | ( | ) | [inline] |
Definition at line 99 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::mpPde.
Referenced by PdeAndBoundaryConditions< DIM >::SetUpSourceTermsForAveragedSourcePde().
bool PdeAndBoundaryConditions< DIM >::IsNeumannBoundaryCondition | ( | ) | [inline] |
Definition at line 93 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::mIsNeumannBoundaryCondition.
Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().
void PdeAndBoundaryConditions< DIM >::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Serialize the PDE object.
archive | the archive | |
version | the current version of this class |
Definition at line 67 of file PdeAndBoundaryConditions.hpp.
References PdeAndBoundaryConditions< DIM >::mIsNeumannBoundaryCondition, PdeAndBoundaryConditions< DIM >::mpBoundaryCondition, and PdeAndBoundaryConditions< DIM >::mpPde.
void PdeAndBoundaryConditions< DIM >::SetSolution | ( | Vec | solution | ) | [inline] |
Set mSolution.
solution | the current solution |
Definition at line 87 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::mSolution.
Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().
void PdeAndBoundaryConditions< DIM >::SetUpSourceTermsForAveragedSourcePde | ( | TetrahedralMesh< DIM, DIM > * | pMesh, | |
std::map< CellPtr, unsigned > * | pCellPdeElementMap = NULL | |||
) | [inline] |
In the case where mpPde is of type AveragedSourcePde, set the source terms using the information in the given mesh.
pMesh | Pointer to a tetrahedral mesh | |
pCellPdeElementMap | map between cells and elements, from CellBasedPdeHandler |
Definition at line 114 of file PdeAndBoundaryConditions.cpp.
References PdeAndBoundaryConditions< DIM >::HasAveragedSourcePde(), and PdeAndBoundaryConditions< DIM >::mpPde.
Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().
friend class boost::serialization::access [friend] |
Needed for serialization.
Definition at line 59 of file PdeAndBoundaryConditions.hpp.
bool PdeAndBoundaryConditions< DIM >::mDeleteMemberPointersInDestructor [private] |
Whether to delete member pointers in the destructor (used in archiving).
Definition at line 88 of file PdeAndBoundaryConditions.hpp.
Referenced by PdeAndBoundaryConditions< DIM >::~PdeAndBoundaryConditions().
bool PdeAndBoundaryConditions< DIM >::mIsNeumannBoundaryCondition [private] |
Whether the boundary condition is Neumann (false corresponds to a Dirichlet boundary condition).
Definition at line 82 of file PdeAndBoundaryConditions.hpp.
Referenced by PdeAndBoundaryConditions< DIM >::IsNeumannBoundaryCondition(), and PdeAndBoundaryConditions< DIM >::serialize().
AbstractBoundaryCondition<DIM>* PdeAndBoundaryConditions< DIM >::mpBoundaryCondition [private] |
Pointer to a boundary condition object.
Definition at line 79 of file PdeAndBoundaryConditions.hpp.
Referenced by PdeAndBoundaryConditions< DIM >::GetBoundaryCondition(), PdeAndBoundaryConditions< DIM >::serialize(), and PdeAndBoundaryConditions< DIM >::~PdeAndBoundaryConditions().
AbstractLinearEllipticPde<DIM,DIM>* PdeAndBoundaryConditions< DIM >::mpPde [private] |
Pointer to a linear elliptic PDE object.
Definition at line 76 of file PdeAndBoundaryConditions.hpp.
Referenced by PdeAndBoundaryConditions< DIM >::GetPde(), PdeAndBoundaryConditions< DIM >::HasAveragedSourcePde(), PdeAndBoundaryConditions< DIM >::serialize(), PdeAndBoundaryConditions< DIM >::SetUpSourceTermsForAveragedSourcePde(), and PdeAndBoundaryConditions< DIM >::~PdeAndBoundaryConditions().
Vec PdeAndBoundaryConditions< DIM >::mSolution [private] |
The solution to the PDE problem, for use as an initial guess when solving at the next time step.
Definition at line 85 of file PdeAndBoundaryConditions.hpp.
Referenced by PdeAndBoundaryConditions< DIM >::DestroySolution(), PdeAndBoundaryConditions< DIM >::GetSolution(), PdeAndBoundaryConditions< DIM >::PdeAndBoundaryConditions(), and PdeAndBoundaryConditions< DIM >::SetSolution().