Go to the documentation of this file.
53 #ifndef vtk_m_worklet_ContourTreeUniformAugmented_h
54 #define vtk_m_worklet_ContourTreeUniformAugmented_h
123 template <
typename FieldType,
124 typename StorageType,
126 typename MeshBoundaryMeshExecType>
132 unsigned int computeRegularStructure,
133 const MeshBoundaryMeshExecType& meshBoundary)
141 computeRegularStructure,
168 template <
typename FieldType,
typename StorageType>
174 bool useMarchingCubes =
false,
175 unsigned int computeRegularStructure = 1)
179 if (meshSize[2] == 1)
189 computeRegularStructure,
190 mesh.GetMeshBoundaryExecutionObject());
194 else if (useMarchingCubes)
204 computeRegularStructure,
219 computeRegularStructure,
249 template <
typename FieldType,
250 typename StorageType,
252 typename MeshBoundaryClass>
258 unsigned int computeRegularStructure,
259 const MeshBoundaryClass& meshBoundary)
270 std::stringstream timingsStream;
273 mesh.SortData(fieldArray);
274 timingsStream <<
" " << std::setw(38) << std::left <<
"Sort Data"
282 timingsStream <<
" " << std::setw(38) << std::left <<
"Join Tree Regular Chains"
287 MergeTree joinTree(mesh.NumVertices,
true);
290 timingsStream <<
" " << std::setw(38) << std::left <<
"Join Tree Initialize Active Graph"
294 joinGraph.
DebugPrint(
"Active Graph Instantiated", __FILE__, __LINE__);
300 timingsStream <<
" " << std::setw(38) << std::left <<
"Join Tree Compute"
303 joinTree.
DebugPrint(
"Join tree Computed", __FILE__, __LINE__);
311 timingsStream <<
" " << std::setw(38) << std::left <<
"Split Tree Regular Chains"
316 MergeTree splitTree(mesh.NumVertices,
false);
319 timingsStream <<
" " << std::setw(38) << std::left <<
"Split Tree Initialize Active Graph"
322 splitGraph.
DebugPrint(
"Active Graph Instantiated", __FILE__, __LINE__);
328 timingsStream <<
" " << std::setw(38) << std::left <<
"Split Tree Compute"
331 splitTree.
DebugPrint(
"Split tree Computed", __FILE__, __LINE__);
339 contourTree.
Init(mesh.NumVertices);
343 timingsStream <<
" " << std::setw(38) << std::left
344 <<
"Contour Tree Hyper and Super Structure"
349 if (computeRegularStructure == 1)
352 timingsStream <<
" " << std::setw(38) << std::left <<
"Contour Tree Regular Structure"
355 else if (computeRegularStructure == 2)
358 timingsStream <<
" " << std::setw(38) << std::left
359 <<
"Contour Tree Boundary Regular Structure"
376 this->TimingsLogString = timingsStream.str();
381 <<
" ------------------- Contour Tree Worklet Timings ----------------------"
383 << this->TimingsLogString);
391 #endif // vtk_m_worklet_ContourTreeUniformAugmented_h
Manages an array-worth of data.
Definition: ArrayHandle.h:283
std::string TimingsLogString
Remember the results from our time-keeping so we can customize our logging.
Definition: worklet/ContourTreeUniformAugmented.h:100
VTKM_CONT void BuildRegularChains(bool isMaximal)
Definition: MeshExtrema.h:129
Groups connected points that have the same field value.
Definition: Atomic.h:19
Definition: augmented/ContourTree.h:106
Class representing a 2D dataset mesh with freudenthal triangulation connectivity for contour tree com...
Definition: DataSetMeshTriangulation2DFreudenthal.h:73
LogLevel
Log levels for use with the logging macros.
Definition: Logging.h:298
void SetStarts(MeshType &mesh, bool isMaximal)
Definition: MeshExtrema.h:151
void DebugPrintTree(const char *message, const char *fileName, long lineNum, const ContourTreeMesh< FieldType > &mesh)
Definition: augmented/MergeTree.h:203
Definition: BuildChainsWorklet.h:63
Definition: MeshExtrema.h:79
static VTKM_CONT bool Copy(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::cont::ArrayHandle< U, COut > &output)
Definition: Algorithm.h:410
void Init(vtkm::Id dataSize)
Definition: augmented/ContourTree.h:196
void ComputeHyperAndSuperStructure()
Definition: ContourTreeMaker.h:193
void DebugPrint(const char *message, const char *fileName, long lineNum)
Definition: ActiveGraph.h:917
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
void ComputeBoundaryRegularStructure(MeshExtrema &meshExtrema, const Mesh &mesh, const MeshBoundaryExecObj &meshBoundary)
Definition: ContourTreeMaker.h:525
vtkm::Id NumIterations
Definition: augmented/ContourTree.h:153
vtkm::cont::LogLevel TimingsLogLevel
Definition: worklet/ContourTreeUniformAugmented.h:97
void DebugPrint(const char *message, const char *fileName, long lineNum)
Definition: augmented/MergeTree.h:168
void ComputeRegularStructure(MeshExtrema &meshExtrema)
Definition: ContourTreeMaker.h:455
Definition: ContourTreeMaker.h:117
ContourTree & ContourTreeResult
Definition: ContourTreeMaker.h:123
Definition: DataSetMeshTriangulation3DFreudenthal.h:73
A class that can be used to time operations in VTK-m that might be occuring in parallel.
Definition: Timer.h:43
Compute the contour tree for 2d and 3d uniform grids and arbitrary topology graphs.
Definition: worklet/ContourTreeUniformAugmented.h:89
#define VTKM_LOG_S(level,...)
Writes a message using stream syntax to the indicated log level.
Definition: Logging.h:261
Definition: augmented/MergeTree.h:77
@ Off
Used with SetStderrLogLevel to silence the log.
Definition: DataSetMeshTriangulation3DMarchingCubes.h:72
void Run(const vtkm::cont::ArrayHandle< FieldType, StorageType > fieldArray, contourtree_augmented::ContourTree &contourTree, contourtree_augmented::IdArrayType &sortOrder, vtkm::Id &nIterations, const vtkm::Id3 meshSize, bool useMarchingCubes=false, unsigned int computeRegularStructure=1)
Definition: worklet/ContourTreeUniformAugmented.h:169
MeshBoundary3DExec GetMeshBoundaryExecutionObject() const
Definition: DataSetMeshTriangulation3DMarchingCubes.h:183
MeshBoundary3DExec GetMeshBoundaryExecutionObject() const
Definition: DataSetMeshTriangulation3DFreudenthal.h:151
void Run(const vtkm::cont::ArrayHandle< FieldType, StorageType > fieldArray, MeshType &mesh, contourtree_augmented::ContourTree &contourTree, contourtree_augmented::IdArrayType &sortOrder, vtkm::Id &nIterations, unsigned int computeRegularStructure, const MeshBoundaryMeshExecType &meshBoundary)
Definition: worklet/ContourTreeUniformAugmented.h:127
void Initialise(Mesh &mesh, const MeshExtrema &meshExtrema)
Definition: ActiveGraph.h:244
Definition: ActiveGraph.h:116
void MakeMergeTree(MergeTree &tree, MeshExtrema &meshExtrema)
Definition: ActiveGraph.h:376
VTKM_CONT vtkm::Float64 GetElapsedTime() const
Get the elapsed time measured by the given device adapter.
void RunContourTree(const vtkm::cont::ArrayHandle< FieldType, StorageType > fieldArray, contourtree_augmented::ContourTree &contourTree, contourtree_augmented::IdArrayType &sortOrder, vtkm::Id &nIterations, MeshClass &mesh, unsigned int computeRegularStructure, const MeshBoundaryClass &meshBoundary)
Definition: worklet/ContourTreeUniformAugmented.h:253
@ Perf
General timing data and algorithm flow information, such as filter execution, worklet dispatches,...