tAdded darcyflow parameter to init - 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 20e7d61d9aa9111c21e0106a432ac8ac7d4f9ebd
(DIR) parent f043266094c4d99fe6ccc12c2650d0c03b082ec4
(HTM) Author: Anders Damsgaard <adc@geo.au.dk>
Date: Mon, 3 Jun 2013 15:07:44 +0200
Added darcyflow parameter to init
Diffstat:
M python/sphere.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/python/sphere.py b/python/sphere.py
t@@ -1235,7 +1235,8 @@ class Spherebin:
return numpy.array(porosity), numpy.array(depth)
- def run(self, verbose=True, hideinputfile=False, dry=False, valgrind=False, cudamemcheck=False):
+ def run(self, verbose=True, hideinputfile=False, dry=False, valgrind=False,
+ cudamemcheck=False, darcyflow=False):
'Execute sphere with target project'
quiet = ""
t@@ -1243,6 +1244,7 @@ class Spherebin:
dryarg = ""
valgrindbin = ""
cudamemchk = ""
+ binary = "sphere"
if (verbose == False):
quiet = "-q "
if (hideinputfile == True):
t@@ -1253,8 +1255,10 @@ class Spherebin:
valgrindbin = "valgrind -q "
if (cudamemcheck == True):
cudamemchk = "cuda-memcheck "
+ if (darcyflow == True):
+ binary = "porousflow"
- status = subprocess.call("cd ..; " + valgrindbin + cudamemchk + "./sphere " + quiet + dryarg + "input/" + self.sid + ".bin " + stdout, shell=True)
+ status = subprocess.call("cd ..; " + valgrindbin + cudamemchk + "./" + binary + " " + quiet + dryarg + "input/" + self.sid + ".bin " + stdout, shell=True)
if (status != 0):
print("Warning: the sphere run returned with status " + str(status))