Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust mesh generation #234

Merged
merged 9 commits into from
Jul 28, 2021
Merged

More robust mesh generation #234

merged 9 commits into from
Jul 28, 2021

Conversation

krober10nd
Copy link
Collaborator

  • This PR slightly modifies the logic inside the mesh generator with the hope to make it more robust.
  • If the mean mesh quality decreases more than 10% between consecutive mesh generation iterations, then the generator will use the previous points from the past iteration with the higher quality and then skip the current iteration; essentially trying again.
  • If this situation happens, then in addition to the above logic, the frequency of mesh improvement cycles will delay by 10 iterations in order too give the mesh generator more time to stabilize.

@WPringle
Copy link
Collaborator

WPringle commented Jun 27, 2021

Couple of thoughts:

  • What if, although unlikely, the quality decreases by 10% due to a standard iteration without mesh improvements? Then will just iterate forever.
  • In the current logic it seems to increase the improvement imp by 10 iterations once this decrease in quality is triggered, which would then also apply to al mesh improvement cycles thereafter as well right? (i.e., stay at imp = 20)

Based on these thoughts why don't we just assess the change in quality after a "mesh improvement" plus one standard iteration? Then if the quality was 10% worse than before the mesh improvement just go back to that iteration, skipping the "mesh improvement". One implementation idea would be to make an array of iteration counts where we do "mesh improvements" before the iteration loop: so imp_array = [imp:imp:max_it]; which we just do a logical test to see if the current iteration is in imp_array. Then if we find that the current "mesh improvement" cycle iteration is "bad" then remove that integer from the imp_array.

@krober10nd
Copy link
Collaborator Author

I think it makes sense to check only after a mesh improvement step since that’s when the issue occurs primarily. The drop outs in quality in some recent cases were pretty severe so maybe we could increase the threshold test to a higher value.

I don’t have a case that fails to test it unfortunately yet

@krober10nd krober10nd requested a review from WPringle July 28, 2021 00:34
Copy link
Collaborator

@WPringle WPringle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the test suite they ran fine. The changes do not affect the tests (rewind never triggered) so hopefully this change will only affect things in cases where it should.

@WPringle
Copy link
Collaborator

Did any of examples trigger the rewind?

@krober10nd
Copy link
Collaborator Author

No, none of the examples triggered it but I tested the rewind in some of them by removing the logic used to trigger it. It worked in Christopher Goody's example when the initial point set was distant in density from the edgefx field.

@krober10nd krober10nd merged commit f6bc0cc into Projection Jul 28, 2021
@krober10nd krober10nd deleted the rewind branch July 28, 2021 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants