| Date: Fri, 13 Jan 2017 22:46:53 -0800
fix grid generation limits with uniform distribution
Diffstat:
M granular_channel_drainage/model.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- |
| t@@ -60,9 +60,9 @@ class model:
xPoints = numpy.linspace(dx*.5, Lx - dx*.5, Nx)
yPoints = numpy.linspace(dy*.5, Ly - dy*.5, Ny)
gridPoints = numpy.array([[x,y] for y in yPoints for x in xPoints])
- gridPoints[::2, 1] = gridPoints[::2, 1] + dy*0.5
N = len(gridPoints[:, 0])
if distribution == 'normal':
+ gridPoints[::2, 1] = gridPoints[::2, 1] + dy*0.5
x = gridPoints[:, 0] + numpy.random.normal(0, dx*0.10, N)
y = gridPoints[:, 1] + numpy.random.normal(0, dy*0.10, N)
elif distribution == 'uniform': |