Commit e2091a05 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

add resize to PP, fix linking issue

parent ce1a45da
Pipeline #21621 passed with stage
in 6 minutes and 47 seconds
......@@ -139,6 +139,11 @@ class PP(_code):
pars['max_acceleration_estimate'] = float(10)
pars['max_velocity_estimate'] = float(1)
pars['histogram_bins'] = int(129)
elif dns_type == 'resize':
pars['new_nx'] = int(32)
pars['new_ny'] = int(32)
pars['new_nz'] = int(32)
pars['new_simname'] = 'test_resized'
return pars
def get_data_file_name(self):
return os.path.join(self.work_dir, self.simname + '.h5')
......@@ -444,6 +449,15 @@ class PP(_code):
self.parameters_to_parser_arguments(
parser_joint_acc_vel_stats,
parameters = self.extra_postprocessing_parameters('joint_acc_vel_stats'))
parser_resize = subparsers.add_parser(
'resize',
help = 'get joint acceleration and velocity statistics')
self.simulation_parser_arguments(parser_resize)
self.job_parser_arguments(parser_resize)
self.parameters_to_parser_arguments(parser_resize)
self.parameters_to_parser_arguments(
parser_resize,
parameters = self.extra_postprocessing_parameters('resize'))
return None
def prepare_launch(
self,
......
......@@ -139,7 +139,7 @@ std::vector<number> hdf5_tools::read_vector(
}
template <typename number>
std::vector<number> hdf5_tools::read_value(
number hdf5_tools::read_value(
const hid_t group,
const std::string dset_name)
{
......@@ -163,7 +163,7 @@ std::vector<number> hdf5_tools::read_value(
if (typeid(number) == typeid(int))
result = INT_MAX;
else if (typeid(number) == typeid(double))
result = DBL_MAX;
result = number(DBL_MAX);
}
H5Tclose(mem_dtype);
return result;
......@@ -247,3 +247,13 @@ std::vector<double> hdf5_tools::read_vector_with_single_rank<double>(
const hid_t file_id,
const std::string dset_name);
template
int hdf5_tools::read_value<int>(
const hid_t,
const std::string);
template
double hdf5_tools::read_value<double>(
const hid_t,
const std::string);
Supports Markdown
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