36 #include "RandomNumberGenerator.hpp" 37 #include "VesselSegment.hpp" 39 #include "LatticeBasedSproutingRule.hpp" 40 #include "BaseUnits.hpp" 42 template<
unsigned DIM>
46 mTipExclusionRadius(0.0 *
unit::metres)
51 template <
unsigned DIM>
58 template<
unsigned DIM>
64 template<
unsigned DIM>
70 template<
unsigned DIM>
75 EXCEPTION(
"A vessel network is required for this type of sprouting rule.");
79 std::vector<boost::shared_ptr<VesselNode<DIM> > > sprouts;
82 for(
unsigned idx = 0; idx < rNodes.size(); idx++)
84 if(rNodes[idx]->GetNumberOfSegments() != 2)
92 if(rNodes[idx]->GetSegment(0)->GetVessel()->GetClosestEndNodeDistance(rNodes[idx]->rGetLocation())< this->
mVesselEndCutoff)
96 if(rNodes[idx]->GetSegment(1)->GetVessel()->GetClosestEndNodeDistance(rNodes[idx]->rGetLocation())< this->
mVesselEndCutoff)
105 bool too_close =
false;
106 for(
unsigned jdx=0; jdx<sprouts.size(); jdx++)
120 if (RandomNumberGenerator::Instance()->ranf() < prob_tip_selection)
122 sprouts.push_back(rNodes[idx]);
virtual ~LatticeBasedSproutingRule()
void SetGrid(boost::shared_ptr< RegularGrid< DIM > > pGrid)
LatticeBasedSproutingRule()
boost::shared_ptr< VesselNetwork< DIM > > mpVesselNetwork
units::quantity< unit::time > GetReferenceTimeScale()
boost::shared_ptr< RegularGrid< DIM > > mpGrid
virtual std::vector< boost::shared_ptr< VesselNode< DIM > > > GetSprouts(const std::vector< boost::shared_ptr< VesselNode< DIM > > > &rNodes)
units::quantity< unit::length > mVesselEndCutoff
units::quantity< unit::rate > mSproutingProbability
static BaseUnits * Instance()
units::quantity< unit::length > mTipExclusionRadius
static boost::shared_ptr< LatticeBasedSproutingRule< DIM > > Create()