[postprocessor] correct bug of Nonizing pp.parts when reloading
This commit is contained in:
+4
-5
@@ -394,12 +394,11 @@ class PostProcessor(HDF5Container):
|
||||
|
||||
self.def_rules()
|
||||
|
||||
def load_data(self, points_src, loaded, filename, save):
|
||||
def load_data(self, points_src, filename, save):
|
||||
"""
|
||||
Load data from the source file in the memory.
|
||||
(Long and memory heavy)
|
||||
"""
|
||||
if not loaded:
|
||||
if os.path.exists(filename):
|
||||
hdf5 = tables.open_file(filename, mode="r")
|
||||
try:
|
||||
@@ -432,9 +431,9 @@ class PostProcessor(HDF5Container):
|
||||
return data
|
||||
|
||||
def load_parts(self):
|
||||
if not self.parts_loaded:
|
||||
self.parts = self.load_data(
|
||||
self._part,
|
||||
self.parts_loaded,
|
||||
self.parts_filename,
|
||||
self.pp_params.process.save_parts,
|
||||
)
|
||||
@@ -455,14 +454,14 @@ class PostProcessor(HDF5Container):
|
||||
Cells will be accessible trough self.cells
|
||||
(Long and memory heavy)
|
||||
"""
|
||||
if not self.cells_loaded:
|
||||
cells_src = CellsToPoints(self._amr)
|
||||
self.cells = self.load_data(
|
||||
cells_src,
|
||||
self.cells_loaded,
|
||||
self.cells_filename,
|
||||
self.pp_params.process.save_cells,
|
||||
)
|
||||
self.parts_loaded = True
|
||||
self.cells_loaded = True
|
||||
|
||||
def unload_cells(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user