#include <DistanceMapCalculator.hpp>
Public Member Functions | |
DistanceMapCalculator (TetrahedralMesh< SPACE_DIM, SPACE_DIM > &rMesh) | |
void | ComputeDistanceMap (const std::vector< unsigned > &rOriginSurface, std::vector< double > &rNodeDistances) |
Private Member Functions | |
double | EuclideanDistanceTwoPoints (const c_vector< double, SPACE_DIM > &pointA, const c_vector< double, SPACE_DIM > &pointB) const |
double | CartToEucliDistance (c_vector< double, SPACE_DIM > &cartDistance) const |
Private Attributes | |
TetrahedralMesh< SPACE_DIM, SPACE_DIM > & | mrMesh |
unsigned | mNumNodes |
The mesh is specified in the constructor, and the ComputeDistanceMap computes (and returns by reference) the map.
Definition at line 44 of file DistanceMapCalculator.hpp.
DistanceMapCalculator< SPACE_DIM >::DistanceMapCalculator | ( | TetrahedralMesh< SPACE_DIM, SPACE_DIM > & | rMesh | ) | [inline] |
Constructor
rMesh | the mesh to compute maps for |
Definition at line 65 of file DistanceMapCalculator.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), DistanceMapCalculator< SPACE_DIM >::mNumNodes, and DistanceMapCalculator< SPACE_DIM >::mrMesh.
double DistanceMapCalculator< SPACE_DIM >::EuclideanDistanceTwoPoints | ( | const c_vector< double, SPACE_DIM > & | pointA, | |
const c_vector< double, SPACE_DIM > & | pointB | |||
) | const [inline, private] |
Computes the euclidean distance of two given points
pointA | First point | |
pointB | Second point |
Definition at line 35 of file DistanceMapCalculator.cpp.
Referenced by DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap().
double DistanceMapCalculator< SPACE_DIM >::CartToEucliDistance | ( | c_vector< double, SPACE_DIM > & | cartDistance | ) | const [inline, private] |
Given a cartesian distance, computes the associated euclidean distance
cartDistance | Cartesian distance of a given point |
Definition at line 50 of file DistanceMapCalculator.cpp.
Referenced by DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap().
void DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap | ( | const std::vector< unsigned > & | rOriginSurface, | |
std::vector< double > & | rNodeDistances | |||
) | [inline] |
Generates a distance map of all the nodes of the mesh to the given surface
rOriginSurface | set of node indexes defining the surface | |
rNodeDistances | distance map computed. The method will resize it if it's not big enough. |
Definition at line 73 of file DistanceMapCalculator.cpp.
References DistanceMapCalculator< SPACE_DIM >::CartToEucliDistance(), Node< SPACE_DIM >::ContainingElementsBegin(), Node< SPACE_DIM >::ContainingElementsEnd(), DistanceMapCalculator< SPACE_DIM >::EuclideanDistanceTwoPoints(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElement(), Node< SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), DistanceMapCalculator< SPACE_DIM >::mNumNodes, DistanceMapCalculator< SPACE_DIM >::mrMesh, and Node< SPACE_DIM >::rGetLocation().
Referenced by HeartGeometryInformation< SPACE_DIM >::HeartGeometryInformation().
TetrahedralMesh<SPACE_DIM,SPACE_DIM>& DistanceMapCalculator< SPACE_DIM >::mrMesh [private] |
The mesh
Definition at line 49 of file DistanceMapCalculator.hpp.
Referenced by DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap(), and DistanceMapCalculator< SPACE_DIM >::DistanceMapCalculator().
unsigned DistanceMapCalculator< SPACE_DIM >::mNumNodes [private] |
Number of nodes in the mesh
Definition at line 51 of file DistanceMapCalculator.hpp.
Referenced by DistanceMapCalculator< SPACE_DIM >::ComputeDistanceMap(), and DistanceMapCalculator< SPACE_DIM >::DistanceMapCalculator().