Commit 26a7a8cc authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

get rid of compile warnings

parent ea70314e
......@@ -78,7 +78,6 @@ class NavierStokes(_fluid_particle_base):
hsize_t dims[4];
hid_t group;
hid_t Cspace, Cdset;
int ndims;
// store kspace information
Cdset = H5Dopen(stat_file, "/kspace/kshell", H5P_DEFAULT);
Cspace = H5Dget_space(Cdset);
......
......@@ -102,13 +102,15 @@ class _fluid_particle_base(_code):
self.definitions += self.particle_definitions
self.definitions += ('int grow_single_dataset(hid_t dset, int tincrement)\n{\n' +
'int ndims;\n' +
'hsize_t dims[5];\n' +
'hsize_t space;\n' +
'space = H5Dget_space(dset);\n' +
'ndims = H5Sget_simple_extent_dims(space, dims, NULL);\n' +
'ndims = H5Sget_simple_extent_ndims(space);\n' +
'hsize_t *dims = new hsize_t[ndims];\n' +
'H5Sget_simple_extent_dims(space, dims, NULL);\n' +
'dims[0] += tincrement;\n' +
'H5Dset_extent(dset, dims);\n' +
'H5Sclose(space);\n' +
'delete[] dims;\n' +
'return EXIT_SUCCESS;\n}\n')
self.definitions += ('herr_t grow_statistics_dataset(hid_t o_id, const char *name, const H5O_info_t *info, void *op_data)\n{\n' +
'if (info->type == H5O_TYPE_DATASET)\n{\n' +
......
......@@ -346,7 +346,7 @@ fluid_solver_base<R>::fluid_solver_base( \
(void*)(this->kshell), \
this->nshells, \
MPI_DOUBLE, MPI_SUM, this->cd->comm); \
for (int n=0; n<this->nshells; n++) \
for (unsigned int n=0; n<this->nshells; n++) \
{ \
this->kshell[n] /= this->nshell[n]; \
} \
......
......@@ -67,7 +67,7 @@ class fluid_solver_base
std::unordered_map<int, double> Fourier_filter;
double *kshell;
int64_t *nshell;
int nshells;
unsigned int nshells;
/* methods */
......
......@@ -58,7 +58,7 @@ class interpolator_base
interpolator_base(
fluid_solver_base<rnumber> *FSOLVER,
base_polynomial_values BETA_POLYS);
~interpolator_base(){}
virtual ~interpolator_base(){}
/* may not destroy input */
virtual int read_rFFTW(const void *src) = 0;
......
......@@ -86,7 +86,7 @@ class particles_io_base
const int TRAJ_SKIP,
const hid_t data_file_id,
MPI_Comm COMM);
~particles_io_base();
virtual ~particles_io_base();
void read_state_chunk(
const int cindex,
......
......@@ -49,6 +49,7 @@ def scaling(opt):
opt.work_dir = wd + '/N{0:0>3x}_3'.format(opt.n)
c2 = launch(opt, dt = c0.parameters['dt'], particle_class = 'particles', interpolator_class = 'interpolator')
c2.compute_statistics()
compare_stats(opt, c0, c2)
compare_stats(opt, c1, c2)
return None
......
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