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 intuitive deactivation of `msh.clean()` options #180

Closed krober10nd closed 3 years ago

krober10nd commented 3 years ago
m = clean(m,'con',5);

which is a bit not obvious. Perhaps this should be 0 to deactivate or your write the word "off"?

The reason I bring this up is if you want to transfer nodal attributes between a non-clean and clean mesh, the valency reducer will get in the way and the prompt will say that "if you run with nodal valency reducer, all nodal attributes will be lost".

Perhaps in this prompt, we should suggest how to turn it off as well.

WPringle commented 3 years ago

First thing to say is that you can use 0 and I always use that.

But I agree that prompt is incredibly annoying. Here are my suggested changes:

  1. Change 'passive' option to turn this con to 0 by default.
  2. Instead of the prompt we should just put in a warning, and then try to map all the attributes over using nearest neighbor (map_mesh_properties should be able to handle this) even though it won't be perfect since new nodes are added etc.