VTK-m  2.0
Public Member Functions | Public Attributes | Private Attributes | List of all members
vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType > Class Template Reference

Graft the InteriorForest (i.e., the residue of a BRACT) onto a hierarchical tree. More...

#include <TreeGrafter.h>

Public Member Functions

 TreeGrafter (MeshType *mesh, vtkm::worklet::contourtree_augmented::ContourTree &contourTree, vtkm::worklet::contourtree_distributed::InteriorForest *interiorForest)
 constructor More...
 
template<typename StorageTag >
void GraftInteriorForests (vtkm::Id theRound, vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &hierarchicalTree, const vtkm::cont::ArrayHandle< FieldType, StorageTag > &meshDataValues, const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler *localToGlobalIdRelabeler=nullptr)
 routine to graft the InteriorForest residue from the BoundaryTree computation into the tree. More...
 
template<typename StorageTag >
void GetHierarchicalIds (vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &hierarchicalTree, const vtkm::cont::ArrayHandle< FieldType, StorageTag > &meshDataValues, const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler *localToGlobalIdRelabeler=nullptr)
 Routine to convert supernode IDs from global to IDs in the existing hierarchical tree. More...
 
void InitializeActiveSuperarcs ()
 sets up an active superarc set More...
 
void FindCriticalPoints ()
 find the critical points in what's left More...
 
void CollapseRegularChains ()
 pointer-double to collapse chains More...
 
void IdentifyLeafHyperarcs ()
 routine to identify one iteration worth of leaves More...
 
void CompressActiveArrays ()
 
void ListNewHypernodes (vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &hierarchicalTree)
 Makes a list of new hypernodes, and maps their old IDs to their new ones. More...
 
void ListNewSupernodes (vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &hierarchicalTree)
 Makes a list of new supernodes, and maps their old IDs to their new ones. More...
 
void ListNewNodes (vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &hierarchicalTree, const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler *localToGlobalIdRelabeler=nullptr)
 Makes a list of new nodes, and maps their old IDs to their new ones. More...
 
void CopyNewHypernodes (vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &hierarchicalTree)
 Copies in the hypernodes, now that we have correct super IDs. More...
 
void CopyNewSupernodes (vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &hierarchicalTree, vtkm::Id theRound)
 Copies in the supernodes, now that we have correct regular IDs. More...
 
template<typename StorageTag >
void CopyNewNodes (vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &hierarchicalTree, const vtkm::cont::ArrayHandle< FieldType, StorageTag > &meshDataValues, const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler *localToGlobalIdRelabeler=nullptr)
 Copies the regular nodes in, setting all arrays except superparents Must be called LAST since it depends on the hypernodes & supernodes that have just been added in order to resolve the superparents. More...
 
void CopyIterationDetails (vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &hierarchicalTree, vtkm::Id theRound)
 Transfers the details of nodes used in each iteration. More...
 
std::string DebugPrint (const char *message, const char *fileName, long lineNum)
 prints the contents of the object in a standard format More...
 

Public Attributes

MeshType * Mesh
 
vtkm::worklet::contourtree_augmented::ContourTreeContourTree
 
vtkm::worklet::contourtree_distributed::InteriorForestInteriorForest
 
vtkm::worklet::contourtree_augmented::IdArrayType HierarchicalTreeId
 
vtkm::worklet::contourtree_augmented::IdArrayType SupernodeType
 
vtkm::worklet::contourtree_augmented::IdArrayType NewSupernodeId
 
vtkm::worklet::contourtree_augmented::IdArrayType HierarchicalRegularId
 
vtkm::worklet::contourtree_augmented::IdArrayType HierarchicalSuperId
 
vtkm::worklet::contourtree_augmented::IdArrayType HierarchicalSuperparent
 
vtkm::worklet::contourtree_augmented::IdArrayType HierarchicalHyperId
 
vtkm::worklet::contourtree_augmented::IdArrayType HierarchicalHyperparent
 
vtkm::worklet::contourtree_augmented::IdArrayType HierarchicalHyperarc
 
vtkm::worklet::contourtree_augmented::IdArrayType WhenTransferred
 
vtkm::worklet::contourtree_augmented::IdArrayType UpNeighbour
 
vtkm::worklet::contourtree_augmented::IdArrayType DownNeighbour
 
vtkm::worklet::contourtree_augmented::EdgePairArray ActiveSuperarcs
 
vtkm::worklet::contourtree_augmented::IdArrayType NewNodes
 
vtkm::worklet::contourtree_augmented::IdArrayType NewSupernodes
 
vtkm::worklet::contourtree_augmented::IdArrayType NewHypernodes
 
vtkm::Id NumTransferIterations
 

Private Attributes

vtkm::cont::Invoker Invoke
 Used internally to Invoke worklets. More...
 

Detailed Description

template<typename MeshType, typename FieldType>
class vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >

Graft the InteriorForest (i.e., the residue of a BRACT) onto a hierarchical tree.

Constructor & Destructor Documentation

◆ TreeGrafter()

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::TreeGrafter ( MeshType *  mesh,
vtkm::worklet::contourtree_augmented::ContourTree contourTree,
vtkm::worklet::contourtree_distributed::InteriorForest interiorForest 
)
inline

constructor

Member Function Documentation

◆ CollapseRegularChains()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::CollapseRegularChains

pointer-double to collapse chains

Side effects. This function updates:

  • this->UpNeighbour
  • this->DownNeighbour

◆ CompressActiveArrays()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::CompressActiveArrays
  1. Compress arrays & repeat
  1. Compress arrays & repeat

Side effects. This function updates:

  • this->ActiveSuperarcs

◆ CopyIterationDetails()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::CopyIterationDetails ( vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &  hierarchicalTree,
vtkm::Id  theRound 
)

Transfers the details of nodes used in each iteration.

Side effects. This function updates:

  • hierarchicalTree.NumRegularNodesInRound
  • hierarchicalTree.NumSupernodesInRound
  • hierarchicalTree.NumHypernodesInRound
  • hierarchicalTree.NumIterations
  • hierarchicalTree.FirstSupernodePerIteration[static_cast<std::size_t>(theRound)]
  • hierarchicalTree.FirstHypernodePerIteration[static_cast<std::size_t>(theRound)]

◆ CopyNewHypernodes()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::CopyNewHypernodes ( vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &  hierarchicalTree)

Copies in the hypernodes, now that we have correct super IDs.

Copies in the hypernodes, now that we have correct super IDs Side effe cts.

This function updates:

  • hierarchicalTree.Hypernodes
  • hierarchicalTree.Hyperarcs
  • hierarchicalTree.Superchildren

◆ CopyNewNodes()

template<typename MeshType , typename FieldType >
template<typename StorageTag >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::CopyNewNodes ( vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &  hierarchicalTree,
const vtkm::cont::ArrayHandle< FieldType, StorageTag > &  meshDataValues,
const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler localToGlobalIdRelabeler = nullptr 
)

Copies the regular nodes in, setting all arrays except superparents Must be called LAST since it depends on the hypernodes & supernodes that have just been added in order to resolve the superparents.

Parameters
[in]hierarchicalTreeReference to the hierarchical tree
[in]meshDataValuesData values associated with the mesh. This is mesh.SortedValues in the case of a ContourTreeMesh and the original data values in the case of a Mesh_DEM_Triangulation mesh.
[in]localToGlobalIdRelabelerIdRelabeler for the mesh needed to call this->Mesh->GetGlobalIdsFromMeshIndices(...) and this->Mesh->GetGlobalIdsFroSortIndices(...) If this->Mesh is a ContourTreeMesh then the IdRelabeler is not needed and we can simply set it to a nullptr.

Side effects. This function updates:

  • hierarchicalTree.RegularNodeGlobalIds
  • hierarchicalTree.DataValues
  • hierarchicalTree.RegularNodeSortOrder
  • hierarchicalTree.Regular2Supernode
  • hierarchicalTree.Superparents

◆ CopyNewSupernodes()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::CopyNewSupernodes ( vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &  hierarchicalTree,
vtkm::Id  theRound 
)

Copies in the supernodes, now that we have correct regular IDs.

Copies in the supernodes, now that we have correct regular IDs Side effe cts.

This function updates:

  • hierarchicalTree.Supernodes
  • hierarchicalTree.Superarcs
  • hierarchicalTree.Hyperparents
  • hierarchicalTree.Superparents
  • hierarchicalTree.Super2Hypernode
  • hierarchicalTree.WhichRound
  • hierarchicalTree.WhichIteration
  • this->HierarchicalRegularId
  • hierarchicalTree.Superchildren

◆ DebugPrint()

template<typename MeshType , typename FieldType >
std::string vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::DebugPrint ( const char *  message,
const char *  fileName,
long  lineNum 
)
inline

prints the contents of the object in a standard format

◆ FindCriticalPoints()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::FindCriticalPoints

find the critical points in what's left

Side effects. This function updates:

  • this->UpNeighbour
  • this->DownNeighbour
  • this->SupernodeType

◆ GetHierarchicalIds()

template<typename MeshType , typename FieldType >
template<typename StorageTag >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::GetHierarchicalIds ( vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &  hierarchicalTree,
const vtkm::cont::ArrayHandle< FieldType, StorageTag > &  meshDataValues,
const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler localToGlobalIdRelabeler = nullptr 
)

Routine to convert supernode IDs from global to IDs in the existing hierarchical tree.

routine to convert supernode IDs from global to IDs in the existing hierarchical tree Side effects: This function updates:

Parameters
[in]hierarchicalTreeReference to the hierarchical tree
[in]meshDataValuesData values associated with the mesh. This is mesh.SortedValues in the case of a ContourTreeMesh and the original data values in the case of a Mesh_DEM_Triangulation mesh.
[in]localToGlobalIdRelabelerIdRelabeler for the mesh needed to call this->Mesh->GetGlobalIdsFromMeshIndices(...) and this->Mesh->GetGlobalIdsFroSortIndices(...) If this->Mesh is a ContourTreeMesh then the IdRelabeler is not needed and we can simply set it to a nullptr.
  • this->HierarchicalRegularId
  • this->HierarchicalSuperId
  • this->HierarchicalSuperparent
  • this->HierarchicalHyperparent
  • this->HierarchicalHyperId

◆ GraftInteriorForests()

template<typename MeshType , typename FieldType >
template<typename StorageTag >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::GraftInteriorForests ( vtkm::Id  theRound,
vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &  hierarchicalTree,
const vtkm::cont::ArrayHandle< FieldType, StorageTag > &  meshDataValues,
const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler localToGlobalIdRelabeler = nullptr 
)

routine to graft the InteriorForest residue from the BoundaryTree computation into the tree.

Previously called GraftResidue

Parameters
[in]theRoundThe reducting round we are in
[in]hierarchicalTreeReference to the hierarchical tree
[in]meshDataValuesData values associated with the mesh. This is mesh.SortedValues in the case of a ContourTreeMesh and the original data values in the case of a Mesh_DEM_Triangulation mesh. Needed for GetHierarchicalIds.
[in]localToGlobalIdRelabelerIdRelabeler for the mesh needed to call this->Mesh->GetGlobalIdsFromMeshIndices(...) and this->Mesh->GetGlobalIdsFroSortIndices(...) If this->Mesh is a ContourTreeMesh then the IdRelabeler is not needed and we can simply set it to a nullptr. Needed for GetHierarchicalIds. (default=nullptr).

◆ IdentifyLeafHyperarcs()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::IdentifyLeafHyperarcs

routine to identify one iteration worth of leaves

Side effects. This function updates:

  • this->WhenTransferred
  • this->HierarchicalHyperarc
  • this->HierarchicalHyperparent

◆ InitializeActiveSuperarcs()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::InitializeActiveSuperarcs

sets up an active superarc set

sets up an active superarc set Side effects.

This function updates:

  • this->UpNeighbour
  • this->DownNeighbour
  • this->ActiveSuperarcs
  • this->WhenTransferred
  • this->SupernodeType
  • this->HierarchicalHyperarc

◆ ListNewHypernodes()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::ListNewHypernodes ( vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &  hierarchicalTree)

Makes a list of new hypernodes, and maps their old IDs to their new ones.

Makes a list of new hypernodes, and maps their old IDs to their new ones Side effects.

This function updates:

  • this->NewHypernodes
  • this->HierarchicalHyperId

◆ ListNewNodes()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::ListNewNodes ( vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &  hierarchicalTree,
const vtkm::worklet::contourtree_augmented::mesh_dem::IdRelabeler localToGlobalIdRelabeler = nullptr 
)

Makes a list of new nodes, and maps their old IDs to their new ones.

Makes a list of new nodes, and maps their old IDs to their new ones Side effe cts.

Parameters
[in]hierarchicalTreeReference to the hierarchical tree
[in]localToGlobalIdRelabelerIdRelabeler for the mesh needed to call this->Mesh->GetGlobalIdsFromMeshIndices(...) and this->Mesh->GetGlobalIdsFroSortIndices(...) If this->Mesh is a ContourTreeMesh then the IdRelabeler is not needed and we can simply set it to a nullptr.

This function updates:

  • this->HierarchicalTreeId
  • this->NewNodes

◆ ListNewSupernodes()

template<typename MeshType , typename FieldType >
void vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::ListNewSupernodes ( vtkm::worklet::contourtree_distributed::HierarchicalContourTree< FieldType > &  hierarchicalTree)

Makes a list of new supernodes, and maps their old IDs to their new ones.

Makes a list of new supernodes, and maps their old IDs to their new ones Side effects.

This function updates:

  • this->NewSupernodes
  • this->HierarchicalSuperID

Member Data Documentation

◆ ActiveSuperarcs

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::EdgePairArray vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::ActiveSuperarcs

◆ ContourTree

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::ContourTree& vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::ContourTree

◆ DownNeighbour

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::DownNeighbour

◆ HierarchicalHyperarc

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::HierarchicalHyperarc

◆ HierarchicalHyperId

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::HierarchicalHyperId

◆ HierarchicalHyperparent

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::HierarchicalHyperparent

◆ HierarchicalRegularId

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::HierarchicalRegularId

◆ HierarchicalSuperId

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::HierarchicalSuperId

◆ HierarchicalSuperparent

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::HierarchicalSuperparent

◆ HierarchicalTreeId

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::HierarchicalTreeId

◆ InteriorForest

◆ Invoke

template<typename MeshType , typename FieldType >
vtkm::cont::Invoker vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::Invoke
private

Used internally to Invoke worklets.

◆ Mesh

template<typename MeshType , typename FieldType >
MeshType* vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::Mesh

◆ NewHypernodes

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::NewHypernodes

◆ NewNodes

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::NewNodes

◆ NewSupernodeId

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::NewSupernodeId

◆ NewSupernodes

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::NewSupernodes

◆ NumTransferIterations

template<typename MeshType , typename FieldType >
vtkm::Id vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::NumTransferIterations

◆ SupernodeType

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::SupernodeType

◆ UpNeighbour

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::UpNeighbour

◆ WhenTransferred

template<typename MeshType , typename FieldType >
vtkm::worklet::contourtree_augmented::IdArrayType vtkm::worklet::contourtree_distributed::TreeGrafter< MeshType, FieldType >::WhenTransferred

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