Chaste
Build::
|
#include <DimensionalChastePoint.hpp>
Public Member Functions | |
DimensionalChastePoint (double x=0.0, double y=0.0, double z=0.0, units::quantity< unit::length > referenceLength=1.e-6 *unit::metres) | |
DimensionalChastePoint (c_vector< double, DIM > coords, units::quantity< unit::length > referenceLength) | |
virtual | ~DimensionalChastePoint () |
units::quantity< unit::length > | GetDistance (const DimensionalChastePoint< DIM > &rLocation) const |
unsigned | GetIndex () |
DimensionalChastePoint< DIM > | GetMidPoint (const DimensionalChastePoint< DIM > &rLocation) const |
units::quantity< unit::length > | GetNorm2 () |
units::quantity< unit::length > | GetReferenceLengthScale () const |
c_vector< double, DIM > | GetLocation (units::quantity< unit::length > scale) |
const c_vector< double, DIM > | GetLocation (units::quantity< unit::length > scale) const |
c_vector< double, DIM > | GetUnitVector () const |
c_vector< double, DIM > | GetUnitTangent (const DimensionalChastePoint< DIM > &rLocation) const |
bool | IsCoincident (const DimensionalChastePoint< DIM > &rLocation) const |
DimensionalChastePoint< DIM > & | operator/= (double factor) |
DimensionalChastePoint< DIM > & | operator*= (double factor) |
DimensionalChastePoint< DIM > & | operator+= (const DimensionalChastePoint< DIM > &rLocation) |
DimensionalChastePoint< DIM > & | operator-= (const DimensionalChastePoint< DIM > &rLocation) |
void | RotateAboutAxis (c_vector< double, 3 > axis, double angle) |
void | SetReferenceLengthScale (units::quantity< unit::length > lenthScale) |
void | SetIndex (unsigned index) |
void | Translate (DimensionalChastePoint< DIM > rVector) |
void | TranslateTo (DimensionalChastePoint< DIM > rPoint) |
Static Public Member Functions | |
static boost::shared_ptr< DimensionalChastePoint< DIM > > | Create (double x, double y, double z, units::quantity< unit::length > referenceLength) |
static boost::shared_ptr< DimensionalChastePoint< DIM > > | Create (c_vector< double, DIM > coords, units::quantity< unit::length > referenceLength) |
Protected Attributes | |
c_vector< double, DIM > | mLocation |
units::quantity< unit::length > | mReferenceLength |
unsigned | mIndex |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Friends | |
class | boost::serialization::access |
This class is used in place of ChastePoint when units are important. It is needed to interface Boost Units with c_vectors. It is a fundamental geometric feature for storing locations.
Definition at line 51 of file DimensionalChastePoint.hpp.
DimensionalChastePoint< DIM >::DimensionalChastePoint | ( | double | x = 0.0 , |
double | y = 0.0 , |
||
double | z = 0.0 , |
||
units::quantity< unit::length > | referenceLength = 1.e-6*unit::metres |
||
) |
Constructor. Be careful with the units of the default constructor. It should only be used for pre-allocating vectors.
x | x position of vertex |
y | y position of vertex |
z | z position of vertex |
referenceLength | the reference length |
Definition at line 40 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
DimensionalChastePoint< DIM >::DimensionalChastePoint | ( | c_vector< double, DIM > | coords, |
units::quantity< unit::length > | referenceLength | ||
) |
Constructor
coords | a vector of x, y, z coordinates |
referenceLength | the reference length |
Definition at line 64 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
|
virtual |
Destructor
Definition at line 94 of file DimensionalChastePoint.cpp.
|
static |
Factory Constructor
x | x position of vertex |
y | y position of vertex |
z | z position of vertex |
referenceLength | the reference length |
Definition at line 80 of file DimensionalChastePoint.cpp.
Referenced by VoronoiGenerator< DIM >::Generate().
|
static |
Factory Constructor
coords | a vector of x, y, z coordinates |
referenceLength | the reference length |
Definition at line 87 of file DimensionalChastePoint.cpp.
units::quantity< unit::length > DimensionalChastePoint< DIM >::GetDistance | ( | const DimensionalChastePoint< DIM > & | rLocation | ) | const |
Get the distance between this point and the input point
rLocation | the input point |
Definition at line 118 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
Referenced by DimensionalChastePoint< DIM >::GetUnitTangent(), VesselNetworkCellPopulationInteractor< DIM >::KillNonVesselOverlappingCells(), VesselNetworkCellPopulationInteractor< DIM >::KillOverlappingVesselCells(), VesselNetworkCellPopulationInteractor< DIM >::LabelVesselsInCellPopulation(), and VesselNetworkCellPopulationInteractor< DIM >::PartitionNetworkOverCells().
unsigned DimensionalChastePoint< DIM >::GetIndex | ( | ) |
Return the index
Definition at line 247 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mIndex.
Referenced by DiscreteContinuumBoundaryCondition< DIM >::UpdateBoundaryConditionContainer().
c_vector< double, DIM > DimensionalChastePoint< DIM >::GetLocation | ( | units::quantity< unit::length > | scale | ) |
Return a non-dimensional location, normalized by the supplied length scale
scale | the length scale for the point |
Definition at line 100 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
Referenced by Part< DIM >::AddCircle(), Part< DIM >::AddRectangle(), Polygon< DIM >::ContainsPoint(), OffLatticeMigrationRule< DIM >::GetDirections(), Polygon< DIM >::GetDistance(), DimensionalChastePoint< DIM >::GetDistance(), Facet< DIM >::GetDistance(), Polygon< DIM >::GetDistanceToEdges(), DiscreteContinuumMesh< ELEMENT_DIM, SPACE_DIM >::GetElementSegmentMap(), DimensionalChastePoint< DIM >::GetMidPoint(), DimensionalChastePoint< DIM >::GetUnitTangent(), DimensionalChastePoint< DIM >::IsCoincident(), RegularGrid< DIM >::IsLocationInPointVolume(), Part< DIM >::IsPointInPart(), DimensionalChastePoint< DIM >::operator+=(), DimensionalChastePoint< DIM >::operator-=(), VesselNetworkGenerator< DIM >::SetReferenceLengthScale(), DimensionalChastePoint< DIM >::Translate(), and DimensionalChastePoint< DIM >::TranslateTo().
const c_vector< double, DIM > DimensionalChastePoint< DIM >::GetLocation | ( | units::quantity< unit::length > | scale | ) | const |
Return a non-dimensional location, normalized by the supplied length scale
scale | the length scale for the point |
Definition at line 106 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
DimensionalChastePoint< DIM > DimensionalChastePoint< DIM >::GetMidPoint | ( | const DimensionalChastePoint< DIM > & | rLocation | ) | const |
Return a point midway between this point and the input point
rLocation | the input point |
Definition at line 136 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
units::quantity< unit::length > DimensionalChastePoint< DIM >::GetNorm2 | ( | ) |
Return the length of the vector between this point and the origin
Definition at line 124 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
units::quantity< unit::length > DimensionalChastePoint< DIM >::GetReferenceLengthScale | ( | ) | const |
Return the reference length scale for the point, default is micron
Definition at line 112 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mReferenceLength.
Referenced by Part< DIM >::AddCircle(), CsvVesselNetworkReader< DIM >::Create(), OffLatticeMigrationRule< DIM >::GetDirections(), and DiscreteContinuumBoundaryCondition< DIM >::GetValue().
c_vector< double, DIM > DimensionalChastePoint< DIM >::GetUnitTangent | ( | const DimensionalChastePoint< DIM > & | rLocation | ) | const |
Return the unit tangent to the segment formed by this point and the input point
rLocation | the input point |
Definition at line 142 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::GetDistance(), DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
c_vector< double, DIM > DimensionalChastePoint< DIM >::GetUnitVector | ( | ) | const |
Return a point one unit from the origin in the direction along the vector between this point and the origin
Definition at line 130 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mLocation.
Referenced by OffLatticeMigrationRule< DIM >::GetDirections().
bool DimensionalChastePoint< DIM >::IsCoincident | ( | const DimensionalChastePoint< DIM > & | rLocation | ) | const |
Return true if the input point is coincident with this point
rLocation | the input point |
Definition at line 176 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
DimensionalChastePoint< DIM > & DimensionalChastePoint< DIM >::operator*= | ( | double | factor | ) |
Overload multiplication with self
factor | the scalar to be multiplied |
Definition at line 155 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mLocation.
DimensionalChastePoint< DIM > & DimensionalChastePoint< DIM >::operator+= | ( | const DimensionalChastePoint< DIM > & | rLocation | ) |
Overload addition to SELF
rLocation | the vector to add |
Definition at line 162 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
DimensionalChastePoint< DIM > & DimensionalChastePoint< DIM >::operator-= | ( | const DimensionalChastePoint< DIM > & | rLocation | ) |
Overload subraction from self
rLocation | the vector to subtract |
Definition at line 169 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
DimensionalChastePoint< DIM > & DimensionalChastePoint< DIM >::operator/= | ( | double | factor | ) |
Overload division from self
rLocation | the vector to be added to |
Definition at line 148 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mLocation.
void DimensionalChastePoint< DIM >::RotateAboutAxis | ( | c_vector< double, 3 > | axis, |
double | angle | ||
) |
Rotate about the axis by the supplied angle
axis | the axis |
angle | the rotation ange |
Definition at line 203 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mLocation.
|
inlineprivate |
Do the serialization
ar | the archive |
version | the archive version |
Definition at line 64 of file DimensionalChastePoint.hpp.
References DimensionalChastePoint< DIM >::mIndex, DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
void DimensionalChastePoint< DIM >::SetIndex | ( | unsigned | index | ) |
Set the index
index | the point index |
Definition at line 253 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mIndex.
void DimensionalChastePoint< DIM >::SetReferenceLengthScale | ( | units::quantity< unit::length > | lenthScale | ) |
Set the length scale used to dimensionalize the point location as stored in mLocation. The point location values are changed accordingly when this value is changed.
lenthScale | the reference length scale for point locations |
Definition at line 192 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
void DimensionalChastePoint< DIM >::Translate | ( | DimensionalChastePoint< DIM > | rVector | ) |
Translate the point along the supplied vector
rVector | the translation vector |
Definition at line 235 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
Referenced by VesselNetwork< DIM >::Translate().
void DimensionalChastePoint< DIM >::TranslateTo | ( | DimensionalChastePoint< DIM > | rPoint | ) |
Translate the point to the new point
rPoint | the new point |
Definition at line 241 of file DimensionalChastePoint.cpp.
References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.
|
friend |
Archiving
Definition at line 56 of file DimensionalChastePoint.hpp.
|
protected |
An optional index
Definition at line 89 of file DimensionalChastePoint.hpp.
Referenced by DimensionalChastePoint< DIM >::GetIndex(), DimensionalChastePoint< DIM >::serialize(), and DimensionalChastePoint< DIM >::SetIndex().
|
protected |
The location of the Point.
Definition at line 76 of file DimensionalChastePoint.hpp.
Referenced by DimensionalChastePoint< DIM >::DimensionalChastePoint(), DimensionalChastePoint< DIM >::GetDistance(), DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::GetMidPoint(), DimensionalChastePoint< DIM >::GetNorm2(), DimensionalChastePoint< DIM >::GetUnitTangent(), DimensionalChastePoint< DIM >::GetUnitVector(), DimensionalChastePoint< DIM >::IsCoincident(), DimensionalChastePoint< DIM >::operator*=(), DimensionalChastePoint< DIM >::operator+=(), DimensionalChastePoint< DIM >::operator-=(), DimensionalChastePoint< DIM >::operator/=(), DimensionalChastePoint< DIM >::RotateAboutAxis(), DimensionalChastePoint< DIM >::serialize(), DimensionalChastePoint< DIM >::SetReferenceLengthScale(), DimensionalChastePoint< DIM >::Translate(), and DimensionalChastePoint< DIM >::TranslateTo().
|
protected |
The reference length scale for the point, default in microns. This is needed as units can't be combined with c_vectors, which hold the point's location. If the length scale is changed the values in mLocation will be changed accordingly. i.e. if the reference length scale is changed from 1 micron to 40 micron, the value in mLocation will be divided by 40.
Definition at line 84 of file DimensionalChastePoint.hpp.
Referenced by DimensionalChastePoint< DIM >::DimensionalChastePoint(), DimensionalChastePoint< DIM >::GetDistance(), DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::GetMidPoint(), DimensionalChastePoint< DIM >::GetNorm2(), DimensionalChastePoint< DIM >::GetReferenceLengthScale(), DimensionalChastePoint< DIM >::GetUnitTangent(), DimensionalChastePoint< DIM >::IsCoincident(), DimensionalChastePoint< DIM >::operator+=(), DimensionalChastePoint< DIM >::operator-=(), DimensionalChastePoint< DIM >::serialize(), DimensionalChastePoint< DIM >::SetReferenceLengthScale(), DimensionalChastePoint< DIM >::Translate(), and DimensionalChastePoint< DIM >::TranslateTo().