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
c7ea03ee
Commit
c7ea03ee
authored
4 years ago
by
Oliver Ruebel
Browse files
Options
Downloads
Patches
Plain Diff
Throw exception if contour tree gets stuck in a loop
parent
21eac99c
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/ContourTreeMaker.h
+10
-0
10 additions, 0 deletions
vtkm/worklet/contourtree_augmented/ContourTreeMaker.h
with
10 additions
and
0 deletions
vtkm/worklet/contourtree_augmented/ContourTreeMaker.h
+
10
−
0
View file @
c7ea03ee
...
...
@@ -201,6 +201,7 @@ inline void ContourTreeMaker::ComputeHyperAndSuperStructure()
// tree can end with either 0 or 1 vertices unprocessed
// 0 means the last edge was pruned from both ends
// 1 means that there were two final edges meeting at a vertex
vtkm
::
Id
maxNumIterations
=
this
->
ActiveSupernodes
.
GetNumberOfValues
();
while
(
this
->
ActiveSupernodes
.
GetNumberOfValues
()
>
1
)
{
// loop until no active vertices remaining
// recompute the vertex degrees
...
...
@@ -218,6 +219,15 @@ inline void ContourTreeMaker::ComputeHyperAndSuperStructure()
CompressActiveSupernodes
();
this
->
ContourTreeResult
.
NumIterations
++
;
// Check to make sure we are not iterating too long
// this can happen if we are given a bad mesh that defines
// a forest of contour trees, rather than a single tree.
// Raise error if we have done more itertions than there are active nodes to remove
if
(
this
->
ContourTreeResult
.
NumIterations
>=
maxNumIterations
)
{
throw
new
std
::
domain_error
(
"Bad iteration. This can happen if the input mesh "
"defines a contour forest rather than a simple tree."
);
}
}
// loop until no active vertices remaining
// test for final edges meeting
...
...
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