From 7c60723256916cdf501b8767654fb78d355023b2 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 15 Aug 2022 17:30:27 +0200 Subject: simdata: drop gf loading It is far too slow for large data files. --- simdata.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/simdata.py b/simdata.py index dd5398e..37bff6f 100644 --- a/simdata.py +++ b/simdata.py @@ -94,9 +94,6 @@ class SimulationData(object): "A dictionary of { basename : DataFile } items representing the data files. The basename is the file name without the .h5 extension" df = None - "A dictionary of all the { gridfunction : [datafiles it is located in] } pairs for this set of data" - gf = None - # per-refinement level parameters rl = None @@ -105,7 +102,6 @@ class SimulationData(object): def __init__(self, dirname): self.dirname = os.path.abspath(dirname) self.df = {} - self.gf = {} # open all the hdf5 files in the dir for f in os.listdir(dirname): @@ -116,12 +112,6 @@ class SimulationData(object): if len(self.df) == 0: raise ValueError('No HDF5 data files in the directory.') - for df in self.df.values(): - for ds in df.datasets: - if ds.name in self.gf: - self.gf[ds.name].append(df) - self.gf[ds.name] = [df] - # pick a representative datafile and get the grid properties from it if 'H' in self.df: df = self.df['H'] -- cgit v1.2.3