36 #include "OffLatticeSproutingRule.hpp" 37 #include "RandomNumberGenerator.hpp" 38 #include "GeometryTools.hpp" 39 #include "UblasIncludes.hpp" 40 #include "UblasCustomFunctions.hpp" 41 #include "BaseUnits.hpp" 42 #include "Owen11Parameters.hpp" 44 template<
unsigned DIM>
47 mTipExclusionRadius(80.0 * 1.e-6 *
unit::metres),
48 mHalfMaxVegf(
Owen11Parameters::mpVegfConventrationAtHalfMaxProbSprouting->GetValue(
"Owen2011SproutingRule")),
58 template<
unsigned DIM>
64 template <
unsigned DIM>
71 template<
unsigned DIM>
76 EXCEPTION(
"A vessel network is required for this type of sprouting rule.");
79 std::vector<units::quantity<unit::concentration> > probed_solutions(rNodes.size(), 0.0*unit::mole_per_metre_cubed);
80 std::vector<DimensionalChastePoint<DIM> > probe_locations(rNodes.size(),
DimensionalChastePoint<DIM>(0.0, 0.0, 0.0, 1.e-6*unit::metres));
84 for(
unsigned idx=0; idx<rNodes.size(); idx++)
86 probe_locations[idx] = rNodes[idx]->rGetLocation();
88 if(probe_locations.size()>0)
90 probed_solutions = this->
mpSolver->GetConcentrations(probe_locations);
95 std::vector<boost::shared_ptr<VesselNode<DIM> > > sprouts;
98 for(
unsigned idx = 0; idx < rNodes.size(); idx++)
101 if(rNodes[idx]->GetNumberOfSegments() != 2)
108 if(rNodes[idx]->GetSegment(0)->GetVessel()->GetClosestEndNodeDistance(rNodes[idx]->rGetLocation())< this->
mVesselEndCutoff)
112 if(rNodes[idx]->GetSegment(1)->GetVessel()->GetClosestEndNodeDistance(rNodes[idx]->rGetLocation())< this->
mVesselEndCutoff)
121 bool too_close =
false;
122 for(
unsigned jdx=0; jdx<sprouts.size(); jdx++)
134 units::quantity<unit::concentration> vegf_conc = 0.0*unit::mole_per_metre_cubed;
137 vegf_conc = probed_solutions[idx];
140 double vegf_fraction = vegf_conc/(vegf_conc +
mHalfMaxVegf);
142 double prob_tip_selection = max_prob_per_time_step*vegf_fraction;
144 if (RandomNumberGenerator::Instance()->ranf() < prob_tip_selection)
146 sprouts.push_back(rNodes[idx]);
units::quantity< unit::concentration > mHalfMaxVegf
virtual std::vector< boost::shared_ptr< VesselNode< DIM > > > GetSprouts(const std::vector< boost::shared_ptr< VesselNode< DIM > > > &rNodes)
static const boost::shared_ptr< ParameterInstance< unit::rate > > mpMaximumSproutingRate
OffLatticeSproutingRule()
boost::shared_ptr< VesselNetwork< DIM > > mpVesselNetwork
units::quantity< unit::time > GetReferenceTimeScale()
boost::shared_ptr< AbstractDiscreteContinuumSolver< DIM > > mpSolver
static boost::shared_ptr< OffLatticeSproutingRule< DIM > > Create()
units::quantity< unit::length > mVesselEndCutoff
virtual ~OffLatticeSproutingRule()
units::quantity< unit::rate > mSproutingProbability
static BaseUnits * Instance()
units::quantity< unit::length > mTipExclusionRadius