tFixed stray tab chars and python3 print calls - 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 7cd4db67ee6d7cf21abd3c56f81f57c8a7de75f2
(DIR) parent 4913beff6de85824c230a9ae5ebd387eafde0769
(HTM) Author: Anders Damsgaard Christensen <adc@geo.au.dk>
Date: Tue, 4 Dec 2012 19:44:58 +0100
Fixed stray tab chars and python3 print calls
Diffstat:
M python/sphere.py | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
---
(DIR) diff --git a/python/sphere.py b/python/sphere.py
t@@ -439,10 +439,10 @@ class Spherebin:
- (self.radius[i] + self.radius[j])
if (delta_len < 0.0):
overlaps = True
- print "\rFinding non-overlapping particle positions, {0} % complete".format(numpy.ceil(i/self.np[0]*100)),
+ print("\rFinding non-overlapping particle positions, {0} % complete".format(numpy.ceil(i/self.np[0]*100)))
# Print newline
- print " "
+ print()
self.contactmodel[0] = contactmodel
t@@ -529,7 +529,7 @@ class Spherebin:
# Check whether there are enough grid cells
if ((self.num[0]*self.num[1]*self.num[2]-(2**3)) < self.np):
- print "Error! The grid is not sufficiently large."
+ print("Error! The grid is not sufficiently large.")
raise NameError('Error! The grid is not sufficiently large.')
gridpos = numpy.zeros(self.nd, dtype=numpy.uint32)
t@@ -541,7 +541,7 @@ class Spherebin:
# Check whether there are enough grid cells
if ((self.num[0]*self.num[1]*self.num[2]-(2*3*3)) < self.np):
- print "Error! The grid is not sufficiently large."
+ print("Error! The grid is not sufficiently large.")
raise NameError('Error! The grid is not sufficiently large.')
t@@ -593,7 +593,7 @@ class Spherebin:
# Check whether there are enough grid cells
if (((coarsegrid[0]-1)*(coarsegrid[1]-1)*(coarsegrid[2]-1)) < self.np):
- print "Error! The grid is not sufficiently large."
+ print("Error! The grid is not sufficiently large.")
raise NameError('Error! The grid is not sufficiently large.')
gridpos = numpy.zeros(self.nd, dtype=numpy.uint32)
t@@ -822,15 +822,15 @@ class Spherebin:
# Contact static shear friction coefficient
#self.mu_s = numpy.ones(1, dtype=numpy.float64) * numpy.tan(numpy.radians(ang_s))
- self.mu_s = numpy.ones(1, dtype=numpy.float64) * mu_s
+ self.mu_s = numpy.ones(1, dtype=numpy.float64) * mu_s
# Contact dynamic shear friction coefficient
#self.mu_d = numpy.ones(1, dtype=numpy.float64) * numpy.tan(numpy.radians(ang_d))
- self.mu_d = numpy.ones(1, dtype=numpy.float64) * mu_d
+ self.mu_d = numpy.ones(1, dtype=numpy.float64) * mu_d
# Contact rolling friction coefficient
#self.mu_r = numpy.ones(1, dtype=numpy.float64) * numpy.tan(numpy.radians(ang_r))
- self.mu_r = numpy.ones(1, dtype=numpy.float64) * mu_r
+ self.mu_r = numpy.ones(1, dtype=numpy.float64) * mu_r
# Wall viscosities
self.gamma_wn[0] = gamma_wn # normal
t@@ -987,13 +987,13 @@ class Spherebin:
quiet = ""
stdout = ""
- dryarg = ""
+ dryarg = ""
if (verbose == False):
quiet = "-q "
if (hideinputfile == True):
stdout = " > /dev/null"
- if (dry == True):
- dryarg = "--dry "
+ if (dry == True):
+ dryarg = "--dry "
subprocess.call("cd ..; ./sphere_* " + quiet + dryarg + "input/" + self.sid + ".bin " + stdout, shell=True)