Skip to content

Commit

Permalink
now with valid C++, as if you'd really want that
Browse files Browse the repository at this point in the history
  • Loading branch information
scopatz committed Jul 29, 2015
1 parent e146f36 commit d00404b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/material.cpp
Expand Up @@ -125,7 +125,7 @@ void pyne::Material::_load_comp_protocol1(hid_t db, std::string datapath, int ro
hid_t mem_space = H5Screate_simple(1, data_count, NULL);

// Get material type
size_t material_data_size = sizeof(pyne::material_data) + sizeof(double)*nuc_size;
size_t material_data_size = sizeof(pyne::material_data) + sizeof(double)*(nuc_size-1);
hid_t desc = H5Tcreate(H5T_COMPOUND, material_data_size);
hid_t comp_values_array_type = H5Tarray_create2(H5T_NATIVE_DOUBLE, 1, nuc_dims);

Expand Down Expand Up @@ -317,7 +317,7 @@ void pyne::Material::write_hdf5(std::string filename, std::string datapath,
hsize_t data_max_dims[1] = {H5S_UNLIMITED};
hsize_t data_offset[1] = {0};

size_t material_data_size = sizeof(pyne::material_data) + sizeof(double)*nuc_size;
size_t material_data_size = sizeof(pyne::material_data) + sizeof(double)*(nuc_size-1);
hid_t desc = H5Tcreate(H5T_COMPOUND, material_data_size);
hid_t comp_values_array_type = H5Tarray_create2(H5T_NATIVE_DOUBLE, 1, nuc_dims);

Expand Down
2 changes: 1 addition & 1 deletion src/material.h
Expand Up @@ -362,7 +362,7 @@ namespace pyne
double mass; ///< material mass
double density; ///< material density
double atoms_per_mol; ///< material atoms per mole
double *comp; ///< array of material composition mass weights.
double comp[1]; ///< array of material composition mass weights.
} material_data;

/// Custom exception for invalid HDF5 protocol numbers
Expand Down

0 comments on commit d00404b

Please sign in to comment.