36 #include "AveragedSourceParabolicPde.hpp" 37 #include "ApoptoticCellProperty.hpp" 39 template<
unsigned DIM>
41 double duDtCoefficient,
42 double diffusionCoefficient,
43 double sourceCoefficient)
44 : mrCellPopulation(rCellPopulation),
45 mDuDtCoefficient(duDtCoefficient),
46 mDiffusionCoefficient(diffusionCoefficient),
47 mSourceCoefficient(sourceCoefficient)
51 template<
unsigned DIM>
57 template<
unsigned DIM>
72 unsigned elem_index = 0;
75 if (pCellPdeElementMap !=
nullptr)
77 elem_index = (*pCellPdeElementMap)[*cell_iter];
85 bool cell_is_apoptotic = cell_iter->template HasCellProperty<ApoptoticCellProperty>();
87 if (!cell_is_apoptotic)
94 c_matrix<double, DIM, DIM> jacobian;
98 rCoarseMesh.
GetElement(elem_index)->CalculateJacobian(jacobian, det);
103 template<
unsigned DIM>
109 template<
unsigned DIM>
116 return coefficient*u;
120 template<
unsigned DIM>
128 template<
unsigned DIM>
134 template<
unsigned DIM>
double mDiffusionCoefficient
virtual double ComputeSourceTerm(const ChastePoint< DIM > &rX, double u, Element< DIM, DIM > *pElement=NULL)
double GetUptakeRateForElement(unsigned elementIndex)
virtual unsigned GetNumElements() const
Element< ELEMENT_DIM, SPACE_DIM > * GetElement(unsigned index) const
virtual c_matrix< double, DIM, DIM > ComputeDiffusionTerm(const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement=NULL)
std::vector< double > mCellDensityOnCoarseElements
virtual void SetupSourceTerms(TetrahedralMesh< DIM, DIM > &rCoarseMesh, std::map< CellPtr, unsigned > *pCellPdeElementMap=nullptr)
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
const AbstractCellPopulation< DIM > & rGetCellPopulation() const
virtual double ComputeSourceTermAtNode(const Node< DIM > &rNode, double u)
unsigned GetContainingElementIndex(const ChastePoint< SPACE_DIM > &rTestPoint, bool strict=false, std::set< unsigned > testElements=std::set< unsigned >(), bool onlyTryWithTestElements=false)
virtual c_vector< double, SPACE_DIM > GetLocationOfCellCentre(CellPtr pCell)=0
double mSourceCoefficient
AveragedSourceParabolicPde(AbstractCellPopulation< DIM, DIM > &rCellPopulation, double duDtCoefficient=1.0, double diffusionCoefficient=1.0, double sourceCoefficient=0.0)
virtual double ComputeDuDtCoefficientFunction(const ChastePoint< DIM > &rX)
unsigned GetIndex() const
AbstractCellPopulation< DIM, DIM > & mrCellPopulation