Chaste Release::3.1
|
#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 46 of file NodeMap.hpp.
NodeMap::NodeMap | ( | unsigned | size | ) |
Constructor.
size | the size of the NodeMap |
Definition at line 46 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 82 of file NodeMap.cpp.
References EXCEPTION, and mMap.
Referenced by Cylindrical2dMesh::ReMesh(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::Update(), MeshBasedCellPopulationWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh(), and NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlesAfterReMesh().
Get whether a given old index is marked as 'deleted'.
index | the old index of a node |
Definition at line 77 of file NodeMap.cpp.
References mMap.
Referenced by Cylindrical2dMesh::ReMesh(), MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::Update(), MeshBasedCellPopulationWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh(), and NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlesAfterReMesh().
bool NodeMap::IsIdentityMap | ( | ) |
Get whether the NodeMap is the identity map.
Definition at line 91 of file NodeMap.cpp.
References mMap.
Referenced by Cylindrical2dMesh::ReMesh(), MutableMesh< SPACE_DIM, SPACE_DIM >::serialize(), and MeshBasedCellPopulation< ELEMENT_DIM, SPACE_DIM >::Update().
void NodeMap::ResetToIdentity | ( | ) |
Reset the NodeMap to the identity map.
Definition at line 59 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 54 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 72 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(), NodesOnlyMesh< 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 67 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(), NodesOnlyMesh< SPACE_DIM >::ReMesh(), Cylindrical2dMesh::ReMesh(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), VertexMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), SemMeshWriter< SPACE_DIM >::WriteFilesUsingMesh(), and PottsMeshWriter< SPACE_DIM >::WriteFilesUsingMesh().
unsigned NodeMap::Size | ( | ) |
Get the size of the NodeMap.
Definition at line 103 of file NodeMap.cpp.
References mMap.
Referenced by Cylindrical2dMesh::ReMesh(), MeshBasedCellPopulationWithGhostNodes< DIM >::UpdateGhostNodesAfterReMesh(), and NodeBasedCellPopulationWithParticles< DIM >::UpdateParticlesAfterReMesh().
std::vector<unsigned> NodeMap::mMap [private] |
The map is stored as an ordered vector of node indices.
Definition at line 51 of file NodeMap.hpp.
Referenced by GetNewIndex(), IsDeleted(), IsIdentityMap(), NodeMap(), ResetToIdentity(), Resize(), SetDeleted(), SetNewIndex(), and Size().