![]() |
Chaste Commit::43b116bb45f11066c455b15e05c77f8bbe23ac85
|
#include <AveragedSourceEllipticPde.hpp>
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) |
![]() | |
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) |
![]() | |
AbstractLinearPde () | |
virtual | ~AbstractLinearPde () |
Protected Attributes | |
AbstractCellPopulation< DIM > & | mrCellPopulation |
double | mConstantSourceCoefficient |
double | mLinearSourceCoefficient |
double | mDiffusionCoefficient |
bool | mScaleByCellVolume |
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 | constantSourceCoefficient = 0.0 , |
||
double | linearSourceCoefficient = 0.0 , |
||
double | diffusionCoefficient = 1.0 , |
||
bool | scaleByCellVolume = false |
||
) |
Constructor.
rCellPopulation | reference to the cell population |
constantSourceCoefficient | the constant source term coefficient (defaults to 0.0) |
linearSourceCoefficient | the linear source term coefficient (defaults to 0.0) |
diffusionCoefficient | the rate of diffusion (defaults to 1.0) |
scaleByCellVolume | whether to scale by cell volume (defaults to) |
Definition at line 40 of file AveragedSourceEllipticPde.cpp.
|
override |
Overridden ComputeConstantInUSourceTerm() method.
rX | The point in space |
pElement | the element |
Definition at line 145 of file AveragedSourceEllipticPde.cpp.
References EXCEPT_IF, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex().
|
override |
Overridden ComputeDiffusionTerm() method.
rX | The point in space at which the diffusion term is computed |
Definition at line 161 of file AveragedSourceEllipticPde.cpp.
|
override |
Overridden ComputeLinearInUCoeffInSourceTerm() method.
rX | The point in space |
pElement | the element |
Definition at line 153 of file AveragedSourceEllipticPde.cpp.
References EXCEPT_IF, and AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex().
double AveragedSourceEllipticPde< DIM >::GetConstantCoefficient | ( | ) | const |
Definition at line 60 of file AveragedSourceEllipticPde.cpp.
double AveragedSourceEllipticPde< DIM >::GetDiffusionCoefficient | ( | ) | const |
Definition at line 72 of file AveragedSourceEllipticPde.cpp.
double AveragedSourceEllipticPde< DIM >::GetLinearCoefficient | ( | ) | const |
Definition at line 66 of file AveragedSourceEllipticPde.cpp.
bool AveragedSourceEllipticPde< DIM >::GetScaleByCellVolume | ( | ) | const |
Definition at line 78 of file AveragedSourceEllipticPde.cpp.
double AveragedSourceEllipticPde< DIM >::GetUptakeRateForElement | ( | unsigned | elementIndex | ) |
elementIndex | the element we wish to return the uptake rate for |
Definition at line 167 of file AveragedSourceEllipticPde.cpp.
const AbstractCellPopulation< DIM > & AveragedSourceEllipticPde< DIM >::rGetCellPopulation | ( | ) | const |
Definition at line 54 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 >::mConstantSourceCoefficient, AveragedSourceEllipticPde< DIM >::mDiffusionCoefficient, AveragedSourceEllipticPde< DIM >::mLinearSourceCoefficient, and AveragedSourceEllipticPde< DIM >::mScaleByCellVolume.
|
virtual |
Set up the source terms.
rCoarseMesh | reference to the coarse mesh |
pCellPdeElementMap | optional 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().
|
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 111 of file AveragedSourceEllipticPde.hpp.
Referenced by AveragedSourceEllipticPde< DIM >::serialize().
|
protected |
Coefficient of constant source term.
Definition at line 99 of file AveragedSourceEllipticPde.hpp.
Referenced by AveragedSourceEllipticPde< DIM >::serialize().
|
protected |
Diffusion coefficient.
Definition at line 105 of file AveragedSourceEllipticPde.hpp.
Referenced by AveragedSourceEllipticPde< DIM >::serialize().
|
protected |
Coefficient of linear source term.
Definition at line 102 of file AveragedSourceEllipticPde.hpp.
Referenced by AveragedSourceEllipticPde< DIM >::serialize().
|
protected |
The cell population member.
Definition at line 96 of file AveragedSourceEllipticPde.hpp.
|
protected |
Whether to scale terms by cell volume.
Definition at line 108 of file AveragedSourceEllipticPde.hpp.
Referenced by AveragedSourceEllipticPde< DIM >::serialize().