36 #include "RandomNumberGenerator.hpp" 37 #include "VesselSegment.hpp" 39 #include "Owen2011MigrationRule.hpp" 40 #include "AbstractRegularGridDiscreteContinuumSolver.hpp" 41 #include "BaseUnits.hpp" 42 #include "Owen11Parameters.hpp" 44 template<
unsigned DIM>
47 mCellMotility(
Owen11Parameters::mpCellMotilityEndothelial->GetValue(
"Owen2011MigrationRule")),
48 mCellChemotacticParameter(0.05*
Owen11Parameters::mpChemotacticSensitivity->GetValue(
"Owen2011MigrationRule")),
54 template <
unsigned DIM>
61 template<
unsigned DIM>
67 template<
unsigned DIM>
73 template<
unsigned DIM>
79 template<
unsigned DIM>
84 EXCEPTION(
"A DiscreteContinuum solver is required for this type of sprouting rule.");
93 template<
unsigned DIM>
95 std::vector<unsigned> neighbourIndices,
unsigned gridIndex)
97 std::vector<double> probability_of_moving(neighbourIndices.size(), 0.0);
98 for(
unsigned jdx=0; jdx<neighbourIndices.size(); jdx++)
104 bool sprout_already_attached_to_vessel_at_location =
false;
106 for (
unsigned seg_index = 0; seg_index < pNode->GetNumberOfSegments(); seg_index++)
108 if(pNode->GetSegment(seg_index)->GetOppositeNode(pNode)->IsCoincident(neighbour_location))
110 sprout_already_attached_to_vessel_at_location =
true;
118 bool vessel_crosses_line_segment =
false;
120 if (!vessel_crosses_line_segment && !sprout_already_attached_to_vessel_at_location)
122 units::quantity<unit::concentration> VEGF_diff =
mVegfField[neighbourIndices[jdx]] -
mVegfField[gridIndex];
124 units::quantity<unit::length> dij = pNode->rGetLocation().GetDistance(neighbour_location);
126 if (probability_of_moving[jdx] < 0.0)
128 probability_of_moving[jdx] = 0.0;
132 return probability_of_moving;
static boost::shared_ptr< Owen2011MigrationRule< DIM > > Create()
virtual ~Owen2011MigrationRule()
virtual std::vector< int > GetIndices(const std::vector< boost::shared_ptr< VesselNode< DIM > > > &rNodes)
boost::shared_ptr< AbstractDiscreteContinuumSolver< DIM > > mpSolver
boost::shared_ptr< RegularGrid< DIM > > mpGrid
units::quantity< unit::time > GetReferenceTimeScale()
void SetCellMotilityParameter(units::quantity< unit::diffusivity > cellMotility)
units::quantity< unit::diffusivity_per_concentration > mCellChemotacticParameter
std::vector< double > GetNeighbourMovementProbabilities(boost::shared_ptr< VesselNode< DIM > > pNode, std::vector< unsigned > neighbourIndices, unsigned gridIndex)
static BaseUnits * Instance()
void SetCellChemotacticParameter(units::quantity< unit::diffusivity_per_concentration > cellChemotacticParameter)
std::vector< units::quantity< unit::concentration > > mVegfField
units::quantity< unit::diffusivity > mCellMotility
std::vector< int > GetIndices(const std::vector< boost::shared_ptr< VesselNode< DIM > > > &rNodes)