aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-11-05 23:22:36 +0100
committerAdrian Kummerlaender2019-11-05 23:22:36 +0100
commit019e8d57c6266ce0b26d8eacab984f303442a184 (patch)
tree153ee2d777e8f5b77f5a585b57d69cc2d1ba74f5
parentf3035c9d8d5a643ee7e9e86a58688c4b2f86319c (diff)
downloadboltzgen-019e8d57c6266ce0b26d8eacab984f303442a184.tar
boltzgen-019e8d57c6266ce0b26d8eacab984f303442a184.tar.gz
boltzgen-019e8d57c6266ce0b26d8eacab984f303442a184.tar.bz2
boltzgen-019e8d57c6266ce0b26d8eacab984f303442a184.tar.xz
boltzgen-019e8d57c6266ce0b26d8eacab984f303442a184.zip
Add cell index generator method to Geometry class
-rw-r--r--boltzgen/geometry.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/boltzgen/geometry.py b/boltzgen/geometry.py
index 443dee2..bf99413 100644
--- a/boltzgen/geometry.py
+++ b/boltzgen/geometry.py
@@ -28,6 +28,9 @@ class Geometry:
for idx in ndindex(self.inner_size(), order=order):
yield tuple(map(lambda i: i + 1, idx))
+ def cells(self, order='F'):
+ return ndindex(self.size(), order=order)
+
def size(self):
if self.size_z == 1:
return (self.size_x, self.size_y)