tdeformationdepth.py: import missing numpy - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit d66cb85228bd2b4f08f00a0fa2dbb4a5038a81fb
(DIR) parent ff042ebfbb9eb6ad2a5640e88b474a2dd3ee3eac
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 18 Apr 2022 11:16:25 +0200
deformationdepth.py: import missing numpy
Diffstat:
M python/deformationdepth.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/python/deformationdepth.py b/python/deformationdepth.py
t@@ -2,6 +2,7 @@
# Import sphere functionality
import sphere
+import numpy
### EXPERIMENT SETUP ###
initialization = False
t@@ -31,6 +32,9 @@ init.generateRadii(mean = 0.02)
# Use default params
init.defaultParams(gamma_n = 100.0, mu_s = 0.6, mu_d = 0.6)
+# GPU device (-1: auto select)
+device = 0
+
# Add gravity
init.g[2] = -9.81
t@@ -48,7 +52,7 @@ if (initialization == True):
# Run sphere
init.run(dry = True)
- init.run()
+ init.run(device = device)
if (plots == True):
# Make a graph of energies
t@@ -99,7 +103,7 @@ for N in Nlist:
# Run sphere
cons.run(dry = True) # show values, don't run
- cons.run() # run
+ cons.run(device = device) # run
if (plots == True):
# Make a graph of energies
t@@ -142,7 +146,7 @@ for N in Nlist:
# Run sphere
shear_nrt.run(dry = True)
- shear_nrt.run()
+ shear_nrt.run(device = device)
if (plots == True):
# Make a graph of energies
t@@ -182,7 +186,7 @@ for N in Nlist:
# Run sphere
shear.run(dry = True)
- shear.run()
+ shear.run(device = device)
if (plots == True):
# Make a graph of energies