Open
Conversation
Mostly indentation changes, but also minor cleanup in handling of init() method.
With iFOD1, the second half of a bidirectional streamline starts in the opposite direction from the first half. The seed direction is determined first, and then used as the initial direction of tracking for both halves. But the actual direction of the first step is taken as a random sample within the angular constraint about that seed direction, and because this happens both ways, and with the same seed direction, it is possible for the angle between the two line segments either side of the seed point to be up to twice the max angle. The solution here involves setting the initial direction of tracking for the second half of the streamline to the (opposite of the) *actual* direction of the first step of the first half, rather than the seed direction initially determined. This ensures that the first step of the second half of the streamline is taken within the max angle constraint of what is effectively the incoming direction of tracking. To achieve this, the reverse_track() method was extended to perform the actual track reversal and set the position and initial direction of tracking, and overridden in the iFOD1 method to set things appropriately.
5237d46 to
1162afe
Compare
70031c3 to
6bf4cec
Compare
1162afe to
5237d46
Compare
Member
|
As a bug fix this should be rebased onto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just got a report that when using iFOD1, the angle between track segments can be up to twice the stated max angle at the seed point. This was due to an interaction between iFOD1 and the way the track reversal is handled, which this PR hopefully fixes. More detail in commit 5237d46.
Note that I don't think this affects iFOD2 or other algorithms, though it would be worth double-checking, maybe by adding some tests to verify correct behaviour.