Chaste  Release::2017.1
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

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

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.

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

References AveragedSourceEllipticPde< DIM >::mDiffusionCoefficient.

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 AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AveragedSourceEllipticPde< DIM >::mCellDensityOnCoarseElements, and AveragedSourceEllipticPde< DIM >::mSourceCoefficient.

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

Definition at line 56 of file AveragedSourceEllipticPde.cpp.

References AveragedSourceEllipticPde< DIM >::mSourceCoefficient.

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

References EXPORT_TEMPLATE_CLASS_SAME_DIMS, and AveragedSourceEllipticPde< DIM >::mCellDensityOnCoarseElements.

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.

References AveragedSourceEllipticPde< DIM >::mrCellPopulation.

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.

Friends And Related Function Documentation

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

Needed for serialization.

Definition at line 75 of file AveragedSourceEllipticPde.hpp.

Member Data Documentation

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

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