#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 |
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.
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::ResetToIdentity | ( | ) |
Reset the NodeMap to the identity map.
Definition at line 52 of file NodeMap.cpp.
References mMap.
Referenced by Cylindrical2dMesh::ReMesh().
void NodeMap::SetNewIndex | ( | unsigned | oldIndex, | |
unsigned | newIndex | |||
) |
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 TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ExportToMesher(), 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().
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 TetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ExportToMesher(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReIndex(), MutableMesh< ELEMENT_DIM, SPACE_DIM >::ReMesh(), and Cylindrical2dMesh::ReMesh().
bool NodeMap::IsDeleted | ( | unsigned | index | ) |
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 MeshBasedCellPopulationWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh().
unsigned NodeMap::GetNewIndex | ( | unsigned | oldIndex | ) | const |
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 EXCEPTION, and mMap.
Referenced by AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElementWithFaces(), Cylindrical2dMesh::ReMesh(), MeshBasedCellPopulationWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh().
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().
unsigned NodeMap::Size | ( | ) |
Get the size of the NodeMap.
Definition at line 96 of file NodeMap.cpp.
References mMap.
Referenced by Cylindrical2dMesh::ReMesh(), and MeshBasedCellPopulationWithGhostNodes< 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().