Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
|
#include <AveragedSourceEllipticPde.hpp>
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< double > | mCellDensityOnCoarseElements |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | TestCellBasedEllipticPdes |
class | boost::serialization::access |
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.
Definition at line 68 of file AveragedSourceEllipticPde.hpp.
AveragedSourceEllipticPde< DIM >::AveragedSourceEllipticPde | ( | AbstractCellPopulation< DIM > & | rCellPopulation, |
double | sourceCoefficient = 0.0 , |
||
double | diffusionCoefficient = 1.0 |
||
) |
Constructor.
rCellPopulation | reference to the cell population |
sourceCoefficient | the source term coefficient (defaults to 0.0) |
diffusionCoefficient | the rate of diffusion (defaults to 1.0) |
Definition at line 40 of file AveragedSourceEllipticPde.cpp.
double AveragedSourceEllipticPde< DIM >::ComputeConstantInUSourceTerm | ( | const ChastePoint< DIM > & | rX, |
Element< DIM, DIM > * | pElement | ||
) |
Overridden ComputeConstantInUSourceTerm() method.
rX | The point in space |
pElement | the element |
Definition at line 108 of file AveragedSourceEllipticPde.cpp.
c_matrix< double, DIM, DIM > AveragedSourceEllipticPde< DIM >::ComputeDiffusionTerm | ( | const ChastePoint< DIM > & | rX | ) |
Overridden ComputeDiffusionTerm() method.
rX | The point in space at which the diffusion term is computed |
Definition at line 122 of file AveragedSourceEllipticPde.cpp.
double AveragedSourceEllipticPde< DIM >::ComputeLinearInUCoeffInSourceTerm | ( | const ChastePoint< DIM > & | rX, |
Element< DIM, DIM > * | pElement | ||
) |
Overridden ComputeLinearInUCoeffInSourceTerm() method.
rX | The point in space |
pElement | the element |
Definition at line 114 of file AveragedSourceEllipticPde.cpp.
References EXCEPT_IF, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex().
double AveragedSourceEllipticPde< DIM >::GetCoefficient | ( | ) | const |
Definition at line 56 of file AveragedSourceEllipticPde.cpp.
double AveragedSourceEllipticPde< DIM >::GetUptakeRateForElement | ( | unsigned | elementIndex | ) |
elementIndex | the element we wish to return the uptake rate for |
Definition at line 128 of file AveragedSourceEllipticPde.cpp.
const AbstractCellPopulation< DIM > & AveragedSourceEllipticPde< DIM >::rGetCellPopulation | ( | ) | const |
Definition at line 50 of file AveragedSourceEllipticPde.cpp.
|
inlineprivate |
Serialize the PDE and its member variables.
archive | the archive |
version | the current version of this class |
Definition at line 83 of file AveragedSourceEllipticPde.hpp.
References AveragedSourceEllipticPde< DIM >::mCellDensityOnCoarseElements, AveragedSourceEllipticPde< DIM >::mDiffusionCoefficient, and AveragedSourceEllipticPde< DIM >::mSourceCoefficient.
|
virtual |
Set up the source terms.
rCoarseMesh | reference to the coarse mesh |
pCellPdeElementMap | optional 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().
|
friend |
Needed for serialization.
Definition at line 75 of file AveragedSourceEllipticPde.hpp.
|
friend |
Definition at line 70 of file AveragedSourceEllipticPde.hpp.
|
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().
|
protected |
Diffusion coefficient.
Definition at line 100 of file AveragedSourceEllipticPde.hpp.
Referenced by AveragedSourceEllipticPde< DIM >::serialize().
|
protected |
The cell population member.
Definition at line 94 of file AveragedSourceEllipticPde.hpp.
Referenced by VolumeDependentAveragedSourceEllipticPde< DIM >::VolumeDependentAveragedSourceEllipticPde().
|
protected |
Coefficient of consumption of nutrient by cells.
Definition at line 97 of file AveragedSourceEllipticPde.hpp.
Referenced by AveragedSourceEllipticPde< DIM >::serialize().