ChastePoint< DIM > Class Template Reference

#include <ChastePoint.hpp>

Collaboration diagram for ChastePoint< DIM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChastePoint (double v1=0, double v2=0, double v3=0)
 ChastePoint (std::vector< double > coords)
 ChastePoint (c_vector< double, DIM > location)
c_vector< double, DIM > & rGetLocation ()
double operator[] (unsigned i) const
void SetCoordinate (unsigned i, double value)
bool IsSamePoint (const ChastePoint< DIM > &rPoint) const

Private Attributes

c_vector< double, DIM > mLocation

Detailed Description

template<unsigned DIM>
class ChastePoint< DIM >

A ChastePoint class, templated over spatial dimension.

Definition at line 43 of file ChastePoint.hpp.


Constructor & Destructor Documentation

template<unsigned DIM>
ChastePoint< DIM >::ChastePoint ( double  v1 = 0,
double  v2 = 0,
double  v3 = 0 
) [inline]

Create a Point object. There are 3 optional arguments, which can be used to specify the values of the first 3 dimensions, if present.

Point now uses a ublas vector to store its location. The rGetLocation method returns a reference to this vector. Use of this method together with ublas operations is the perfered way to use this class.

Parameters:
v1 the point's x-coordinate (defaults to 0)
v2 the point's y-coordinate (defaults to 0)
v3 the point's z-coordinate (defaults to 0)

Definition at line 38 of file ChastePoint.cpp.

References ChastePoint< DIM >::mLocation.

template<unsigned DIM>
ChastePoint< DIM >::ChastePoint ( std::vector< double coords  )  [inline]

Create a Point object. This constructor takes a vector giving the coordinates of the point. The length of the vector must be at least the dimension of the point.

Parameters:
coords a std::vector storing the point's coordinates

Definition at line 55 of file ChastePoint.cpp.

References ChastePoint< DIM >::mLocation.

template<unsigned DIM>
ChastePoint< DIM >::ChastePoint ( c_vector< double, DIM >  location  )  [inline]

Alternative constructor which takes in a c_vector.

Parameters:
location a c_vector storing the point's coordinates

Definition at line 64 of file ChastePoint.cpp.


Member Function Documentation

template<unsigned DIM>
bool ChastePoint< DIM >::IsSamePoint ( const ChastePoint< DIM > &  rPoint  )  const [inline]

Checks whether one chaste point is the same as the one constructed

Parameters:
rPoint the point to be checked
Returns:
true if the are the same

Definition at line 90 of file ChastePoint.cpp.

References ChastePoint< DIM >::mLocation.

template<unsigned DIM>
double ChastePoint< DIM >::operator[] ( unsigned  i  )  const [inline]

Access the vector mLocation.

Parameters:
i the index of the vector to return

Definition at line 76 of file ChastePoint.cpp.

References ChastePoint< DIM >::mLocation.

template<unsigned DIM>
c_vector< double, DIM > & ChastePoint< DIM >::rGetLocation (  )  [inline]
template<unsigned DIM>
void ChastePoint< DIM >::SetCoordinate ( unsigned  i,
double  value 
) [inline]

Set one of the coordinates of the Point.

Parameters:
i the index of the coordinate
value the value of the coordinate

Definition at line 83 of file ChastePoint.cpp.

References ChastePoint< DIM >::mLocation.

Referenced by Cylindrical2dMesh::SetNode().


Member Data Documentation

template<unsigned DIM>
c_vector<double, DIM> ChastePoint< DIM >::mLocation [private]

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

Generated by  doxygen 1.6.2