36 #include <boost/weak_ptr.hpp> 37 #include "Exception.hpp" 38 #include "VesselNode.hpp" 40 template<
unsigned DIM>
51 template<
unsigned DIM>
62 template<
unsigned DIM>
73 template<
unsigned DIM>
87 template<
unsigned DIM>
92 template<
unsigned DIM>
93 boost::shared_ptr<VesselNode<DIM> >
VesselNode<DIM>::Create(
double v1,
double v2,
double v3, units::quantity<unit::length> referenceLength)
99 template<
unsigned DIM>
106 template<
unsigned DIM>
113 template<
unsigned DIM>
120 template<
unsigned DIM>
125 EXCEPTION(
"A Null pointer cannot be used when copying nodes.");
131 template<
unsigned DIM>
136 for (
unsigned idx = 0; idx <
mSegments.size(); idx++)
138 if (
mSegments[idx].lock() == pVesselSegment)
140 EXCEPTION(
"This segment is already attached to this node.");
146 template<
unsigned DIM>
152 template<
unsigned DIM>
158 template<
unsigned DIM>
164 template<
unsigned DIM>
170 template<
unsigned DIM>
176 template<
unsigned DIM>
180 std::map<std::string, double> flow_data = this->
mpFlowProperties->GetOutputData();
181 this->
mOutputData.insert(flow_data.begin(), flow_data.end());
188 template<
unsigned DIM>
191 return mLocation.GetReferenceLengthScale();
194 template<
unsigned DIM>
199 EXCEPTION(
"Requested segment index out of range");
208 template<
unsigned DIM>
212 std::vector<boost::shared_ptr<VesselSegment<DIM> > > segments(
mSegments.size());
213 for(
unsigned idx=0; idx<segments.size(); idx++)
220 template<
unsigned DIM>
224 return (pSegment->GetNode(0) == this->shared_from_this() || pSegment->GetNode(1) == this->shared_from_this());
227 template<
unsigned DIM>
230 return this->
mLocation.IsCoincident(rLocation);
233 template<
unsigned DIM>
239 template<
unsigned DIM>
243 for (
unsigned idx = 0; idx <
mSegments.size(); idx++)
245 if (
mSegments[idx].lock() == pVesselSegment)
253 template<
unsigned DIM>
259 template<
unsigned DIM>
265 template<
unsigned DIM>
271 template<
unsigned DIM>
277 template<
unsigned DIM>
283 template<
unsigned DIM>
286 this->
mLocation.SetReferenceLengthScale(lengthScale);
293 #include "SerializationExportWrapperForCpp.hpp" bool IsCoincident(const DimensionalChastePoint< DIM > &rLocation) const
unsigned GetNumberOfSegments() const
static boost::shared_ptr< VesselNode< DIM > > Create(double v1=0.0, double v2=0.0, double v3=0.0)
DimensionalChastePoint< DIM > mLocation
void SetComparisonId(unsigned id)
unsigned GetComparisonId()
void SetLocation(const DimensionalChastePoint< DIM > &rLocation)
bool IsAttachedTo(const boost::shared_ptr< VesselSegment< DIM > > pSegment) const
void RemoveSegment(boost::shared_ptr< VesselSegment< DIM > > pVesselSegment)
units::quantity< unit::length > GetDistance(const DimensionalChastePoint< DIM > &rLocation) const
std::vector< boost::shared_ptr< VesselSegment< DIM > > > GetSegments() const
boost::shared_ptr< NodeFlowProperties< DIM > > mpFlowProperties
void AddSegment(boost::shared_ptr< VesselSegment< DIM > > pVesselSegment)
std::map< std::string, double > mOutputData
boost::shared_ptr< NodeFlowProperties< DIM > > GetFlowProperties() const
std::map< std::string, double > GetOutputData()
VesselNode(double v1, double v2, double v3, units::quantity< unit::length > referenceLength)
const DimensionalChastePoint< DIM > & rGetLocation() const
units::quantity< unit::length > GetReferenceLengthScale() const
virtual unsigned GetId() const
unsigned mPtrComparisonId
void SetReferenceLengthScale(units::quantity< unit::length > lenthScale)
virtual units::quantity< unit::length > GetRadius() const
std::vector< boost::weak_ptr< VesselSegment< DIM > > > mSegments
void SetIsMigrating(bool isMigrating)
void SetFlowProperties(const NodeFlowProperties< DIM > &rFlowProperties)
boost::shared_ptr< VesselSegment< DIM > > GetSegment(unsigned index) const