Chaste Commit::43b116bb45f11066c455b15e05c77f8bbe23ac85
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 constantSourceCoefficient=0.0, double linearSourceCoefficient=0.0, double diffusionCoefficient=1.0, bool scaleByCellVolume=false)
 
const AbstractCellPopulation< DIM > & rGetCellPopulation () const
 
double GetConstantCoefficient () const
 
double GetLinearCoefficient () const
 
double GetDiffusionCoefficient () const
 
bool GetScaleByCellVolume () const
 
virtual void SetupSourceTerms (TetrahedralMesh< DIM, DIM > &rCoarseMesh, std::map< CellPtr, unsigned > *pCellPdeElementMap=nullptr)
 
double ComputeConstantInUSourceTerm (const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement) override
 
double ComputeLinearInUCoeffInSourceTerm (const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement) override
 
c_matrix< double, DIM, DIM > ComputeDiffusionTerm (const ChastePoint< DIM > &rX) override
 
double GetUptakeRateForElement (unsigned elementIndex)
 
- Public Member Functions inherited from AbstractLinearEllipticPde< DIM, DIM >
 AbstractLinearEllipticPde ()
 
 ~AbstractLinearEllipticPde () override=default
 
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 mConstantSourceCoefficient
 
double mLinearSourceCoefficient
 
double mDiffusionCoefficient
 
bool mScaleByCellVolume
 
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  constantSourceCoefficient = 0.0,
double  linearSourceCoefficient = 0.0,
double  diffusionCoefficient = 1.0,
bool  scaleByCellVolume = false 
)

Constructor.

Parameters
rCellPopulationreference to the cell population
constantSourceCoefficientthe constant source term coefficient (defaults to 0.0)
linearSourceCoefficientthe linear source term coefficient (defaults to 0.0)
diffusionCoefficientthe rate of diffusion (defaults to 1.0)
scaleByCellVolumewhether to scale by cell volume (defaults to)

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 
)
override

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 145 of file AveragedSourceEllipticPde.cpp.

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

◆ ComputeDiffusionTerm()

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

Overridden ComputeDiffusionTerm() method.

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

Definition at line 161 of file AveragedSourceEllipticPde.cpp.

◆ ComputeLinearInUCoeffInSourceTerm()

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

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 153 of file AveragedSourceEllipticPde.cpp.

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

◆ GetConstantCoefficient()

template<unsigned DIM>
double AveragedSourceEllipticPde< DIM >::GetConstantCoefficient ( ) const
Returns
mConstantSourceCoefficient

Definition at line 60 of file AveragedSourceEllipticPde.cpp.

◆ GetDiffusionCoefficient()

template<unsigned DIM>
double AveragedSourceEllipticPde< DIM >::GetDiffusionCoefficient ( ) const
Returns
mDiffusionCoefficient

Definition at line 72 of file AveragedSourceEllipticPde.cpp.

◆ GetLinearCoefficient()

template<unsigned DIM>
double AveragedSourceEllipticPde< DIM >::GetLinearCoefficient ( ) const
Returns
mLinearSourceCoefficient

Definition at line 66 of file AveragedSourceEllipticPde.cpp.

◆ GetScaleByCellVolume()

template<unsigned DIM>
bool AveragedSourceEllipticPde< DIM >::GetScaleByCellVolume ( ) const
Returns
mScaleByCellVolume

Definition at line 78 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 167 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 54 of file AveragedSourceEllipticPde.cpp.

◆ serialize()

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

◆ 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

Definition at line 84 of file AveragedSourceEllipticPde.cpp.

References EXCEPTION, 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 111 of file AveragedSourceEllipticPde.hpp.

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

◆ mConstantSourceCoefficient

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

Coefficient of constant source term.

Definition at line 99 of file AveragedSourceEllipticPde.hpp.

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

◆ mDiffusionCoefficient

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

Diffusion coefficient.

Definition at line 105 of file AveragedSourceEllipticPde.hpp.

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

◆ mLinearSourceCoefficient

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

Coefficient of linear source term.

Definition at line 102 of file AveragedSourceEllipticPde.hpp.

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

◆ mrCellPopulation

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

The cell population member.

Definition at line 96 of file AveragedSourceEllipticPde.hpp.

◆ mScaleByCellVolume

template<unsigned DIM>
bool AveragedSourceEllipticPde< DIM >::mScaleByCellVolume
protected

Whether to scale terms by cell volume.

Definition at line 108 of file AveragedSourceEllipticPde.hpp.

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


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