Chaste  Build::
DimensionalChastePoint< DIM > Class Template Reference

#include <DimensionalChastePoint.hpp>

+ Collaboration diagram for DimensionalChastePoint< DIM >:

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
 

Detailed Description

template<unsigned DIM>
class DimensionalChastePoint< DIM >

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.

Constructor & Destructor Documentation

template<unsigned DIM>
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.

Parameters
xx position of vertex
yy position of vertex
zz position of vertex
referenceLengththe reference length

Definition at line 40 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.

template<unsigned DIM>
DimensionalChastePoint< DIM >::DimensionalChastePoint ( c_vector< double, DIM >  coords,
units::quantity< unit::length >  referenceLength 
)

Constructor

Parameters
coordsa vector of x, y, z coordinates
referenceLengththe reference length

Definition at line 64 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.

template<unsigned DIM>
DimensionalChastePoint< DIM >::~DimensionalChastePoint ( )
virtual

Destructor

Definition at line 94 of file DimensionalChastePoint.cpp.

Member Function Documentation

template<unsigned DIM>
boost::shared_ptr< DimensionalChastePoint< DIM > > DimensionalChastePoint< DIM >::Create ( double  x,
double  y,
double  z,
units::quantity< unit::length >  referenceLength 
)
static

Factory Constructor

Parameters
xx position of vertex
yy position of vertex
zz position of vertex
referenceLengththe reference length

Definition at line 80 of file DimensionalChastePoint.cpp.

Referenced by VoronoiGenerator< DIM >::Generate().

template<unsigned DIM>
boost::shared_ptr< DimensionalChastePoint< DIM > > DimensionalChastePoint< DIM >::Create ( c_vector< double, DIM >  coords,
units::quantity< unit::length >  referenceLength 
)
static

Factory Constructor

Parameters
coordsa vector of x, y, z coordinates
referenceLengththe reference length

Definition at line 87 of file DimensionalChastePoint.cpp.

template<unsigned DIM>
unsigned DimensionalChastePoint< DIM >::GetIndex ( )

Return the index

Returns
the point index

Definition at line 247 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::mIndex.

Referenced by DiscreteContinuumBoundaryCondition< DIM >::UpdateBoundaryConditionContainer().

template<unsigned DIM>
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

Parameters
scalethe length scale for the point
Returns
the location of the Point. Constant non-liberal variety.

Definition at line 106 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.

template<unsigned DIM>
DimensionalChastePoint< DIM > DimensionalChastePoint< DIM >::GetMidPoint ( const DimensionalChastePoint< DIM > &  rLocation) const

Return a point midway between this point and the input point

Parameters
rLocationthe input point
Returns
a point midway between this point and the input point

Definition at line 136 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.

template<unsigned DIM>
units::quantity< unit::length > DimensionalChastePoint< DIM >::GetNorm2 ( )

Return the length of the vector between this point and the origin

Returns
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.

template<unsigned DIM>
units::quantity< unit::length > DimensionalChastePoint< DIM >::GetReferenceLengthScale ( ) const

Return the reference length scale for the point, default is micron

Returns
the reference length scale

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().

template<unsigned DIM>
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

Parameters
rLocationthe input point
Returns
the unit tangent to the segment formed by this point and 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.

template<unsigned DIM>
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

Returns
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().

template<unsigned DIM>
bool DimensionalChastePoint< DIM >::IsCoincident ( const DimensionalChastePoint< DIM > &  rLocation) const

Return true if the input point is coincident with this point

Parameters
rLocationthe input point
Returns
true if the input point is coincident with this point

Definition at line 176 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.

template<unsigned DIM>
DimensionalChastePoint< DIM > & DimensionalChastePoint< DIM >::operator*= ( double  factor)

Overload multiplication with self

Returns
the resultant point
Parameters
factorthe scalar to be multiplied

Definition at line 155 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::mLocation.

template<unsigned DIM>
DimensionalChastePoint< DIM > & DimensionalChastePoint< DIM >::operator+= ( const DimensionalChastePoint< DIM > &  rLocation)

Overload addition to SELF

Returns
the resultant point
Parameters
rLocationthe vector to add

Definition at line 162 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.

template<unsigned DIM>
DimensionalChastePoint< DIM > & DimensionalChastePoint< DIM >::operator-= ( const DimensionalChastePoint< DIM > &  rLocation)

Overload subraction from self

Returns
the resultant point
Parameters
rLocationthe vector to subtract

Definition at line 169 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.

template<unsigned DIM>
DimensionalChastePoint< DIM > & DimensionalChastePoint< DIM >::operator/= ( double  factor)

Overload division from self

Returns
the resultant point
Parameters
rLocationthe vector to be added to

Definition at line 148 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::mLocation.

template<unsigned DIM>
void DimensionalChastePoint< DIM >::RotateAboutAxis ( c_vector< double, 3 >  axis,
double  angle 
)

Rotate about the axis by the supplied angle

Parameters
axisthe axis
anglethe rotation ange

Definition at line 203 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::mLocation.

template<unsigned DIM>
template<class Archive >
void DimensionalChastePoint< DIM >::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Do the serialization

Parameters
arthe archive
versionthe archive version

Definition at line 64 of file DimensionalChastePoint.hpp.

References DimensionalChastePoint< DIM >::mIndex, DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.

template<unsigned DIM>
void DimensionalChastePoint< DIM >::SetIndex ( unsigned  index)

Set the index

Parameters
indexthe point index

Definition at line 253 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::mIndex.

template<unsigned DIM>
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.

Parameters
lenthScalethe reference length scale for point locations

Definition at line 192 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.

template<unsigned DIM>
void DimensionalChastePoint< DIM >::Translate ( DimensionalChastePoint< DIM >  rVector)

Translate the point along the supplied vector

Parameters
rVectorthe 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().

template<unsigned DIM>
void DimensionalChastePoint< DIM >::TranslateTo ( DimensionalChastePoint< DIM >  rPoint)

Translate the point to the new point

Parameters
rPointthe new point

Definition at line 241 of file DimensionalChastePoint.cpp.

References DimensionalChastePoint< DIM >::GetLocation(), DimensionalChastePoint< DIM >::mLocation, and DimensionalChastePoint< DIM >::mReferenceLength.

Friends And Related Function Documentation

template<unsigned DIM>
friend class boost::serialization::access
friend

Archiving

Definition at line 56 of file DimensionalChastePoint.hpp.

Member Data Documentation

template<unsigned DIM>
unsigned DimensionalChastePoint< DIM >::mIndex
protected
template<unsigned DIM>
units::quantity<unit::length> DimensionalChastePoint< DIM >::mReferenceLength
protected

The documentation for this class was generated from the following files: