Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <VertexMeshOperationRecorder.hpp>

+ Collaboration diagram for VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 VertexMeshOperationRecorder ()
 
 ~VertexMeshOperationRecorder ()
 
void SetEdgeHelper (EdgeHelper< SPACE_DIM > *pEdgeHelper)
 
void RecordT1Swap (T1SwapInfo< SPACE_DIM > &rSwapInfo)
 
std::vector< T1SwapInfo< SPACE_DIM > > GetT1SwapsInfo () const
 
void ClearT1SwapsInfo ()
 
void RecordT2Swap (T2SwapInfo< SPACE_DIM > &rSwapInfo)
 
std::vector< T2SwapInfo< SPACE_DIM > > GetT2SwapsInfo () const
 
void ClearT2SwapsInfo ()
 
void RecordT3Swap (T3SwapInfo< SPACE_DIM > &rSwapInfo)
 
std::vector< T3SwapInfo< SPACE_DIM > > GetT3SwapsInfo () const
 
void ClearT3SwapsInfo ()
 
void RecordCellDivisionInfo (CellDivisionInfo< SPACE_DIM > &rDivisionInfo)
 
std::vector< CellDivisionInfo< SPACE_DIM > > GetCellDivisionInfo () const
 
void ClearCellDivisionInfo ()
 
const std::vector< EdgeOperation > & GetEdgeOperations ()
 
void ClearEdgeOperations ()
 
void RecordNodeMergeOperation (const std::vector< unsigned > oldIds, VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, const std::pair< unsigned, unsigned > mergedNodesPair, const bool elementIndexIsRemapped=false)
 
void RecordEdgeSplitOperation (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, const unsigned edgeIndex, const double insertedNodeRelPosition, const bool elementIndexIsRemapped=false)
 
void RecordCellDivideOperation (const std::vector< unsigned > &rOldIds, VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement1, VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement2)
 
void RecordNewEdgeOperation (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, const unsigned edgeIndex)
 
void RecordEdgeMergeOperation (VertexElement< ELEMENT_DIM, SPACE_DIM > *pElement, const unsigned nodeIndex)
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Private Attributes

std::vector< T1SwapInfo< SPACE_DIM > > mT1Swaps
 
std::vector< T2SwapInfo< SPACE_DIM > > mT2Swaps
 
std::vector< T3SwapInfo< SPACE_DIM > > mT3Swaps
 
std::vector< CellDivisionInfo< SPACE_DIM > > mCellDivisions
 
std::vector< EdgeOperationmEdgeOperations
 
EdgeHelper< SPACE_DIM > * mpEdgeHelper
 

Friends

class boost::serialization::access
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >

This class records operations performed on the mesh. In particular, this class records operations on edges and nodes during e.g. T1 transition or cell division.

The sequence of operations as well as their nature are needed for remapping of old (prior to an operation) edge based quantities into new state. For example, when an edge is split into two or, shrinks, the edge quantities may change according to the kind of operation.

Definition at line 64 of file VertexMeshOperationRecorder.hpp.

Constructor & Destructor Documentation

◆ VertexMeshOperationRecorder()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::VertexMeshOperationRecorder ( )

Constructor.

Definition at line 41 of file VertexMeshOperationRecorder.cpp.

◆ ~VertexMeshOperationRecorder()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::~VertexMeshOperationRecorder ( )

Destructor.

Definition at line 47 of file VertexMeshOperationRecorder.cpp.

Member Function Documentation

◆ ClearCellDivisionInfo()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::ClearCellDivisionInfo ( )

Clear information about T3 swaps.

Definition at line 124 of file VertexMeshOperationRecorder.cpp.

◆ ClearEdgeOperations()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::ClearEdgeOperations ( )

Clear edge operations.

Definition at line 136 of file VertexMeshOperationRecorder.cpp.

◆ ClearT1SwapsInfo()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::ClearT1SwapsInfo ( )

Clear information about T1 swaps

Definition at line 70 of file VertexMeshOperationRecorder.cpp.

◆ ClearT2SwapsInfo()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::ClearT2SwapsInfo ( )

Clear information about T1 swaps

Definition at line 88 of file VertexMeshOperationRecorder.cpp.

◆ ClearT3SwapsInfo()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::ClearT3SwapsInfo ( )

Clear information about T3 swaps

Definition at line 106 of file VertexMeshOperationRecorder.cpp.

◆ GetCellDivisionInfo()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< CellDivisionInfo< SPACE_DIM > > VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::GetCellDivisionInfo ( ) const
Returns
Information about cell divisions

Definition at line 118 of file VertexMeshOperationRecorder.cpp.

◆ GetEdgeOperations()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
const std::vector< EdgeOperation > & VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::GetEdgeOperations ( )
Returns
Edge operations since last clearing

Definition at line 130 of file VertexMeshOperationRecorder.cpp.

◆ GetT1SwapsInfo()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< T1SwapInfo< SPACE_DIM > > VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::GetT1SwapsInfo ( ) const
Returns
Information about all T1 swaps

Definition at line 64 of file VertexMeshOperationRecorder.cpp.

◆ GetT2SwapsInfo()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< T2SwapInfo< SPACE_DIM > > VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::GetT2SwapsInfo ( ) const
Returns
Information about T2 swaps

Definition at line 82 of file VertexMeshOperationRecorder.cpp.

◆ GetT3SwapsInfo()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< T3SwapInfo< SPACE_DIM > > VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::GetT3SwapsInfo ( ) const
Returns
Information about T3 swaps

Definition at line 100 of file VertexMeshOperationRecorder.cpp.

◆ RecordCellDivideOperation()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordCellDivideOperation ( const std::vector< unsigned > &  rOldIds,
VertexElement< ELEMENT_DIM, SPACE_DIM > *  pElement1,
VertexElement< ELEMENT_DIM, SPACE_DIM > *  pElement2 
)

Record cell divisions for VertexBasedPopulationSrn class to remap SRNs.

Parameters
rOldIdsGlobal Edge IDs of parent cell prior cell division
pElement1Daughter element
pElement2Daughter element

Definition at line 291 of file VertexMeshOperationRecorder.cpp.

References MutableElement< ELEMENT_DIM, SPACE_DIM >::GetEdge(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetLocalEdgeIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNumEdges(), and EdgeRemapInfo::SetSplitProportions().

◆ RecordCellDivisionInfo()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordCellDivisionInfo ( CellDivisionInfo< SPACE_DIM > &  rDivisionInfo)

Record cell division event.

Parameters
rDivisionInfoinformation about a cell division event.

Definition at line 112 of file VertexMeshOperationRecorder.cpp.

◆ RecordEdgeMergeOperation()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordEdgeMergeOperation ( VertexElement< ELEMENT_DIM, SPACE_DIM > *  pElement,
const unsigned  nodeIndex 
)

Record merging of adjacent edges due to deletion of the shared node nodeIndex in element pElement

Parameters
pElementPointer to element associated with edge merge
nodeIndexGlobal index of node

Definition at line 452 of file VertexMeshOperationRecorder.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), and MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNumEdges().

◆ RecordEdgeSplitOperation()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordEdgeSplitOperation ( VertexElement< ELEMENT_DIM, SPACE_DIM > *  pElement,
const unsigned  edgeIndex,
const double  insertedNodeRelPosition,
const bool  elementIndexIsRemapped = false 
)

Record edge split operation in element pElement.

Parameters
pElementPointer to element associated with edge split
edgeIndexindex of the edge being split
insertedNodeRelPositionposition of the inserted node relative to the lower index node of the edge
elementIndexIsRemappedindicates whether the operation has been recorded before element indices have been remapped, e.g. before elements are deleted (defaults to false)

Definition at line 257 of file VertexMeshOperationRecorder.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNumEdges(), and EdgeRemapInfo::SetSplitProportions().

◆ RecordNewEdgeOperation()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordNewEdgeOperation ( VertexElement< ELEMENT_DIM, SPACE_DIM > *  pElement,
const unsigned  edgeIndex 
)

Records edge formation

Parameters
pElement
edgeIndex- new edge index

Definition at line 427 of file VertexMeshOperationRecorder.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), and MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNumEdges().

◆ RecordNodeMergeOperation()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordNodeMergeOperation ( const std::vector< unsigned oldIds,
VertexElement< ELEMENT_DIM, SPACE_DIM > *  pElement,
const std::pair< unsigned, unsigned mergedNodesPair,
const bool  elementIndexIsRemapped = false 
)

Record node merging (or edge shrinkage) event.

Parameters
oldIdsGlobal Edge IDs prior to node merge
pElementPointer to element associated with node merge
mergedNodesPairthe index of the deleted node is stored in the second position
elementIndexIsRemappedindicates whether the operation has been recorded before element indices have been remapped, e.g. before elements are deleted (defaults to false)

Definition at line 142 of file VertexMeshOperationRecorder.cpp.

References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), MutableElement< ELEMENT_DIM, SPACE_DIM >::GetLocalEdgeIndex(), and MutableElement< ELEMENT_DIM, SPACE_DIM >::GetNumEdges().

◆ RecordT1Swap()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordT1Swap ( T1SwapInfo< SPACE_DIM > &  rSwapInfo)

Record T1 swap info.

Parameters
rSwapInfoinformation about a T1 swap

Definition at line 58 of file VertexMeshOperationRecorder.cpp.

◆ RecordT2Swap()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordT2Swap ( T2SwapInfo< SPACE_DIM > &  rSwapInfo)

Record T2 swap info.

Parameters
rSwapInfoinformation about a T2 swap

Definition at line 76 of file VertexMeshOperationRecorder.cpp.

◆ RecordT3Swap()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::RecordT3Swap ( T3SwapInfo< SPACE_DIM > &  rSwapInfo)

Record T3 swap info.

Parameters
rSwapInfoinformation about a T3 swap

Definition at line 94 of file VertexMeshOperationRecorder.cpp.

◆ serialize()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

◆ SetEdgeHelper()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::SetEdgeHelper ( EdgeHelper< SPACE_DIM > *  pEdgeHelper)

Sets edge helper associated with the vertex mesh.

Parameters
pEdgeHelperpointer to an edge helper

Definition at line 52 of file VertexMeshOperationRecorder.cpp.

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 68 of file VertexMeshOperationRecorder.hpp.

Member Data Documentation

◆ mCellDivisions

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<CellDivisionInfo<SPACE_DIM> > VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::mCellDivisions
private

Storage for cell division info.

Definition at line 96 of file VertexMeshOperationRecorder.hpp.

Referenced by VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::serialize().

◆ mEdgeOperations

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<EdgeOperation> VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::mEdgeOperations
private

Stores all mesh operations.

Definition at line 99 of file VertexMeshOperationRecorder.hpp.

Referenced by VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::serialize().

◆ mpEdgeHelper

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
EdgeHelper<SPACE_DIM>* VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::mpEdgeHelper
private

Pointer to edge handler.

Definition at line 104 of file VertexMeshOperationRecorder.hpp.

◆ mT1Swaps

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<T1SwapInfo<SPACE_DIM> > VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::mT1Swaps
private

Storage for T1 swap info.

Definition at line 87 of file VertexMeshOperationRecorder.hpp.

Referenced by VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::serialize().

◆ mT2Swaps

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<T2SwapInfo<SPACE_DIM> > VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::mT2Swaps
private

Storage for T2 swap info.

Definition at line 90 of file VertexMeshOperationRecorder.hpp.

Referenced by VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::serialize().

◆ mT3Swaps

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<T3SwapInfo<SPACE_DIM> > VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::mT3Swaps
private

Storage for T3 swap info.

Definition at line 93 of file VertexMeshOperationRecorder.hpp.

Referenced by VertexMeshOperationRecorder< ELEMENT_DIM, SPACE_DIM >::serialize().


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