DesignSPHysics
DesignSPHysics copied to clipboard
Enable smaller inter-particle distance values
Summary
- Increased decimal precision for inter-particle distance input from default to 6 decimals
- Updated SizeInput widget to accept configurable decimal places
- Modified dock_dp_widget to use 6 decimal places for inter-particle distance
Problem Solved
Previously, users could not set inter-particle distance values lower than 0.001. This change allows for much smaller values by increasing the number of decimal places displayed and accepted in the input field.
Changes
mod/widgets/custom_widgets/size_input.py: Added decimals parameter to SizeInput constructormod/widgets/dock/dock_dp_widget.py: Set dp_input to use 6 decimal places
Alternative Solution
Another approach would be to modify the DEFAULT_DECIMALS constant, but this would affect all other numeric inputs throughout the application. The current solution provides targeted precision only where needed.