Chaste  Release::2017.1
AveragedSourceParabolicPde< DIM > Class Template Reference

#include <AveragedSourceParabolicPde.hpp>

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

Public Member Functions

 AveragedSourceParabolicPde (AbstractCellPopulation< DIM, DIM > &rCellPopulation, double duDtCoefficient=1.0, double diffusionCoefficient=1.0, double sourceCoefficient=0.0)
 
const AbstractCellPopulation< DIM > & rGetCellPopulation () const
 
virtual void SetupSourceTerms (TetrahedralMesh< DIM, DIM > &rCoarseMesh, std::map< CellPtr, unsigned > *pCellPdeElementMap=nullptr)
 
virtual double ComputeDuDtCoefficientFunction (const ChastePoint< DIM > &rX)
 
virtual double ComputeSourceTerm (const ChastePoint< DIM > &rX, double u, Element< DIM, DIM > *pElement=NULL)
 
virtual double ComputeSourceTermAtNode (const Node< DIM > &rNode, double u)
 
virtual c_matrix< double, DIM, DIM > ComputeDiffusionTerm (const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement=NULL)
 
double GetUptakeRateForElement (unsigned elementIndex)
 
- Public Member Functions inherited from AbstractLinearParabolicPde< DIM, DIM >
 AbstractLinearParabolicPde ()
 
virtual ~AbstractLinearParabolicPde ()
 
virtual double ComputeDuDtCoefficientFunction (const ChastePoint< SPACE_DIM > &rX)=0
 
virtual double ComputeSourceTerm (const ChastePoint< SPACE_DIM > &rX, double u, Element< ELEMENT_DIM, SPACE_DIM > *pElement=nullptr)=0
 
virtual double ComputeSourceTermAtNode (const Node< SPACE_DIM > &rNode, double u)
 
virtual c_matrix< double, SPACE_DIM, SPACE_DIM > ComputeDiffusionTerm (const ChastePoint< SPACE_DIM > &rX, Element< ELEMENT_DIM, SPACE_DIM > *pElement=NULL)=0
 
- Public Member Functions inherited from AbstractLinearPde< ELEMENT_DIM, SPACE_DIM >
 AbstractLinearPde ()
 
virtual ~AbstractLinearPde ()
 

Protected Attributes

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

Private Member Functions

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

Friends

class TestCellBasedParabolicPdes
 
class boost::serialization::access
 

Detailed Description

template<unsigned DIM>
class AveragedSourceParabolicPde< DIM >

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

The PDE takes the form

c*du/dt = Grad.(D*Grad(u)) + k*u*rho(x),

where the scalars c, D and k are specified by the members mDuDtCoefficient, 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.

Definition at line 66 of file AveragedSourceParabolicPde.hpp.

Constructor & Destructor Documentation

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

Constructor.

Parameters
rCellPopulationreference to the cell population
duDtCoefficientrate of reaction (defaults to 1.0)
diffusionCoefficientrate of diffusion (defaults to 1.0)
sourceCoefficientthe source term coefficient (defaults to 0.0)

Definition at line 40 of file AveragedSourceParabolicPde.cpp.

Member Function Documentation

template<unsigned DIM>
c_matrix< double, DIM, DIM > AveragedSourceParabolicPde< DIM >::ComputeDiffusionTerm ( const ChastePoint< DIM > &  rX,
Element< DIM, DIM > *  pElement = NULL 
)
virtual

Overridden ComputeDiffusionTerm() method.

Parameters
rXthe point in space at which the diffusion term is computed
pElementthe mesh element that x is contained in (optional; defaults to NULL).
Returns
a matrix.

Definition at line 129 of file AveragedSourceParabolicPde.cpp.

References AveragedSourceParabolicPde< DIM >::mDiffusionCoefficient.

template<unsigned DIM>
double AveragedSourceParabolicPde< DIM >::ComputeDuDtCoefficientFunction ( const ChastePoint< DIM > &  rX)
virtual

Overridden ComputeDuDtCoefficientFunction() method.

Returns
the function c(x) in "c(x) du/dt = Grad.(DiffusionTerm(x)*Grad(u))+LinearSourceTerm(x)+NonlinearSourceTerm(x, u)"
Parameters
rXthe point in space at which the function c is computed

Definition at line 104 of file AveragedSourceParabolicPde.cpp.

References AveragedSourceParabolicPde< DIM >::mDuDtCoefficient.

template<unsigned DIM>
double AveragedSourceParabolicPde< DIM >::ComputeSourceTerm ( const ChastePoint< DIM > &  rX,
double  u,
Element< DIM, DIM > *  pElement = NULL 
)
virtual

Overridden ComputeSourceTerm() method.

Returns
computed source term.
Parameters
rXthe point in space at which the nonlinear source term is computed
uthe value of the dependent variable at the point
pElementthe mesh element that x is contained in (optional; defaults to NULL).

Definition at line 110 of file AveragedSourceParabolicPde.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AveragedSourceParabolicPde< DIM >::mCellDensityOnCoarseElements, and AveragedSourceParabolicPde< DIM >::mSourceCoefficient.

template<unsigned DIM>
double AveragedSourceParabolicPde< DIM >::ComputeSourceTermAtNode ( const Node< DIM > &  rNode,
double  u 
)
virtual

Overridden ComputeSourceTermAtNode() method. That is never called.

Returns
computed source term at a node.
Parameters
rNodethe node at which the nonlinear source term is computed
uthe value of the dependent variable at the node

Definition at line 121 of file AveragedSourceParabolicPde.cpp.

References NEVER_REACHED.

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

Definition at line 135 of file AveragedSourceParabolicPde.cpp.

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

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

Definition at line 52 of file AveragedSourceParabolicPde.cpp.

References AveragedSourceParabolicPde< DIM >::mrCellPopulation.

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

Friends And Related Function Documentation

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

Needed for serialization.

Definition at line 73 of file AveragedSourceParabolicPde.hpp.

Member Data Documentation

template<unsigned DIM>
std::vector<double> AveragedSourceParabolicPde< DIM >::mCellDensityOnCoarseElements
protected
template<unsigned DIM>
double AveragedSourceParabolicPde< DIM >::mDiffusionCoefficient
protected
template<unsigned DIM>
double AveragedSourceParabolicPde< DIM >::mDuDtCoefficient
protected
template<unsigned DIM>
AbstractCellPopulation<DIM, DIM>& AveragedSourceParabolicPde< DIM >::mrCellPopulation
protected
template<unsigned DIM>
double AveragedSourceParabolicPde< DIM >::mSourceCoefficient
protected

Coefficient of the rate of uptake of the dependent variable by non-apoptotic cells.

Definition at line 102 of file AveragedSourceParabolicPde.hpp.

Referenced by AveragedSourceParabolicPde< DIM >::ComputeSourceTerm(), and AveragedSourceParabolicPde< DIM >::serialize().


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