36 #include "AveragedSourceEllipticPde.hpp" 37 #include "ApoptoticCellProperty.hpp" 39 template<
unsigned DIM>
41 double sourceCoefficient,
42 double diffusionCoefficient)
43 : mrCellPopulation(rCellPopulation),
44 mSourceCoefficient(sourceCoefficient),
45 mDiffusionCoefficient(diffusionCoefficient)
49 template<
unsigned DIM>
55 template<
unsigned DIM>
61 template<
unsigned DIM>
76 unsigned elem_index = 0;
79 if (pCellPdeElementMap !=
nullptr)
81 elem_index = (*pCellPdeElementMap)[*cell_iter];
89 bool cell_is_apoptotic = cell_iter->template HasCellProperty<ApoptoticCellProperty>();
91 if (!cell_is_apoptotic)
98 c_matrix<double, DIM, DIM> jacobian;
102 rCoarseMesh.
GetElement(elem_index)->CalculateJacobian(jacobian, det);
107 template<
unsigned DIM>
113 template<
unsigned DIM>
120 template<
unsigned DIM>
126 template<
unsigned DIM>
AveragedSourceEllipticPde(AbstractCellPopulation< DIM > &rCellPopulation, double sourceCoefficient=0.0, double diffusionCoefficient=1.0)
double GetUptakeRateForElement(unsigned elementIndex)
double GetCoefficient() const
virtual unsigned GetNumElements() const
std::vector< double > mCellDensityOnCoarseElements
Element< ELEMENT_DIM, SPACE_DIM > * GetElement(unsigned index) const
virtual void SetupSourceTerms(TetrahedralMesh< DIM, DIM > &rCoarseMesh, std::map< CellPtr, unsigned > *pCellPdeElementMap=nullptr)
c_matrix< double, DIM, DIM > ComputeDiffusionTerm(const ChastePoint< DIM > &rX)
#define EXPORT_TEMPLATE_CLASS_SAME_DIMS(CLASS)
AbstractCellPopulation< DIM > & mrCellPopulation
const AbstractCellPopulation< DIM > & rGetCellPopulation() const
double mSourceCoefficient
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
unsigned GetIndex() const
double ComputeLinearInUCoeffInSourceTerm(const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement)
double mDiffusionCoefficient
double ComputeConstantInUSourceTerm(const ChastePoint< DIM > &rX, Element< DIM, DIM > *pElement)