tmake `id` argument naming optional by overloading createSimulation() - Granula… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 903640be44545b524502b363b200ef96871ab143 | |
parent 023f9d86697aaa297c52da674ffa87ddd17d5303 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 17 Nov 2017 09:55:31 -0500 | |
make `id` argument naming optional by overloading createSimulation() | |
Diffstat: | |
M src/simulation.jl | 3 +++ | |
M test/contact-search-and-geometry.jl | 1 + | |
2 files changed, 4 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/src/simulation.jl b/src/simulation.jl | |
t@@ -47,6 +47,9 @@ function createSimulation(;id::String="unnamed") | |
Nc_max, | |
walls) | |
end | |
+function createSimulation(id::String) | |
+ createSimulation(id=id) | |
+end | |
export run! | |
""" | |
diff --git a/test/contact-search-and-geometry.jl b/test/contact-search-and-geom… | |
t@@ -5,6 +5,7 @@ | |
info("#### $(basename(@__FILE__)) ####") | |
info("Testing interGrainPositionVector(...) and findOverlap(...)") | |
+sim = Granular.createSimulation("test") | |
sim = Granular.createSimulation(id="test") | |
Granular.addGrainCylindrical!(sim, [ 0., 0.], 10., 1., verbose=false) | |
Granular.addGrainCylindrical!(sim, [18., 0.], 10., 1., verbose=false) |