36 #ifndef VESSELNETWORK_HPP_ 37 #define VESSELNETWORK_HPP_ 43 #include "VesselSegment.hpp" 44 #include "VesselNode.hpp" 45 #include "UblasIncludes.hpp" 46 #include "UnitCollection.hpp" 47 #include "AbstractVesselNetworkComponent.hpp" 52 template<
unsigned DIM>
61 std::vector<boost::shared_ptr<Vessel<DIM> > >
mVessels;
66 std::vector<boost::shared_ptr<VesselSegment<DIM> > >
mSegments;
76 std::vector<boost::shared_ptr<VesselNode<DIM> > >
mNodes;
104 static boost::shared_ptr<VesselNetwork<DIM> >
Create();
133 std::vector<boost::shared_ptr<Vessel<DIM> > >
CopyVessels();
140 std::vector<boost::shared_ptr<Vessel<DIM> > >
CopyVessels(std::vector<boost::shared_ptr<
Vessel<DIM> > > vessels);
204 bool sameVessel =
true);
248 boost::shared_ptr<VesselNode<DIM> >
GetNode(
unsigned index);
254 std::vector<boost::shared_ptr<VesselNode<DIM> > >
GetNodes();
317 boost::shared_ptr<Vessel<DIM> >
GetVessel(
unsigned index);
323 std::vector<boost::shared_ptr<Vessel<DIM> > >
GetVessels();
336 void MergeShortVessels(units::quantity<unit::length> cutoff = 10.0 * 1.e-6 * unit::metres);
373 void RemoveShortVessels(units::quantity<unit::length> cutoff = 10.0* 1.e-6 * unit::metres,
bool endsOnly =
true);
379 void SetNodeRadii(units::quantity<unit::length> radius);
456 void Write(
const std::string& rFileName);
virtual boost::shared_ptr< Vessel< DIM > > FormSprout(const DimensionalChastePoint< DIM > &sproutBaseLocation, const DimensionalChastePoint< DIM > &sproutTipLocation)
void CopySegmentFlowProperties(unsigned index=0)
void MergeShortVessels(units::quantity< unit::length > cutoff=10.0 *1.e-6 *unit::metres)
std::pair< DimensionalChastePoint< DIM >, DimensionalChastePoint< DIM > > GetExtents(bool useRadii=false)
void RemoveShortVessels(units::quantity< unit::length > cutoff=10.0 *1.e-6 *unit::metres, bool endsOnly=true)
boost::shared_ptr< Vessel< DIM > > GetNearestVessel(const DimensionalChastePoint< DIM > &rLocation)
std::vector< boost::shared_ptr< VesselNode< DIM > > > GetVesselEndNodes()
std::vector< boost::shared_ptr< VesselSegment< DIM > > > GetVesselSegments()
unsigned GetNumberOfVessels()
bool VesselCrossesLineSegment(const DimensionalChastePoint< DIM > &rCoord1, const DimensionalChastePoint< DIM > &rCoord2, double tolerance=1e-6)
void SetNodeRadiiFromSegments()
void UpdateAll(bool merge=false)
virtual void ExtendVessel(boost::shared_ptr< Vessel< DIM > > pVessel, boost::shared_ptr< VesselNode< DIM > > pEndNode, boost::shared_ptr< VesselNode< DIM > > pNewNode)
unsigned GetNodeIndex(boost::shared_ptr< VesselNode< DIM > > pNode)
void AddVessel(boost::shared_ptr< Vessel< DIM > > pVessel)
void SetSegmentProperties(boost::shared_ptr< VesselSegment< DIM > > prototype)
static boost::shared_ptr< VesselNetwork< DIM > > Create()
boost::shared_ptr< VesselNode< DIM > > GetNearestNode(const DimensionalChastePoint< DIM > &rLocation)
unsigned GetVesselIndex(boost::shared_ptr< Vessel< DIM > > pVessel)
boost::shared_ptr< VesselNode< DIM > > GetNode(unsigned index)
unsigned NumberOfNodesNearLocation(const DimensionalChastePoint< DIM > &rLocation, double tolerance=0.0)
void Write(const std::string &rFileName)
bool NodeIsInNetwork(boost::shared_ptr< VesselNode< DIM > > pSourceNode)
std::vector< boost::shared_ptr< VesselSegment< DIM > > > mSegments
void SetSegmentViscosity(units::quantity< unit::dynamic_viscosity > viscosity)
std::vector< boost::shared_ptr< Vessel< DIM > > > mVessels
unsigned GetNumberOfVesselNodes()
bool mVesselNodesUpToDate
std::pair< boost::shared_ptr< VesselSegment< DIM > >, units::quantity< unit::length > > GetNearestSegment(boost::shared_ptr< VesselSegment< DIM > > pSegment)
void Translate(DimensionalChastePoint< DIM > rTranslationVector)
void MergeCoincidentNodes(double tolerance=0.0)
void SetNodeRadii(units::quantity< unit::length > radius)
boost::shared_ptr< Vessel< DIM > > GetVessel(unsigned index)
void SetSegmentRadii(units::quantity< unit::length > radius)
virtual boost::shared_ptr< VesselNode< DIM > > DivideVessel(boost::shared_ptr< Vessel< DIM > > pVessel, const DimensionalChastePoint< DIM > &rLocation)
std::vector< boost::shared_ptr< VesselNode< DIM > > > mNodes
void AddVessels(std::vector< boost::shared_ptr< Vessel< DIM > > > vessels)
unsigned GetVesselSegmentIndex(boost::shared_ptr< VesselSegment< DIM > > pVesselSegment)
std::vector< boost::shared_ptr< VesselNode< DIM > > > mVesselNodes
units::quantity< unit::length > GetDistanceToNearestNode(const DimensionalChastePoint< DIM > &rLocation)
std::vector< boost::shared_ptr< VesselNode< DIM > > > GetNodes()
unsigned GetMaxBranchesOnNode()
std::vector< boost::shared_ptr< Vessel< DIM > > > GetVessels()
std::map< std::string, double > GetOutputData()
std::vector< boost::shared_ptr< Vessel< DIM > > > CopyVessels()
unsigned GetNumberOfNodes()
void RemoveVessel(boost::shared_ptr< Vessel< DIM > > pVessel, bool deleteVessel=false)