Chaste  Release::3.4
PdeAndBoundaryConditions< DIM > Class Template Reference

#include <PdeAndBoundaryConditions.hpp>

+ Collaboration diagram for PdeAndBoundaryConditions< DIM >:

Public Member Functions

 PdeAndBoundaryConditions (AbstractLinearEllipticPde< DIM, DIM > *pPde=NULL, AbstractBoundaryCondition< DIM > *pBoundaryCondition=NULL, bool isNeumannBoundaryCondition=true, Vec solution=NULL, bool deleteMemberPointersInDestructor=false)
 
 ~PdeAndBoundaryConditions ()
 
AbstractLinearEllipticPde< DIM,
DIM > * 
GetPde ()
 
AbstractBoundaryCondition< DIM > * GetBoundaryCondition () const
 
Vec GetSolution ()
 
Vec GetSolution () const
 
void SetSolution (Vec solution)
 
bool IsNeumannBoundaryCondition ()
 
bool HasAveragedSourcePde ()
 
void DestroySolution ()
 
void SetUpSourceTermsForAveragedSourcePde (TetrahedralMesh< DIM, DIM > *pMesh, std::map< CellPtr, unsigned > *pCellPdeElementMap=NULL)
 
void SetDependentVariableName (const std::string &rName)
 
std::string & rGetDependentVariableName ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Private Attributes

AbstractLinearEllipticPde< DIM,
DIM > * 
mpPde
 
AbstractBoundaryCondition< DIM > * mpBoundaryCondition
 
bool mIsNeumannBoundaryCondition
 
Vec mSolution
 
bool mDeleteMemberPointersInDestructor
 
std::string mDependentVariableName
 

Friends

class TestPdeAndBoundaryConditions
 
class boost::serialization::access
 

Detailed Description

template<unsigned DIM>
class PdeAndBoundaryConditions< DIM >

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 CellBasedPdeHandler class.

Definition at line 59 of file PdeAndBoundaryConditions.hpp.

Constructor & Destructor Documentation

template<unsigned DIM>
PdeAndBoundaryConditions< DIM >::PdeAndBoundaryConditions ( AbstractLinearEllipticPde< DIM, DIM > *  pPde = NULL,
AbstractBoundaryCondition< DIM > *  pBoundaryCondition = NULL,
bool  isNeumannBoundaryCondition = true,
Vec  solution = NULL,
bool  deleteMemberPointersInDestructor = false 
)

Constructor.

Parameters
pPdeA pointer to a linear elliptic PDE object (defaults to NULL)
pBoundaryConditionA pointer to an abstract boundary condition (defaults to NULL, corresponding to a constant boundary condition with value zero)
isNeumannBoundaryConditionWhether the boundary condition is Neumann (defaults to true)
solutionA solution vector (defaults to NULL)
deleteMemberPointersInDestructorwhether to delete member pointers in the destructor (defaults to false)

Definition at line 39 of file PdeAndBoundaryConditions.cpp.

References PdeAndBoundaryConditions< DIM >::mSolution.

template<unsigned DIM>
PdeAndBoundaryConditions< DIM >::~PdeAndBoundaryConditions ( )

Destructor.

Definition at line 58 of file PdeAndBoundaryConditions.cpp.

Member Function Documentation

template<unsigned DIM>
void PdeAndBoundaryConditions< DIM >::DestroySolution ( )
template<unsigned DIM>
AbstractBoundaryCondition< DIM > * PdeAndBoundaryConditions< DIM >::GetBoundaryCondition ( ) const
Returns
mpBoundaryCondition

Definition at line 77 of file PdeAndBoundaryConditions.cpp.

Referenced by CellBasedPdeHandler< DIM >::ConstructBoundaryConditionsContainer().

template<unsigned DIM>
AbstractLinearEllipticPde< DIM, DIM > * PdeAndBoundaryConditions< DIM >::GetPde ( )
Returns
mpPde

Definition at line 71 of file PdeAndBoundaryConditions.cpp.

Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().

template<unsigned DIM>
Vec PdeAndBoundaryConditions< DIM >::GetSolution ( ) const
Returns
mSolution (used in archiving)

Definition at line 89 of file PdeAndBoundaryConditions.cpp.

template<unsigned DIM>
bool PdeAndBoundaryConditions< DIM >::HasAveragedSourcePde ( )
Returns
whether the PDE is of type AveragedSourcePde

Definition at line 107 of file PdeAndBoundaryConditions.cpp.

Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().

template<unsigned DIM>
bool PdeAndBoundaryConditions< DIM >::IsNeumannBoundaryCondition ( )
Returns
mIsNeumannBoundaryCondition

Definition at line 101 of file PdeAndBoundaryConditions.cpp.

Referenced by CellBasedPdeHandler< DIM >::ConstructBoundaryConditionsContainer().

template<unsigned DIM>
std::string & PdeAndBoundaryConditions< DIM >::rGetDependentVariableName ( )

Get the name of the dependent variable.

Returns
the name

Definition at line 135 of file PdeAndBoundaryConditions.cpp.

Referenced by CellBasedPdeHandler< DIM >::AddPdeAndBc(), and CellBasedPdeHandler< DIM >::WritePdeSolution().

template<unsigned DIM>
template<class Archive >
void PdeAndBoundaryConditions< DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate
template<unsigned DIM>
void PdeAndBoundaryConditions< DIM >::SetDependentVariableName ( const std::string &  rName)

Set the name of the dependent variable.

Parameters
rNamethe name.

Definition at line 129 of file PdeAndBoundaryConditions.cpp.

template<unsigned DIM>
void PdeAndBoundaryConditions< DIM >::SetSolution ( Vec  solution)

Set mSolution.

Parameters
solutionthe current solution

Definition at line 95 of file PdeAndBoundaryConditions.cpp.

Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().

template<unsigned DIM>
void PdeAndBoundaryConditions< DIM >::SetUpSourceTermsForAveragedSourcePde ( TetrahedralMesh< DIM, DIM > *  pMesh,
std::map< CellPtr, unsigned > *  pCellPdeElementMap = NULL 
)

In the case where mpPde is of type AveragedSourcePde, set the source terms using the information in the given mesh.

Parameters
pMeshPointer to a tetrahedral mesh
pCellPdeElementMapmap between cells and elements, from CellBasedPdeHandler

Definition at line 122 of file PdeAndBoundaryConditions.cpp.

Referenced by CellBasedPdeHandler< DIM >::SolvePdeAndWriteResultsToFile().

Friends And Related Function Documentation

template<unsigned DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 66 of file PdeAndBoundaryConditions.hpp.

Member Data Documentation

template<unsigned DIM>
bool PdeAndBoundaryConditions< DIM >::mDeleteMemberPointersInDestructor
private

Whether to delete member pointers in the destructor (used in archiving).

Definition at line 96 of file PdeAndBoundaryConditions.hpp.

template<unsigned DIM>
std::string PdeAndBoundaryConditions< DIM >::mDependentVariableName
private

For use in PDEs where we know what the quantity for which we are solving is called, e.g. oxygen concentration.

Definition at line 101 of file PdeAndBoundaryConditions.hpp.

Referenced by PdeAndBoundaryConditions< DIM >::serialize().

template<unsigned DIM>
bool PdeAndBoundaryConditions< DIM >::mIsNeumannBoundaryCondition
private

Whether the boundary condition is Neumann (false corresponds to a Dirichlet boundary condition).

Definition at line 90 of file PdeAndBoundaryConditions.hpp.

Referenced by PdeAndBoundaryConditions< DIM >::serialize().

template<unsigned DIM>
AbstractBoundaryCondition<DIM>* PdeAndBoundaryConditions< DIM >::mpBoundaryCondition
private

Pointer to a boundary condition object.

Definition at line 87 of file PdeAndBoundaryConditions.hpp.

Referenced by PdeAndBoundaryConditions< DIM >::serialize().

template<unsigned DIM>
AbstractLinearEllipticPde<DIM,DIM>* PdeAndBoundaryConditions< DIM >::mpPde
private

Pointer to a linear elliptic PDE object.

Definition at line 84 of file PdeAndBoundaryConditions.hpp.

Referenced by PdeAndBoundaryConditions< DIM >::serialize().

template<unsigned DIM>
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 93 of file PdeAndBoundaryConditions.hpp.

Referenced by PdeAndBoundaryConditions< DIM >::PdeAndBoundaryConditions().


The documentation for this class was generated from the following files: