lanl / LaGriT

Los Alamos Grid Toolbox (LaGriT) is a library of user callable tools that provide mesh generation, mesh optimization and dynamic mesh maintenance in two and three dimensions.
https://lanl.github.io/LaGriT/
Other
116 stars 48 forks source link

add argument to set the exponent for delineation #150

Closed zgxn closed 5 years ago

zgxn commented 5 years ago

Although the argument exponent is defined in watershed_delineation-method watershedDelineation, the calling method in dem_class (watershed_delineation) did not have this argument, so the user could not set an exponent at the top level. This caused delineation methods such as Holmgren and Freeman to fail.

This commit gives an exponent argument to dem_class-method watershed_delineation and sets this exponent as input to watershed_delineation-method watershedDelineation.

The interactive part still does not get exponent as an argument.

fixes #149

daniellivingston commented 5 years ago

Thank you! I'll approve this. One thing - if the method is not Holmgren or Freeman, should we put out a warning to the user?

For example -

if method not in ['Holmgren','Freeman']:
    cfg.log.warn('Ignoring exponent: exponent is only valid for Holmgren/Freeman methods')
zgxn commented 5 years ago

Hi Daniel, yes, that's a good idea.

On Mon, Apr 8, 2019 at 10:20 AM Daniel Livingston notifications@github.com wrote:

Thank you! I'll approve this. One thing - if the method is not Holmgren or Freeman, should we put out a warning to the user?

For example -

if method is not in valid_methods: cfg.log.warn('Ignoring exponent: exponent is only valid for Holmgren/Freeman methods')

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lanl/LaGriT/pull/150#issuecomment-480923915, or mute the thread https://github.com/notifications/unsubscribe-auth/AqajgRpfU72q5WrcAW9Sp38jNhfoMhPyks5ve3pwgaJpZM4cioo3 .

-- Ilhan Özgen Xian, PhD EESA, Lawrence Berkeley National Laboratory https://eesa.lbl.gov/