Commit 9abc3b7b authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

bugfix: get_rfields should use _post file

parent 01075923
Pipeline #18129 passed with stage
in 6 minutes and 13 seconds
......@@ -674,10 +674,11 @@ class PP(_code):
group = self.dns_type + '/parameters',
parameters = self.pp_parameters,
file_name = os.path.join(self.work_dir, self.simname + '_post.h5'))
histogram_bins = opt.histogram_bins
if (type(histogram_bins) == type(None) and
'histogram_bins' in self.pp_parameters.keys()):
histogram_bins = self.pp_parameters['histogram_bins']
if 'histogram_bins' in opt.__dict__.keys():
histogram_bins = opt.histogram_bins
if (type(histogram_bins) == type(None) and
'histogram_bins' in self.pp_parameters.keys()):
histogram_bins = self.pp_parameters['histogram_bins']
with h5py.File(os.path.join(self.work_dir, self.simname + '_post.h5'), 'r+') as ofile:
group = ofile[self.dns_type]
group.require_group('histograms')
......
......@@ -8,6 +8,7 @@ template <typename rnumber>
int get_rfields<rnumber>::initialize(void)
{
this->NSVE_field_stats<rnumber>::initialize();
DEBUG_MSG("after NSVE_field_stats::initialize\n");
this->kk = new kspace<FFTW, SMOOTH>(
this->vorticity->clayout, this->dkx, this->dky, this->dkz);
hid_t parameter_file = H5Fopen(
......@@ -25,9 +26,15 @@ int get_rfields<rnumber>::initialize(void)
}
else
this->checkpoints_per_file = 1;
H5Fclose(parameter_file);
parameter_file = H5Fopen(
(this->simname + std::string("_post.h5")).c_str(),
H5F_ACC_RDONLY,
H5P_DEFAULT);
DEBUG_MSG("before read_vector\n");
this->iteration_list = hdf5_tools::read_vector<int>(
parameter_file,
"/get_rfields/iteration_list");
"/get_rfields/parameters/iteration_list");
H5Fclose(parameter_file);
return EXIT_SUCCESS;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment