Introduction
Introduction Statistics Contact Development Disclaimer Help
tfix grid generation limits with uniform distribution - granular-channel-hydro …
git clone git://src.adamsgaard.dk/granular-channel-hydro
Log
Files
Refs
README
LICENSE
---
commit 0d87e7f51ab71bc4832b9cb19bfcbda63990f5ad
parent afff4e386f601b61e0e2a0323d80d16b3074fe7b
Author: Anders Damsgaard Christensen <[email protected]>
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(-)
---
diff --git a/granular_channel_drainage/model.py b/granular_channel_drainage/mod…
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':
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.