def use_geometry(self, filename):

        # Open existing file
        f = h5py.File(filename, 'r')

        # Get group pointing to grid
        if 'Grid' in f:
            g_grid = f['Grid']
        elif 'Grid' in f['Input']:
            if f['Input'].file != f.file:
                # Workaround for h5py bug - can't access link directly,
                # need to use file attribute
                g_grid = f['Input'].file[f['Input'].name]['Grid']
            else:
                g_grid = f['Input/Grid']
        else:
            raise Exception("No grid found in file: %s" % filename)

        # Determine grid type
        if g_grid['Geometry'].attrs['grid_type'].decode('utf-8') == 'car':
            grid = CartesianGrid()
        elif g_grid['Geometry'].attrs['grid_type'].decode('utf-8') == 'sph_pol':
            grid = SphericalPolarGrid()
        elif g_grid['Geometry'].attrs['grid_type'].decode('utf-8') == 'cyl_pol':
            grid = CylindricalPolarGrid()
        elif g_grid['Geometry'].attrs['grid_type'].decode('utf-8') == 'amr':
            grid = AMRGrid()
        elif g_grid['Geometry'].attrs['grid_type'].decode('utf-8') == 'oct':
            grid = OctreeGrid()
        elif g_grid['Geometry'].attrs['grid_type'].decode('utf-8') == 'vor':
            grid = VoronoiGrid()
        else:
            raise NotImplemented("Cannot read geometry type %s" % g_grid['Geometry'].attrs['grid_type'].decode('utf-8'))

        # Read in the grid
        grid.read(g_grid, quantities=[])

        # Set the grid
        self.set_grid(grid)

        # Close the file
        f.close()
Perform basic analysis of the answer set.
dataset/ETHPy150Open hyperion-rt/hyperion/hyperion/model/model.py/Model.use_geometry--crossover with--dataset/ETHPy150Open sahana/eden/modules/s3db/survey.py/S3AbstractAnalysis.basicResults