Chaste Commit::30a3e656d4b131f8c595cc6eb2becd297337570f
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 constantSourceCoefficient=0.0, double linearSourceCoefficient=0.0, double diffusionCoefficient=1.0, double duDtCoefficient=1.0, bool scaleByCellVolume=false)
 
const AbstractCellPopulation< DIM > & rGetCellPopulation () const
 
double GetConstantCoefficient () const
 
double GetLinearCoefficient () const
 
double GetDiffusionCoefficient () const
 
double GetDuDtCoefficient () const
 
bool GetScaleByCellVolume () const
 
virtual void SetupSourceTerms (TetrahedralMesh< DIM, DIM > &rCoarseMesh, std::map< CellPtr, unsigned > *pCellPdeElementMap=nullptr)
 
double ComputeDuDtCoefficientFunction (const ChastePoint< DIM > &rX) override
 
double ComputeSourceTerm (const ChastePoint< DIM > &rX, double u, Element< DIM, DIM > *pElement) override
 
double ComputeSourceTermAtNode (const Node< DIM > &rNode, double u) override
 
c_matrix< double, DIM, DIM > ComputeDiffusionTerm (const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement=nullptr) override
 
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)=0
 
- Public Member Functions inherited from AbstractLinearPde< ELEMENT_DIM, SPACE_DIM >
 AbstractLinearPde ()
 
virtual ~AbstractLinearPde ()
 

Protected Attributes

AbstractCellPopulation< DIM, DIM > & mrCellPopulation
 
double mConstantSourceCoefficient
 
double mLinearSourceCoefficient
 
double mDiffusionCoefficient
 
double mDuDtCoefficient
 
bool mScaleByCellVolume
 
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)) + (a*u + b) * rho(x),

where the scalars c, D, a and b are specified by the members mDuDtCoefficient, mDiffusionCoefficient, mLinearSourceCoefficient and mConstantSourceCoefficient, 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

◆ AveragedSourceParabolicPde()

template<unsigned DIM>
AveragedSourceParabolicPde< DIM >::AveragedSourceParabolicPde ( AbstractCellPopulation< DIM, DIM > &  rCellPopulation,
double  constantSourceCoefficient = 0.0,
double  linearSourceCoefficient = 0.0,
double  diffusionCoefficient = 1.0,
double  duDtCoefficient = 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)
duDtCoefficientrate of reaction (defaults to 1.0)
scaleByCellVolumewhether to scale by cell volume (defaults to false)

Definition at line 40 of file AveragedSourceParabolicPde.cpp.

Member Function Documentation

◆ ComputeDiffusionTerm()

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

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 178 of file AveragedSourceParabolicPde.cpp.

◆ ComputeDuDtCoefficientFunction()

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

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

◆ ComputeSourceTerm()

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

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 159 of file AveragedSourceParabolicPde.cpp.

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

◆ ComputeSourceTermAtNode()

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

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 171 of file AveragedSourceParabolicPde.cpp.

References NEVER_REACHED.

◆ GetConstantCoefficient()

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

Definition at line 62 of file AveragedSourceParabolicPde.cpp.

◆ GetDiffusionCoefficient()

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

Definition at line 74 of file AveragedSourceParabolicPde.cpp.

◆ GetDuDtCoefficient()

template<unsigned DIM>
double AveragedSourceParabolicPde< DIM >::GetDuDtCoefficient ( ) const
Returns
mDuDtCoefficient

Definition at line 80 of file AveragedSourceParabolicPde.cpp.

◆ GetLinearCoefficient()

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

Definition at line 68 of file AveragedSourceParabolicPde.cpp.

◆ GetScaleByCellVolume()

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

Definition at line 86 of file AveragedSourceParabolicPde.cpp.

◆ GetUptakeRateForElement()

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 184 of file AveragedSourceParabolicPde.cpp.

◆ rGetCellPopulation()

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

Definition at line 56 of file AveragedSourceParabolicPde.cpp.

◆ serialize()

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

◆ SetupSourceTerms()

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

Set up the source terms.

Todo:
this is identical to the one in AveragedSourceEllipticPde so refactor.
Parameters
rCoarseMeshreference to the coarse mesh
pCellPdeElementMapoptional pointer to the map from cells to coarse elements

Definition at line 92 of file AveragedSourceParabolicPde.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 73 of file AveragedSourceParabolicPde.hpp.

◆ TestCellBasedParabolicPdes

template<unsigned DIM>
friend class TestCellBasedParabolicPdes
friend

Definition at line 68 of file AveragedSourceParabolicPde.hpp.

Member Data Documentation

◆ mCellDensityOnCoarseElements

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

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

Definition at line 113 of file AveragedSourceParabolicPde.hpp.

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

◆ mConstantSourceCoefficient

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

Coefficient of constant source term.

Definition at line 98 of file AveragedSourceParabolicPde.hpp.

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

◆ mDiffusionCoefficient

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

Diffusion coefficient.

Definition at line 104 of file AveragedSourceParabolicPde.hpp.

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

◆ mDuDtCoefficient

template<unsigned DIM>
double AveragedSourceParabolicPde< DIM >::mDuDtCoefficient
protected

Coefficient of rate of change term.

Definition at line 107 of file AveragedSourceParabolicPde.hpp.

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

◆ mLinearSourceCoefficient

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

Coefficient of linear source term.

Definition at line 101 of file AveragedSourceParabolicPde.hpp.

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

◆ mrCellPopulation

template<unsigned DIM>
AbstractCellPopulation<DIM, DIM>& AveragedSourceParabolicPde< DIM >::mrCellPopulation
protected

The cell population member.

Definition at line 95 of file AveragedSourceParabolicPde.hpp.

◆ mScaleByCellVolume

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

Whether to scale terms by cell volume

Definition at line 110 of file AveragedSourceParabolicPde.hpp.

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


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