tadd function to find cell index of wall 0 - sphere - GPU-based 3D discrete ele… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit cf30d3f6d54414708e1265c7a353b490d1b177dc | |
parent af3ff5f94fe8c7134db7b7e7614fa7759368cacb | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 24 Feb 2015 11:00:25 +0100 | |
add function to find cell index of wall 0 | |
Diffstat: | |
M python/sphere.py | 12 ++++++++++++ | |
1 file changed, 12 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -2313,6 +2313,18 @@ class sim: | |
''' | |
self.contactmodel[0] = contactmodel | |
+ def wall0iz(self): | |
+ ''' | |
+ Returns the cell index of wall 0 along z. | |
+ | |
+ :returns: z cell index | |
+ :return type: int | |
+ ''' | |
+ if self.nw[0] > 0: | |
+ return int(sim.w_x[0]/(sim.L[2]/sim.num[2])) | |
+ else: | |
+ raise Exception('No dynamic top wall present!') | |
+ | |
def normalBoundariesXY(self): | |
''' | |
Set the x and y boundary conditions to be static walls. |