From ea7113b7d86453077dc45674ab8506aac5f2b8e0 Mon Sep 17 00:00:00 2001 From: epapoutsellis Date: Thu, 4 Apr 2019 17:39:30 +0100 Subject: add get_item --- Wrappers/Python/ccpi/framework/BlockGeometry.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Wrappers/Python') 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] -- cgit v1.2.3