krober10nd / SeismicMesh

2D/3D serial and parallel triangular mesh generation tool for finite element methods.
https://seismicmesh.readthedocs.io/
GNU General Public License v3.0
126 stars 32 forks source link

Inconsistent use of HMIN #143

Closed jorgensd closed 3 years ago

jorgensd commented 3 years ago

As both your mesh generator, and and the build sizing function has hmin as an input argument, is there any way of making a check that the input argument into these two functions matches each other? Could you add hmin as a variable in the SizeFunction class, such that you do not need hmin as an input to generate mesh when supplying a SizingFunction?

krober10nd commented 3 years ago

You mean that the user can accidentally mispecify the hmin in generate_sizing_function_from_segy and h0 in the generate_mesh command. Yea, I've had that happen. Perhaps yes, it's best to have the SizingFunction class contain the minimum edge length in the domain. I'll work on that.

I'll keep h0 as a user-defined argument and this gets the last word so to speak on what the minimum edge length value will be if it's passed but if it isn't passed, it will get it from that class. This is to maintain backwards compatibility with scripts that people are already using here.

krober10nd commented 3 years ago

i've dealt with this in #144 and will be released with 3.1.4. Now the user just passes a domain and a SizeFunction, the hmin is pulled from the SizeFunction.

krober10nd commented 3 years ago

3.1.4 is released with this change. let me know if you're okay with my changes.

krober10nd commented 3 years ago

I'm going to go ahead and close this for now. The hmin will by default match the value passed to the sizing function so there's almost no chance of error anymore.