treverhines / RBF

Python package containing the tools necessary for radial basis function (RBF) applications
MIT License
220 stars 51 forks source link

Can't specify node snapping distance from min_energy_nodes #7

Closed cossatot closed 5 years ago

cossatot commented 5 years ago

In rbf.nodes.min_energy_nodes, the keyword delta is passed to rbf.nodes._disperse_within_boundary; it is also the name of the snapping distance parameter in rbf.nodes._snap_to_boundary even though the parameters aren't the same thing--as a consequence, a default value of 0.5 is hardcoded as the delta for the snapping function. However, I've needed to modify this parameter from a script so hardcoding it doesn't work for me.

I'm jointly submitting a pull request that uses a keyword snap_deltain min_energy_nodes to allow the user to specify this value and avoid a name collision with the delta function used to disperse the nodes.

treverhines commented 5 years ago

Sounds good. I will merge it. What issues were you noticing that made you want to change the snapping delta?

cossatot commented 5 years ago

Accurately representing a highly irregular topographic surface, and then still having a high concentration of points just below the surface, to get the most accurate stress calculations. IIRC (I made this change to my scripts last spring) if the snapping delta was too large, the points would all stick to the surface and then there would be a gap of a few units (km) below the topo. It wasn't all the time, but it would happen with certain combinations of domain size/shape and number of nodes.