Chaste
Release::2017.1
|
#include <ChastePoint.hpp>
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 () |
const c_vector< double, DIM > & | rGetLocation () const |
double | operator[] (unsigned i) const |
double | GetWithDefault (unsigned i, double def=0.0) const |
void | SetCoordinate (unsigned i, double value) |
bool | IsSamePoint (const ChastePoint< DIM > &rPoint) const |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
c_vector< double, DIM > | mLocation |
Friends | |
class | boost::serialization::access |
A ChastePoint class, templated over spatial dimension.
Definition at line 49 of file ChastePoint.hpp.
ChastePoint< DIM >::ChastePoint | ( | double | v1 = 0 , |
double | v2 = 0 , |
||
double | v3 = 0 |
||
) |
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.
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 44 of file ChastePoint.cpp.
ChastePoint< DIM >::ChastePoint | ( | std::vector< double > | coords | ) |
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.
coords | a std::vector storing the point's coordinates |
Definition at line 61 of file ChastePoint.cpp.
ChastePoint< DIM >::ChastePoint | ( | c_vector< double, DIM > | location | ) |
Alternative constructor which takes in a c_vector.
location | a c_vector storing the point's coordinates |
Definition at line 70 of file ChastePoint.cpp.
double ChastePoint< DIM >::GetWithDefault | ( | unsigned | i, |
double | def = 0.0 |
||
) | const |
i | the co-ordinate to get |
def | the default value |
Definition at line 95 of file ChastePoint.cpp.
References ChastePoint< DIM >::mLocation.
Referenced by PseudoEcgCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WritePseudoEcg().
bool ChastePoint< DIM >::IsSamePoint | ( | const ChastePoint< DIM > & | rPoint | ) | const |
Checks whether one chaste point is the same as the one constructed
rPoint | the point to be checked |
Definition at line 115 of file ChastePoint.cpp.
References ChastePoint< DIM >::mLocation.
double ChastePoint< DIM >::operator[] | ( | unsigned | i | ) | const |
i | the index of the vector to return |
Definition at line 88 of file ChastePoint.cpp.
References ChastePoint< DIM >::mLocation.
c_vector< double, DIM > & ChastePoint< DIM >::rGetLocation | ( | ) |
Definition at line 76 of file ChastePoint.cpp.
References ChastePoint< DIM >::mLocation.
Referenced by AbstractFeCableIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::AssembleOnCableElement(), AbstractFeVolumeIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM, CAN_ASSEMBLE_VECTOR, CAN_ASSEMBLE_MATRIX, INTERPOLATION_LEVEL >::AssembleOnElement(), AbstractFeSurfaceIntegralAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AssembleOnSurfaceElement(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::CalculateBoundingBox(), AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CalculateOnElement(), Element< ELEMENT_DIM, SPACE_DIM >::CalculateXi(), AbstractBoxDomainPdeModifier< DIM >::GenerateFeMesh(), AbstractNonlinearElasticitySolver< DIM >::GetElementCentroidStrain(), PseudoEcgCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetIntegrand(), DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNearestNodeIndex(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNearestNodeIndex(), Node< SPACE_DIM >::Node(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::RefineElement(), Cylindrical2dNodesOnlyMesh::SetNode(), Toroidal2dVertexMesh::SetNode(), Cylindrical2dVertexMesh::SetNode(), Cylindrical2dMesh::SetNode(), and Node< SPACE_DIM >::SetPoint().
const c_vector< double, DIM > & ChastePoint< DIM >::rGetLocation | ( | ) | const |
Definition at line 82 of file ChastePoint.cpp.
References ChastePoint< DIM >::mLocation.
|
inlineprivate |
Archive the member variables.
archive | |
version |
Definition at line 60 of file ChastePoint.hpp.
void ChastePoint< DIM >::SetCoordinate | ( | unsigned | i, |
double | value | ||
) |
Set one of the coordinates of the Point.
i | the index of the coordinate |
value | the value of the coordinate |
Definition at line 108 of file ChastePoint.cpp.
References ChastePoint< DIM >::mLocation.
Referenced by Cylindrical2dNodesOnlyMesh::SetNode(), Toroidal2dVertexMesh::SetNode(), Cylindrical2dVertexMesh::SetNode(), and Cylindrical2dMesh::SetNode().
|
friend |
Needed for serialization.
Definition at line 52 of file ChastePoint.hpp.
|
private |
The location of the Point.
Definition at line 68 of file ChastePoint.hpp.
Referenced by ChastePoint< DIM >::GetWithDefault(), ChastePoint< DIM >::IsSamePoint(), ChastePoint< DIM >::operator[](), ChastePoint< DIM >::rGetLocation(), and ChastePoint< DIM >::SetCoordinate().