Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
VertexElementMap Class Reference

#include <VertexElementMap.hpp>

+ Collaboration diagram for VertexElementMap:

Public Member Functions

 VertexElementMap (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< unsignedmMap
 

Detailed Description

VertexElementMap class used when remeshing. The map associates the indices of VertexElements in the old mesh with indices of VertexElements in the new mesh.

Definition at line 47 of file VertexElementMap.hpp.

Constructor & Destructor Documentation

◆ VertexElementMap()

VertexElementMap::VertexElementMap ( unsigned  size)

Constructor.

Parameters
sizethe size of the VertexElementMap

Definition at line 45 of file VertexElementMap.cpp.

References mMap.

Member Function Documentation

◆ GetNewIndex()

unsigned VertexElementMap::GetNewIndex ( unsigned  oldIndex) const
Returns
the new index associated with a given old index.
Parameters
oldIndexthe old index of a VertexElement

Definition at line 78 of file VertexElementMap.cpp.

References EXCEPTION, and mMap.

Referenced by VertexBasedCellPopulation< DIM >::Update(), and VertexBasedPopulationSrn< DIM >::UpdateSrnAfterBirthOrDeath().

◆ IsDeleted()

bool VertexElementMap::IsDeleted ( unsigned  index)
Returns
whether a given old index is marked as 'deleted'.
Parameters
indexthe old index of a VertexElement

Definition at line 73 of file VertexElementMap.cpp.

References mMap.

Referenced by VertexBasedCellPopulation< DIM >::Update(), and VertexBasedPopulationSrn< DIM >::UpdateSrnAfterBirthOrDeath().

◆ IsIdentityMap()

bool VertexElementMap::IsIdentityMap ( )
Returns
whether the VertexElementMap is the identity map.

Definition at line 87 of file VertexElementMap.cpp.

References mMap.

Referenced by VertexBasedCellPopulation< DIM >::Update().

◆ ResetToIdentity()

void VertexElementMap::ResetToIdentity ( )

Reset the VertexElementMap to the identity map.

Definition at line 55 of file VertexElementMap.cpp.

References mMap.

Referenced by VertexBasedCellPopulation< DIM >::Update().

◆ Resize()

void VertexElementMap::Resize ( unsigned  size)

Resize the VertexElementMap.

Parameters
sizethe new size of the VertexElementMap

Definition at line 50 of file VertexElementMap.cpp.

References mMap.

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::RemoveDeletedNodesAndElements().

◆ SetDeleted()

void VertexElementMap::SetDeleted ( unsigned  index)

Mark a given old index as 'deleted' by associating it with the new index UINT_MAX.

Parameters
indexthe old index of a VertexElement

Definition at line 68 of file VertexElementMap.cpp.

References mMap.

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::CheckForT2Swaps(), and MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::RemoveDeletedNodesAndElements().

◆ SetNewIndex()

void VertexElementMap::SetNewIndex ( unsigned  oldIndex,
unsigned  newIndex 
)

Associate a given old index with a new index.

Parameters
oldIndexthe old index of a VertexElement
newIndexthe new index of a VertexElement

Definition at line 63 of file VertexElementMap.cpp.

References mMap.

Referenced by MutableVertexMesh< ELEMENT_DIM, SPACE_DIM >::RemoveDeletedNodesAndElements().

◆ Size()

unsigned VertexElementMap::Size ( )
Returns
the size of the VertexElementMap.

Definition at line 99 of file VertexElementMap.cpp.

References mMap.

Member Data Documentation

◆ mMap

std::vector<unsigned> VertexElementMap::mMap
private

The map is stored as an ordered vector of VertexElement indices.

Definition at line 52 of file VertexElementMap.hpp.

Referenced by VertexElementMap(), GetNewIndex(), IsDeleted(), IsIdentityMap(), ResetToIdentity(), Resize(), SetDeleted(), SetNewIndex(), and Size().


The documentation for this class was generated from the following files: