Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
AveragedSourceEllipticPde< DIM > Class Template Reference

#include <AveragedSourceEllipticPde.hpp>

+ Inheritance diagram for AveragedSourceEllipticPde< DIM >:
+ Collaboration diagram for AveragedSourceEllipticPde< DIM >:

Public Member Functions

 AveragedSourceEllipticPde (AbstractCellPopulation< DIM > &rCellPopulation, double sourceCoefficient=0.0, double diffusionCoefficient=1.0)
 
const AbstractCellPopulation< DIM > & rGetCellPopulation () const
 
double GetCoefficient () const
 
virtual void SetupSourceTerms (TetrahedralMesh< DIM, DIM > &rCoarseMesh, std::map< CellPtr, unsigned > *pCellPdeElementMap=nullptr)
 
double ComputeConstantInUSourceTerm (const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement)
 
double ComputeLinearInUCoeffInSourceTerm (const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement)
 
c_matrix< double, DIM, DIM > ComputeDiffusionTerm (const ChastePoint< DIM > &rX)
 
double GetUptakeRateForElement (unsigned elementIndex)
 
- Public Member Functions inherited from AbstractLinearEllipticPde< DIM, DIM >
 AbstractLinearEllipticPde ()
 
virtual ~AbstractLinearEllipticPde ()
 
virtual double ComputeConstantInUSourceTerm (const ChastePoint< SPACE_DIM > &rX, Element< ELEMENT_DIM, SPACE_DIM > *pElement)=0
 
virtual double ComputeLinearInUCoeffInSourceTerm (const ChastePoint< SPACE_DIM > &rX, Element< ELEMENT_DIM, SPACE_DIM > *pElement)=0
 
virtual c_matrix< double, SPACE_DIM, SPACE_DIM > ComputeDiffusionTerm (const ChastePoint< SPACE_DIM > &rX)=0
 
virtual double ComputeConstantInUSourceTermAtNode (const Node< SPACE_DIM > &rNode)
 
virtual double ComputeLinearInUCoeffInSourceTermAtNode (const Node< SPACE_DIM > &rNode)
 
- Public Member Functions inherited from AbstractLinearPde< ELEMENT_DIM, SPACE_DIM >
 AbstractLinearPde ()
 
virtual ~AbstractLinearPde ()
 

Protected Attributes

AbstractCellPopulation< DIM > & mrCellPopulation
 
double mSourceCoefficient
 
double mDiffusionCoefficient
 
std::vector< doublemCellDensityOnCoarseElements
 

Private Member Functions

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

Friends

class TestCellBasedEllipticPdes
 
class boost::serialization::access
 

Detailed Description

template<unsigned DIM>
class AveragedSourceEllipticPde< DIM >

An elliptic PDE to be solved numerically using the finite element method, for coupling to a cell-based simulation.

The PDE takes the form

Grad.(D*Grad(u)) + k*u*rho(x) = 0,

where the scalars D and k are specified by the members mDiffusionCoefficient and mSourceCoefficient, respectively. Their values must be set in the constructor.

The function rho(x) denotes the local density of non-apoptotic cells. This quantity is computed for each element of a 'coarse' finite element mesh that is passed to the method SetupSourceTerms() and stored in the member mCellDensityOnCoarseElements. For a point x, rho(x) is defined to be the number of non-apoptotic cells whose centres lie in each finite element containing that point, scaled by the area of that element.

Todo:
make member names and methods consistent with those of AveragedSourceParabolicPde (#2876)

Definition at line 68 of file AveragedSourceEllipticPde.hpp.

Constructor & Destructor Documentation

◆ AveragedSourceEllipticPde()

template<unsigned DIM>
AveragedSourceEllipticPde< DIM >::AveragedSourceEllipticPde ( AbstractCellPopulation< DIM > &  rCellPopulation,
double  sourceCoefficient = 0.0,
double  diffusionCoefficient = 1.0 
)

Constructor.

Parameters
rCellPopulationreference to the cell population
sourceCoefficientthe source term coefficient (defaults to 0.0)
diffusionCoefficientthe rate of diffusion (defaults to 1.0)

Definition at line 40 of file AveragedSourceEllipticPde.cpp.

Member Function Documentation

◆ ComputeConstantInUSourceTerm()

template<unsigned DIM>
double AveragedSourceEllipticPde< DIM >::ComputeConstantInUSourceTerm ( const ChastePoint< DIM > &  rX,
Element< DIM, DIM > *  pElement 
)

Overridden ComputeConstantInUSourceTerm() method.

Parameters
rXThe point in space
pElementthe element
Returns
the constant in u part of the source term, i.e g(x) in Div(D Grad u) + f(x)u + g(x) = 0.

Definition at line 108 of file AveragedSourceEllipticPde.cpp.

◆ ComputeDiffusionTerm()

template<unsigned DIM>
c_matrix< double, DIM, DIM > AveragedSourceEllipticPde< DIM >::ComputeDiffusionTerm ( const ChastePoint< DIM > &  rX)

Overridden ComputeDiffusionTerm() method.

Parameters
rXThe point in space at which the diffusion term is computed
Returns
a matrix.

Definition at line 122 of file AveragedSourceEllipticPde.cpp.

◆ ComputeLinearInUCoeffInSourceTerm()

template<unsigned DIM>
double AveragedSourceEllipticPde< DIM >::ComputeLinearInUCoeffInSourceTerm ( const ChastePoint< DIM > &  rX,
Element< DIM, DIM > *  pElement 
)

Overridden ComputeLinearInUCoeffInSourceTerm() method.

Parameters
rXThe point in space
pElementthe element
Returns
the coefficient of u in the linear part of the source term, i.e f(x) in Div(D Grad u) + f(x)u + g(x) = 0.

Definition at line 114 of file AveragedSourceEllipticPde.cpp.

References EXCEPT_IF, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex().

◆ GetCoefficient()

template<unsigned DIM>
double AveragedSourceEllipticPde< DIM >::GetCoefficient ( ) const
Returns
mSourceCoefficient

Definition at line 56 of file AveragedSourceEllipticPde.cpp.

◆ GetUptakeRateForElement()

template<unsigned DIM>
double AveragedSourceEllipticPde< DIM >::GetUptakeRateForElement ( unsigned  elementIndex)
Returns
the uptake rate.
Parameters
elementIndexthe element we wish to return the uptake rate for

Definition at line 128 of file AveragedSourceEllipticPde.cpp.

◆ rGetCellPopulation()

template<unsigned DIM>
const AbstractCellPopulation< DIM > & AveragedSourceEllipticPde< DIM >::rGetCellPopulation ( ) const
Returns
const reference to the cell population (used in archiving).

Definition at line 50 of file AveragedSourceEllipticPde.cpp.

◆ serialize()

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

Serialize the PDE and its member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 83 of file AveragedSourceEllipticPde.hpp.

References AveragedSourceEllipticPde< DIM >::mCellDensityOnCoarseElements, AveragedSourceEllipticPde< DIM >::mDiffusionCoefficient, and AveragedSourceEllipticPde< DIM >::mSourceCoefficient.

◆ SetupSourceTerms()

template<unsigned DIM>
void AveragedSourceEllipticPde< DIM >::SetupSourceTerms ( TetrahedralMesh< DIM, DIM > &  rCoarseMesh,
std::map< CellPtr, unsigned > *  pCellPdeElementMap = nullptr 
)
virtual

Set up the source terms.

Parameters
rCoarseMeshreference to the coarse mesh
pCellPdeElementMapoptional pointer to the map from cells to coarse elements

Reimplemented in VolumeDependentAveragedSourceEllipticPde< DIM >.

Definition at line 62 of file AveragedSourceEllipticPde.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetContainingElementIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), and AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements().

Friends And Related Symbol Documentation

◆ boost::serialization::access

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

Needed for serialization.

Definition at line 75 of file AveragedSourceEllipticPde.hpp.

◆ TestCellBasedEllipticPdes

template<unsigned DIM>
friend class TestCellBasedEllipticPdes
friend

Definition at line 70 of file AveragedSourceEllipticPde.hpp.

Member Data Documentation

◆ mCellDensityOnCoarseElements

template<unsigned DIM>
std::vector<double> AveragedSourceEllipticPde< DIM >::mCellDensityOnCoarseElements
protected

Vector of averaged cell densities on elements of the coarse mesh.

Definition at line 103 of file AveragedSourceEllipticPde.hpp.

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

◆ mDiffusionCoefficient

template<unsigned DIM>
double AveragedSourceEllipticPde< DIM >::mDiffusionCoefficient
protected

Diffusion coefficient.

Definition at line 100 of file AveragedSourceEllipticPde.hpp.

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

◆ mrCellPopulation

template<unsigned DIM>
AbstractCellPopulation<DIM>& AveragedSourceEllipticPde< DIM >::mrCellPopulation
protected

◆ mSourceCoefficient

template<unsigned DIM>
double AveragedSourceEllipticPde< DIM >::mSourceCoefficient
protected

Coefficient of consumption of nutrient by cells.

Definition at line 97 of file AveragedSourceEllipticPde.hpp.

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


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