35 #include "WntConcentration.hpp" 38 template<
unsigned DIM>
41 template<
unsigned DIM>
44 if (mpInstance ==
nullptr)
51 template<
unsigned DIM>
56 mpCellPopulation(nullptr),
58 mConstantWntValueForTesting(0),
59 mUseConstantWntValueForTesting(false),
60 mWntConcentrationParameter(1.0),
61 mCryptProjectionParameterA(0.5),
62 mCryptProjectionParameterB(2.0)
68 template<
unsigned DIM>
73 template<
unsigned DIM>
83 template<
unsigned DIM>
111 template<
unsigned DIM>
116 return zero_vector<double>(DIM);
127 template<
unsigned DIM>
133 template<
unsigned DIM>
139 template<
unsigned DIM>
145 template<
unsigned DIM>
148 assert(cryptLength > 0.0);
151 EXCEPTION(
"Destroy has not been called");
158 template<
unsigned DIM>
164 template<
unsigned DIM>
169 EXCEPTION(
"Destroy has not been called");
175 template<
unsigned DIM>
186 double wnt_level = -1.0;
213 assert(wnt_level >= 0.0);
218 template<
unsigned DIM>
221 c_vector<double, DIM> wnt_gradient = zero_vector<double>(DIM);
236 double r = norm_2(rLocation);
241 if (r>=-1e-9 && r<r_critical)
246 for (
unsigned i=0; i<DIM; i++)
248 wnt_gradient[i] = rLocation[i]*dwdr/r;
253 EXCEPTION(
"No method to calculate gradient of this Wnt type");
259 template<
unsigned DIM>
270 template<
unsigned DIM>
275 EXCEPTION(
"WntConcentration<DIM>::SetConstantWntValueForTesting - Wnt value for testing should be non-negative.\n");
285 template<
unsigned DIM>
291 template<
unsigned DIM>
294 assert(wntConcentrationParameter > 0.0);
298 template<
unsigned DIM>
304 template<
unsigned DIM>
310 template<
unsigned DIM>
313 assert(cryptProjectionParameterA >= 0.0);
317 template<
unsigned DIM>
320 assert(cryptProjectionParameterB >= 0.0);
double mCryptProjectionParameterB
double GetWntLevel(double height)
double mCryptProjectionParameterA
double GetWntConcentrationParameter()
#define EXCEPTION(message)
double GetCryptProjectionParameterB()
WntConcentrationType GetType()
const double DOUBLE_UNSET
void SetType(WntConcentrationType type)
void SetCellPopulation(AbstractCellPopulation< DIM > &rCellPopulation)
virtual ~WntConcentration()
bool mUseConstantWntValueForTesting
static WntConcentration * Instance()
c_vector< double, DIM > GetWntGradient(c_vector< double, DIM > &rLocation)
AbstractCellPopulation< DIM > * mpCellPopulation
void SetCryptLength(double cryptLength)
void SetConstantWntValueForTesting(double value)
virtual c_vector< double, SPACE_DIM > GetLocationOfCellCentre(CellPtr pCell)=0
static WntConcentration * mpInstance
AbstractCellPopulation< DIM > & rGetCellPopulation()
void SetCryptProjectionParameterA(double cryptProjectionParameterA)
void SetCryptProjectionParameterB(double cryptProjectionParameterB)
WntConcentrationType mWntType
double mConstantWntValueForTesting
double mWntConcentrationParameter
double GetCryptProjectionParameterA()
void SetWntConcentrationParameter(double wntConcentrationParameter)