timprove docstring for findEmptyPositionInGridCell - Granular.jl - Julia packag… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 5c6adb1e8c835eafaaa67d10dcd96132fb920c33 | |
parent 6156d91a42c970d7484b0744f3ce1ea990925fe2 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 22 Nov 2017 08:51:46 -0500 | |
improve docstring for findEmptyPositionInGridCell | |
Diffstat: | |
M src/grid.jl | 13 +++++++++++++ | |
1 file changed, 13 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/src/grid.jl b/src/grid.jl | |
t@@ -512,6 +512,9 @@ end | |
export findEmptyPositionInGridCell | |
""" | |
+ findEmptyPositionInGridCell(simulation, grid, i, j, r[, n_iter, seed, | |
+ verbose]) | |
+ | |
Attempt locate an empty spot for an grain with radius `r` with center | |
coordinates in a specified grid cell (`i`, `j`) without overlapping any other | |
grains in that cell or the neighboring cells. This function will stop | |
t@@ -519,6 +522,16 @@ attempting after `n_iter` iterations, each with randomly … | |
This function assumes that existing grains have been binned according to the | |
grid (e.g., using `sortGrainsInGrid()`). | |
+ | |
+# Arguments | |
+* `simulation::Simulation`: the simulation object to add grains to. | |
+* `grid::Any`: the grid to use for position search. | |
+* `i::Int`: the grid-cell index along x. | |
+* `j::Int`: the grid-cell index along y. | |
+* `r::Float64`: the desired grain radius to fit into the cell. | |
+* `n_iter::Int = 10`: the number of attempts for finding an empty spot. | |
+* `seed::Int = 1`: seed for the pseudo-random number generator. | |
+* `verbose::Bool = false`: print diagnostic information. | |
""" | |
function findEmptyPositionInGridCell(simulation::Simulation, | |
grid::Any, |