Fixed FloodFiller unit test and fixed grainGrowth bug #224
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.
Fixing the issue #219
Unit tests for FloodFiller and OrderParameterRemapper (which calls FloodFiller) were failing because of a modification that assigns the most common value of nodes to ele_val. The unit test has a grain with only one nodal value, so this wasn't being detected since the most common value would be null. I added a conditional that the most common value must be nonzero.
Because of the change to how ele_val was calculated, the threshold check for assigning vertices to grains also changed. Inconsistencies in grain vertex lists causes them to give rise to the "cracked" appearance described in the issue. The issue wasn't present in parallel because mergeSplitGrains() is called. To fix this issue for serial runs, I added a call to mergeSplitGrains() in the calcGrainSets function.