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.
Purpose
This fixes the zipper mesh segfault issue first reported by @awccopp.
When creating the zipper mesh, indexing out of bounds can occur when the number of closest points we are searching for is greater than the total number of points on a string. Capping the initial
nSearch
in thestringMatch
routine solves the issue.The current initial value for
nSearch
is 50, which explains why the problem only appears on small meshes like @awccopp's airfoil cases. I added a test with a simple overset cube mesh that can reproduce the error.Expected time until merged
Regular urgency; one week
Type of change
Testing
Run test_zipper.py without compiling the fix. The result will be a segfault (or 'index outside of expected range' if compiled with a bounds check flag).
Run the test again after recompiling. The test should now pass.
Checklist
flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted