Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK-m
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
VTK
VTK-m
Commits
48d91b99
Commit
48d91b99
authored
4 years ago
by
Oliver Ruebel
Browse files
Options
Downloads
Patches
Plain Diff
Throw exception if merge tree gets stuck in a loop
parent
c7ea03ee
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!2615
Draft: DONTMERGE ME: TEST FOR 1.7.0-rc1 is our 9th official release of VTK-m.
,
!2420
Add/ct iter check
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vtkm/worklet/contourtree_augmented/ActiveGraph.h
+10
-0
10 additions, 0 deletions
vtkm/worklet/contourtree_augmented/ActiveGraph.h
with
10 additions
and
0 deletions
vtkm/worklet/contourtree_augmented/ActiveGraph.h
+
10
−
0
View file @
48d91b99
...
...
@@ -377,6 +377,7 @@ inline void ActiveGraph::MakeMergeTree(MergeTree& tree, MeshExtrema& meshExtrema
DebugPrint
(
"Active Graph Computation Starting"
,
__FILE__
,
__LINE__
);
// loop until we run out of active edges
vtkm
::
Id
maxNumIterations
=
this
->
EdgeSorter
.
GetNumberOfValues
();
this
->
NumIterations
=
0
;
while
(
true
)
{
// main loop
...
...
@@ -385,7 +386,16 @@ inline void ActiveGraph::MakeMergeTree(MergeTree& tree, MeshExtrema& meshExtrema
// test whether there are any left (if not, we're on the trunk)
if
(
this
->
EdgeSorter
.
GetNumberOfValues
()
<=
0
)
{
break
;
}
// test whether we are in a bad infinite loop due to bad input data. Usually
// this is not an issue for the merge tree (only for the contour tree), but
// we check just to make absolutely sure we won't get stuck in an infinite loop
if
(
this
->
NumIterations
>=
maxNumIterations
)
{
throw
new
std
::
domain_error
(
"Bad iteration. Merge tree unable to process all edges."
);
}
// find & label the extrema with their governing saddles
FindGoverningSaddles
();
...
...
This diff is collapsed.
Click to expand it.
Gunther Weber
@ghweber
mentioned in commit
fa0ce37b
·
3 years ago
mentioned in commit
fa0ce37b
mentioned in commit fa0ce37b96a71e9592d465603aad6b851b76ee18
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment