CHLNDDEV / OceanMesh2D

A two-dimensional triangular mesh generator with pre- and post-processing utilities written in pure MATLAB (no toolboxes required) designed specifically to build models that solve shallow-water equations or wave equations in a coastal environment (ADCIRC, FVCOM, WaveWatch3, SWAN, SCHISM, Telemac, etc.).
https://github.com/sponsors/krober10nd
GNU General Public License v3.0
179 stars 65 forks source link

More robust mesh generation #234

Closed krober10nd closed 3 years ago

krober10nd commented 3 years ago
WPringle commented 3 years ago

Couple of thoughts:

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 commented 3 years ago

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

WPringle commented 3 years ago

Did any of examples trigger the rewind?

krober10nd commented 3 years ago

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.