#include <NodeMap.hpp>
Public Member Functions | |
NodeMap (unsigned size) | |
void | Resize (unsigned size) |
void | ResetToIdentity () |
void | SetNewIndex (unsigned oldIndex, unsigned newIndex) |
void | SetDeleted (unsigned index) |
bool | IsDeleted (unsigned index) |
unsigned | GetNewIndex (unsigned oldIndex) const |
bool | IsIdentityMap () |
unsigned | Size () |
Private Attributes | |
std::vector< unsigned > | mMap |
Nodemap class used when remeshing. The map associates the indices of nodes in the old mesh with indices of nodes in the new mesh.
Definition at line 39 of file NodeMap.hpp.
NodeMap::NodeMap | ( | unsigned | size | ) |
Constructor.
size | the size of the NodeMap |
Definition at line 39 of file NodeMap.cpp.
References mMap.
Get the new index associated with a given old index.
oldIndex | the old index of a node |
Definition at line 75 of file NodeMap.cpp.
References mMap.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), Cylindrical2dMesh::ReMesh(), MeshBasedTissueWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
Get whether a given old index is marked as 'deleted'.
index | the old index of a node |
Definition at line 70 of file NodeMap.cpp.
References mMap.
Referenced by Cylindrical2dMesh::ReMesh(), and MeshBasedTissueWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh().
bool NodeMap::IsIdentityMap | ( | ) |
Get whether the NodeMap is the identity map.
Definition at line 84 of file NodeMap.cpp.
References mMap.
Referenced by Cylindrical2dMesh::ReMesh(), and MutableMesh< DIM, DIM >::serialize().
void NodeMap::ResetToIdentity | ( | ) |
Reset the NodeMap to the identity map.
Definition at line 52 of file NodeMap.cpp.
References mMap.
Referenced by Cylindrical2dMesh::ReMesh().
void NodeMap::Resize | ( | unsigned | size | ) |
Resize the NodeMap.
size | the new size of the NodeMap |
Definition at line 47 of file NodeMap.cpp.
References mMap.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReIndex(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), and Cylindrical2dMesh::ReMesh().
void NodeMap::SetDeleted | ( | unsigned | index | ) |
Mark a given old index as 'deleted' by associating it with the new index UINT_MAX.
index | the old index of a node |
Definition at line 65 of file NodeMap.cpp.
References mMap.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReIndex(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), and Cylindrical2dMesh::ReMesh().
Associate a given old index with a new index.
oldIndex | the old index of a node | |
newIndex | the new index of a node |
Definition at line 60 of file NodeMap.cpp.
References mMap.
Referenced by MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReIndex(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), Cylindrical2dMesh::ReMesh(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
unsigned NodeMap::Size | ( | ) |
Get the size of the NodeMap.
Definition at line 96 of file NodeMap.cpp.
References mMap.
Referenced by Cylindrical2dMesh::ReMesh(), and MeshBasedTissueWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh().
std::vector<unsigned> NodeMap::mMap [private] |
The map is stored as an ordered vector of node indices.
Definition at line 44 of file NodeMap.hpp.
Referenced by GetNewIndex(), IsDeleted(), IsIdentityMap(), NodeMap(), ResetToIdentity(), Resize(), SetDeleted(), SetNewIndex(), and Size().