summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorepapoutsellis <epapoutsellis@gmail.com>2019-04-04 17:39:30 +0100
committerepapoutsellis <epapoutsellis@gmail.com>2019-04-04 17:39:30 +0100
commitea7113b7d86453077dc45674ab8506aac5f2b8e0 (patch)
treef2b1bd249b20c70fbfbe69154307a611a12cad3e /Wrappers/Python
parent8d11cade9c2dcf30d4a92ad9be4bc39b05c83b7e (diff)
downloadframework-ea7113b7d86453077dc45674ab8506aac5f2b8e0.tar.gz
framework-ea7113b7d86453077dc45674ab8506aac5f2b8e0.tar.bz2
framework-ea7113b7d86453077dc45674ab8506aac5f2b8e0.tar.xz
framework-ea7113b7d86453077dc45674ab8506aac5f2b8e0.zip
add get_item
Diffstat (limited to 'Wrappers/Python')
-rwxr-xr-xWrappers/Python/ccpi/framework/BlockGeometry.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Wrappers/Python/ccpi/framework/BlockGeometry.py b/Wrappers/Python/ccpi/framework/BlockGeometry.py
index d336305..0f43155 100755
--- a/Wrappers/Python/ccpi/framework/BlockGeometry.py
+++ b/Wrappers/Python/ccpi/framework/BlockGeometry.py
@@ -27,6 +27,10 @@ class BlockGeometry(object):
raise ValueError(
'Dimension and size do not match: expected {} got {}'
.format(n_elements, len(args)))
+
+ def get_item(self, index):
+ '''returns the Geometry in the BlockGeometry located at position index'''
+ return self.geometries[index]
def allocate(self, value=0, dimension_labels=None):
containers = [geom.allocate(value) for geom in self.geometries]