Chaste
Build::
|
#include <Vessel.hpp>
Public Member Functions | |
~Vessel () | |
void | AddSegment (boost::shared_ptr< VesselSegment< DIM > > pSegment) |
void | AddSegments (std::vector< boost::shared_ptr< VesselSegment< DIM > > > pSegments) |
void | CopyDataFromExistingVessel (boost::shared_ptr< Vessel< DIM > > pTargetVessel) |
boost::shared_ptr< VesselNode< DIM > > | DivideSegment (const DimensionalChastePoint< DIM > &rLocation, double distanceTolerance=1.e-6) |
units::quantity< unit::length > | GetClosestEndNodeDistance (const DimensionalChastePoint< DIM > &rLocation) |
units::quantity< unit::length > | GetDistance (const DimensionalChastePoint< DIM > &rLocation) const |
std::vector< boost::shared_ptr< Vessel< DIM > > > | GetConnectedVessels () |
boost::shared_ptr< VesselNode< DIM > > | GetEndNode () |
boost::shared_ptr< VesselFlowProperties< DIM > > | GetFlowProperties () const |
boost::shared_ptr< VesselNode< DIM > > | GetNodeAtOppositeEnd (boost::shared_ptr< VesselNode< DIM > > pQueryNode) |
units::quantity< unit::length > | GetLength () const |
units::quantity< unit::length > | GetRadius () const |
boost::shared_ptr< VesselNode< DIM > > | GetNode (unsigned index) |
std::vector< boost::shared_ptr< VesselNode< DIM > > > | GetNodes () |
const std::vector< boost::shared_ptr< VesselNode< DIM > > > & | rGetNodes () |
unsigned | GetNumberOfNodes () |
unsigned | GetNumberOfSegments () |
std::map< std::string, double > | GetOutputData () |
boost::shared_ptr< VesselSegment< DIM > > | GetSegment (unsigned index) |
std::vector< boost::shared_ptr< VesselSegment< DIM > > > | GetSegments () |
boost::shared_ptr< VesselNode< DIM > > | GetStartNode () |
bool | IsConnectedTo (boost::shared_ptr< Vessel< DIM > > pOtherVessel) |
void | Remove () |
void | RemoveSegments (SegmentLocation::Value location) |
void | SetRadius (units::quantity< unit::length > radius) |
void | SetFlowProperties (const VesselFlowProperties< DIM > &rFlowProperties) |
void | UpdateNodes () |
Public Member Functions inherited from AbstractVesselNetworkComponent< DIM > | |
AbstractVesselNetworkComponent () | |
virtual | ~AbstractVesselNetworkComponent () |
virtual unsigned | GetId () const |
virtual double | GetOutputDataValue (const std::string &rKey) |
virtual std::vector< std::string > | GetOutputDataKeys () |
virtual void | SetId (unsigned id) |
virtual void | SetOutputData (const std::string &rKey, double value) |
Static Public Member Functions | |
static boost::shared_ptr< Vessel< DIM > > | Create (boost::shared_ptr< VesselSegment< DIM > > pSegment) |
static boost::shared_ptr< Vessel< DIM > > | Create (std::vector< boost::shared_ptr< VesselSegment< DIM > > > segments) |
static boost::shared_ptr< Vessel< DIM > > | Create (std::vector< boost::shared_ptr< VesselNode< DIM > > > nodes) |
static boost::shared_ptr< Vessel< DIM > > | Create (boost::shared_ptr< VesselNode< DIM > > pStartNode, boost::shared_ptr< VesselNode< DIM > > pEndNode) |
Private Member Functions | |
Vessel (boost::shared_ptr< VesselSegment< DIM > > pSegment) | |
Vessel (std::vector< boost::shared_ptr< VesselSegment< DIM > > > segments) | |
Vessel (std::vector< boost::shared_ptr< VesselNode< DIM > > > nodes) | |
Vessel (boost::shared_ptr< VesselNode< DIM > > pStartNode, boost::shared_ptr< VesselNode< DIM > > pEndNode) | |
boost::shared_ptr< Vessel< DIM > > | Shared () |
Private Attributes | |
std::vector< boost::shared_ptr< VesselSegment< DIM > > > | mSegments |
std::vector< boost::shared_ptr< VesselNode< DIM > > > | mNodes |
bool | mNodesUpToDate |
boost::shared_ptr< VesselFlowProperties< DIM > > | mpFlowProperties |
Additional Inherited Members | |
Protected Attributes inherited from AbstractVesselNetworkComponent< DIM > | |
std::map< std::string, double > | mOutputData |
unsigned | mId |
units::quantity< unit::length > | mRadius |
This is a class for vessels. A vessel is a component of a vessel network. Vessels are a collection of connected straight-line segments, such as a polyline. Vessel data and properties are derived from averaging or summing over their segments as required.
Definition at line 69 of file Vessel.hpp.
|
private |
Constructor. Kept private as the factory Create methods should be used instead.
The vessel should always have at least one segment.
pSegment | the input segment |
Definition at line 43 of file Vessel.cpp.
References Vessel< DIM >::mpFlowProperties, and Vessel< DIM >::mSegments.
|
private |
Alternate Constructor. Kept private as the factory Create methods should be used instead.
The vessel should always have at least one segment. This is useful for initializing with many segments at once.
segments | a collection of segments, should be joined end to tip |
Definition at line 55 of file Vessel.cpp.
References Vessel< DIM >::IsConnectedTo(), Vessel< DIM >::mpFlowProperties, and Vessel< DIM >::mSegments.
|
private |
Alternate Constructor. Kept private as the factory Create methods should be used instead.
Initialize with a vector of nodes. The nodes are joined by segments in order. The ends are not closed.
nodes | these nodes will be joined to form the vessel |
Definition at line 90 of file Vessel.cpp.
References Vessel< DIM >::mpFlowProperties, and Vessel< DIM >::mSegments.
|
private |
Alternate Constructor. Kept private as the factory Create methods should be used instead. Initialize with two nodes.
pStartNode | the start node |
pEndNode | the end node |
Definition at line 112 of file Vessel.cpp.
References Vessel< DIM >::mpFlowProperties, and Vessel< DIM >::mSegments.
Destructor.
Definition at line 123 of file Vessel.cpp.
void Vessel< DIM >::AddSegment | ( | boost::shared_ptr< VesselSegment< DIM > > | pSegment | ) |
Add a single segment to either end of the vessel
pSegment | the segment |
Definition at line 181 of file Vessel.cpp.
References Vessel< DIM >::mNodesUpToDate, Vessel< DIM >::mpFlowProperties, Vessel< DIM >::mSegments, and Vessel< DIM >::Shared().
void Vessel< DIM >::AddSegments | ( | std::vector< boost::shared_ptr< VesselSegment< DIM > > > | pSegments | ) |
Add a collection of segments to either end of the vessel
pSegments | the segments |
Definition at line 233 of file Vessel.cpp.
References Vessel< DIM >::IsConnectedTo(), Vessel< DIM >::mNodesUpToDate, Vessel< DIM >::mpFlowProperties, Vessel< DIM >::mSegments, and Vessel< DIM >::Shared().
void Vessel< DIM >::CopyDataFromExistingVessel | ( | boost::shared_ptr< Vessel< DIM > > | pTargetVessel | ) |
Copy the member data from the input vessel.
pTargetVessel | the vessel to be copied from |
Definition at line 294 of file Vessel.cpp.
References AbstractVesselNetworkComponent< DIM >::mOutputData.
|
static |
Construct a new instance of the class and return a shared pointer to it.
pSegment | the input segment |
Definition at line 128 of file Vessel.cpp.
Referenced by VesselNetwork< DIM >::DivideVessel(), VesselNetwork< DIM >::FormSprout(), and VesselNetworkGenerator< DIM >::SetReferenceLengthScale().
|
static |
Construct a new instance of the class and return a shared pointer to it.
segments | a collection of segments, should be joined end to tip |
Definition at line 138 of file Vessel.cpp.
|
static |
Construct a new instance of the class and return a shared pointer to it.
nodes | these nodes will be joined to form the vessel |
Definition at line 151 of file Vessel.cpp.
|
static |
Construct a new instance of the class and return a shared pointer to it.
pStartNode | the start node |
pEndNode | the end node |
Definition at line 166 of file Vessel.cpp.
boost::shared_ptr< VesselNode< DIM > > Vessel< DIM >::DivideSegment | ( | const DimensionalChastePoint< DIM > & | rLocation, |
double | distanceTolerance = 1.e-6 |
||
) |
Divide the vessel at the specified location
rLocation | the location of the division |
distanceTolerance | how far from a segment should the probe point be |
Definition at line 300 of file Vessel.cpp.
References VesselSegment< DIM >::CopyDataFromExistingSegment(), VesselSegment< DIM >::Create(), VesselNode< DIM >::Create(), Vessel< DIM >::GetDistance(), Vessel< DIM >::IsConnectedTo(), Vessel< DIM >::mNodesUpToDate, Vessel< DIM >::mpFlowProperties, Vessel< DIM >::mSegments, and Vessel< DIM >::Shared().
units::quantity< unit::length > Vessel< DIM >::GetClosestEndNodeDistance | ( | const DimensionalChastePoint< DIM > & | rLocation | ) |
Return the dimensionless distance to the vessel end node closest to the input location
rLocation | the location to probe |
Definition at line 462 of file Vessel.cpp.
References Vessel< DIM >::GetEndNode(), and Vessel< DIM >::GetStartNode().
std::vector< boost::shared_ptr< Vessel< DIM > > > Vessel< DIM >::GetConnectedVessels | ( | ) |
Definition at line 493 of file Vessel.cpp.
References Vessel< DIM >::GetStartNode(), and Vessel< DIM >::Shared().
units::quantity< unit::length > Vessel< DIM >::GetDistance | ( | const DimensionalChastePoint< DIM > & | rLocation | ) | const |
Return the distance from the vessel to the input location
rLocation | the location to probe |
Definition at line 477 of file Vessel.cpp.
References Vessel< DIM >::mSegments.
Referenced by Vessel< DIM >::DivideSegment().
boost::shared_ptr< VesselNode< DIM > > Vessel< DIM >::GetEndNode | ( | ) |
Definition at line 518 of file Vessel.cpp.
References Vessel< DIM >::mNodes, Vessel< DIM >::mNodesUpToDate, and Vessel< DIM >::UpdateNodes().
Referenced by Vessel< DIM >::GetClosestEndNodeDistance(), Vessel< DIM >::GetNodeAtOppositeEnd(), and Vessel< DIM >::IsConnectedTo().
boost::shared_ptr< VesselFlowProperties< DIM > > Vessel< DIM >::GetFlowProperties | ( | ) | const |
Return the flow properties of the component
Definition at line 445 of file Vessel.cpp.
References Vessel< DIM >::mpFlowProperties.
units::quantity< unit::length > Vessel< DIM >::GetLength | ( | ) | const |
Return the length
Definition at line 552 of file Vessel.cpp.
References Vessel< DIM >::mSegments.
boost::shared_ptr< VesselNode< DIM > > Vessel< DIM >::GetNode | ( | unsigned | index | ) |
Return the vessel node
index | the query index |
Definition at line 574 of file Vessel.cpp.
References Vessel< DIM >::mNodes, Vessel< DIM >::mNodesUpToDate, and Vessel< DIM >::UpdateNodes().
Referenced by VesselNetworkWriter< DIM >::GetOutput(), and Vessel< DIM >::UpdateNodes().
boost::shared_ptr< VesselNode< DIM > > Vessel< DIM >::GetNodeAtOppositeEnd | ( | boost::shared_ptr< VesselNode< DIM > > | pQueryNode | ) |
pQueryNode | the query node |
Definition at line 529 of file Vessel.cpp.
References Vessel< DIM >::GetEndNode(), Vessel< DIM >::GetStartNode(), Vessel< DIM >::mNodesUpToDate, and Vessel< DIM >::UpdateNodes().
std::vector< boost::shared_ptr< VesselNode< DIM > > > Vessel< DIM >::GetNodes | ( | ) |
Return the vessel's nodes
Definition at line 588 of file Vessel.cpp.
References Vessel< DIM >::mNodes, Vessel< DIM >::mNodesUpToDate, and Vessel< DIM >::UpdateNodes().
unsigned Vessel< DIM >::GetNumberOfNodes | ( | ) |
Return the number of nodes in the vessel
Definition at line 608 of file Vessel.cpp.
References Vessel< DIM >::GetNumberOfSegments(), Vessel< DIM >::mNodesUpToDate, and Vessel< DIM >::UpdateNodes().
unsigned Vessel< DIM >::GetNumberOfSegments | ( | ) |
Definition at line 618 of file Vessel.cpp.
References Vessel< DIM >::mSegments.
Referenced by Vessel< DIM >::GetNumberOfNodes().
|
virtual |
Return a map of vessel data for use by the vtk writer
Implements AbstractVesselNetworkComponent< DIM >.
Definition at line 451 of file Vessel.cpp.
References AbstractVesselNetworkComponent< DIM >::GetId(), Vessel< DIM >::GetRadius(), AbstractVesselNetworkComponent< DIM >::mOutputData, and Vessel< DIM >::mpFlowProperties.
|
virtual |
Return the radius
Reimplemented from AbstractVesselNetworkComponent< DIM >.
Definition at line 563 of file Vessel.cpp.
References Vessel< DIM >::mSegments.
Referenced by Vessel< DIM >::GetOutputData().
boost::shared_ptr< VesselSegment< DIM > > Vessel< DIM >::GetSegment | ( | unsigned | index | ) |
index | the segment index to return |
Definition at line 624 of file Vessel.cpp.
References Vessel< DIM >::mSegments.
std::vector< boost::shared_ptr< VesselSegment< DIM > > > Vessel< DIM >::GetSegments | ( | ) |
Definition at line 634 of file Vessel.cpp.
References Vessel< DIM >::mSegments.
boost::shared_ptr< VesselNode< DIM > > Vessel< DIM >::GetStartNode | ( | ) |
Definition at line 640 of file Vessel.cpp.
References Vessel< DIM >::mNodes, Vessel< DIM >::mNodesUpToDate, and Vessel< DIM >::UpdateNodes().
Referenced by Vessel< DIM >::GetClosestEndNodeDistance(), Vessel< DIM >::GetConnectedVessels(), Vessel< DIM >::GetNodeAtOppositeEnd(), and Vessel< DIM >::IsConnectedTo().
bool Vessel< DIM >::IsConnectedTo | ( | boost::shared_ptr< Vessel< DIM > > | pOtherVessel | ) |
pOtherVessel | the other vessel to check for connect |
Definition at line 650 of file Vessel.cpp.
References Vessel< DIM >::GetEndNode(), and Vessel< DIM >::GetStartNode().
Referenced by Vessel< DIM >::AddSegments(), Vessel< DIM >::DivideSegment(), and Vessel< DIM >::Vessel().
void Vessel< DIM >::Remove | ( | ) |
Remove the vessel from all its segments
Definition at line 664 of file Vessel.cpp.
References Vessel< DIM >::mNodesUpToDate, and Vessel< DIM >::mSegments.
void Vessel< DIM >::RemoveSegments | ( | SegmentLocation::Value | location | ) |
Remove segments from the ends of a vessel
location | which end to remove from |
Definition at line 676 of file Vessel.cpp.
References Vessel< DIM >::mNodesUpToDate, Vessel< DIM >::mpFlowProperties, and Vessel< DIM >::mSegments.
const std::vector< boost::shared_ptr< VesselNode< DIM > > > & Vessel< DIM >::rGetNodes | ( | ) |
Return a reference to the vessel node vector, avoids a copy
Definition at line 598 of file Vessel.cpp.
References Vessel< DIM >::mNodes, Vessel< DIM >::mNodesUpToDate, and Vessel< DIM >::UpdateNodes().
void Vessel< DIM >::SetFlowProperties | ( | const VesselFlowProperties< DIM > & | rFlowProperties | ) |
Set the flow properties of the vessel
rFlowProperties | the flow properties to be set |
Definition at line 701 of file Vessel.cpp.
References Vessel< DIM >::mpFlowProperties, and Vessel< DIM >::mSegments.
|
virtual |
Set the radius
radius | the radius |
Reimplemented from AbstractVesselNetworkComponent< DIM >.
Definition at line 708 of file Vessel.cpp.
References Vessel< DIM >::mSegments.
Definition at line 717 of file Vessel.cpp.
Referenced by Vessel< DIM >::AddSegment(), Vessel< DIM >::AddSegments(), Vessel< DIM >::DivideSegment(), and Vessel< DIM >::GetConnectedVessels().
void Vessel< DIM >::UpdateNodes | ( | ) |
Update the data in mNodes
Definition at line 723 of file Vessel.cpp.
References Vessel< DIM >::GetNode(), Vessel< DIM >::mNodes, Vessel< DIM >::mNodesUpToDate, and Vessel< DIM >::mSegments.
Referenced by Vessel< DIM >::GetEndNode(), Vessel< DIM >::GetNode(), Vessel< DIM >::GetNodeAtOppositeEnd(), Vessel< DIM >::GetNodes(), Vessel< DIM >::GetNumberOfNodes(), Vessel< DIM >::GetStartNode(), and Vessel< DIM >::rGetNodes().
|
private |
Nodes
Definition at line 81 of file Vessel.hpp.
Referenced by Vessel< DIM >::GetEndNode(), Vessel< DIM >::GetNode(), Vessel< DIM >::GetNodes(), Vessel< DIM >::GetStartNode(), Vessel< DIM >::rGetNodes(), and Vessel< DIM >::UpdateNodes().
Is the data in mNodes up to date.
Definition at line 86 of file Vessel.hpp.
Referenced by Vessel< DIM >::AddSegment(), Vessel< DIM >::AddSegments(), Vessel< DIM >::DivideSegment(), Vessel< DIM >::GetEndNode(), Vessel< DIM >::GetNode(), Vessel< DIM >::GetNodeAtOppositeEnd(), Vessel< DIM >::GetNodes(), Vessel< DIM >::GetNumberOfNodes(), Vessel< DIM >::GetStartNode(), Vessel< DIM >::Remove(), Vessel< DIM >::RemoveSegments(), Vessel< DIM >::rGetNodes(), and Vessel< DIM >::UpdateNodes().
|
private |
A flow property collection for the vessel
Definition at line 91 of file Vessel.hpp.
Referenced by Vessel< DIM >::AddSegment(), Vessel< DIM >::AddSegments(), Vessel< DIM >::DivideSegment(), Vessel< DIM >::GetFlowProperties(), Vessel< DIM >::GetOutputData(), Vessel< DIM >::RemoveSegments(), Vessel< DIM >::SetFlowProperties(), and Vessel< DIM >::Vessel().
|
private |
Vessel segments
Definition at line 76 of file Vessel.hpp.
Referenced by Vessel< DIM >::AddSegment(), Vessel< DIM >::AddSegments(), Vessel< DIM >::DivideSegment(), Vessel< DIM >::GetDistance(), Vessel< DIM >::GetLength(), Vessel< DIM >::GetNumberOfSegments(), Vessel< DIM >::GetRadius(), Vessel< DIM >::GetSegment(), Vessel< DIM >::GetSegments(), Vessel< DIM >::Remove(), Vessel< DIM >::RemoveSegments(), Vessel< DIM >::SetFlowProperties(), Vessel< DIM >::SetRadius(), Vessel< DIM >::UpdateNodes(), and Vessel< DIM >::Vessel().