mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Add presimplfy threshold & dependent volume to HierarchicalAugmenter.Initalize
This commit is contained in:
parent
c0ecc04bb8
commit
941fd43ce0
@ -720,7 +720,7 @@ inline VTKM_CONT void ContourTreeUniformDistributed::ComputeVolumeMetric(
|
||||
hyperSweeper.LocalHyperSweep();
|
||||
|
||||
#ifdef DEBUG_PRINT
|
||||
VTKM_LOG_S(this->TreeLogLevel, "Block " << b->GlobalBlockId);
|
||||
VTKM_LOG_S(this->Tree LogLevel, "Block " << b->GlobalBlockId);
|
||||
VTKM_LOG_S(this->TreeLogLevel,
|
||||
b->HierarchicalContourTree.DebugPrint("After local hypersweep", __FILE__, __LINE__));
|
||||
#endif
|
||||
@ -1136,20 +1136,38 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute(
|
||||
<< ": " << timer.GetElapsedTime() << " seconds" << std::endl;
|
||||
timer.Start();
|
||||
|
||||
|
||||
// TODO: Compute the volume for pre-simplification
|
||||
vtkm::worklet::contourtree_augmented::IdArrayType* volumeArrayForPresimplifiction = NULL;
|
||||
if (this->PresimplifyThreshold > 0)
|
||||
{
|
||||
// TODO: Compute volume for the hierarchical tree before augmentation in order to allow for pre-simplification.
|
||||
// Set volumeArrayForPresimplifiction to the DependentVolume array to pass to HierarchicalAugmenter.Initialize.
|
||||
// It seems that :ComputeVolumeMetric(...) may alwasy use the augemented tree, but for here we need to
|
||||
// use the hierarchical tree before simplification
|
||||
|
||||
// NOTE: Below, we already pass this->PresimplifyThreshold and the volumeArrayForPresimplifiction with the
|
||||
// DependentVolume to HierarchicalAugmenter.Initialize. To do this we need to reorder the computation
|
||||
// of the volume to happen first if we presimplify and happen as is if we do not pre-presimplify
|
||||
}
|
||||
|
||||
// ******** 3. Augment the hierarchical tree if requested ********
|
||||
if (this->AugmentHierarchicalTree)
|
||||
{
|
||||
master.foreach ([globalPointDimensions](DistributedContourTreeBlockData* blockData,
|
||||
const vtkmdiy::Master::ProxyWithLink&) {
|
||||
// TODO: Pass this->PresimplifyThreshold and DependentVolume array to HierarchicalAugmenter.Initialize if
|
||||
// we want to presimplify the tree, i.e., if this->PresimplifyThreshold > 0
|
||||
vtkm::Id localPresimplifyThreshold = this->PresimplifyThreshold;
|
||||
master.foreach ([globalPointDimensions,
|
||||
localPresimplifyThreshold,
|
||||
volumeArrayForPresimplifiction](DistributedContourTreeBlockData* blockData,
|
||||
const vtkmdiy::Master::ProxyWithLink&) {
|
||||
blockData->HierarchicalAugmenter.Initialize(
|
||||
blockData->GlobalBlockId,
|
||||
&blockData->HierarchicalTree,
|
||||
&blockData->AugmentedTree,
|
||||
blockData->BlockOrigin, // Origin of the data block
|
||||
blockData->BlockSize, // Extends of the data block
|
||||
globalPointDimensions // global point dimensions
|
||||
globalPointDimensions, // global point dimensions
|
||||
volumeArrayForPresimplifiction, // DependentVolume if we computed it or NULL if no presimplification is used
|
||||
localPresimplifyThreshold // presimplify if threshold is > 0
|
||||
);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user