Skip to content
Snippets Groups Projects
Commit 9a1f2f0f authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Fix matrix check flag name and hdf5_file pointer

parent ceb70c31
No related branches found
No related tags found
No related merge requests found
...@@ -556,7 +556,7 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(string file_name) { ...@@ -556,7 +556,7 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(string file_name) {
status = hdf_file->read("NXI", "INT32_(1)", &nxi); status = hdf_file->read("NXI", "INT32_(1)", &nxi);
iog = new int[nsph]; iog = new int[nsph];
string str_type = "INT32_(" + to_string(nsph) + ")"; string str_type = "INT32_(" + to_string(nsph) + ")";
status = hdf_file.read("IOGVEC", str_type, iog); status = hdf_file->read("IOGVEC", str_type, iog);
int configuration_count = 0; int configuration_count = 0;
for (int ci = 0; ci < nsph; ci++) { for (int ci = 0; ci < nsph; ci++) {
if (iog[ci] < ci + 1) continue; if (iog[ci] < ci + 1) continue;
...@@ -564,6 +564,7 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(string file_name) { ...@@ -564,6 +564,7 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(string file_name) {
} }
nshl_vector = new int[configuration_count]; nshl_vector = new int[configuration_count];
ros_vector = new double[configuration_count]; ros_vector = new double[configuration_count];
// DA QUI
status = hdf_file->close(); status = hdf_file->close();
conf = new ScattererConfiguration( conf = new ScattererConfiguration(
...@@ -1079,7 +1080,7 @@ bool ScattererConfiguration::operator ==(ScattererConfiguration &other) { ...@@ -1079,7 +1080,7 @@ bool ScattererConfiguration::operator ==(ScattererConfiguration &other) {
if (scale_vec[svi] != other.scale_vec[svi]) return false; if (scale_vec[svi] != other.scale_vec[svi]) return false;
int dj_index = 0; int dj_index = 0;
for (int dj = 0; dj < number_of_spheres; dj++) { for (int dj = 0; dj < number_of_spheres; dj++) {
bool check matrixes = false; bool check_matrixes = false;
if (iog_vec[dj] >= dj + 1) { if (iog_vec[dj] >= dj + 1) {
dj_index = iog_vec[dj] - 1; dj_index = iog_vec[dj] - 1;
check_matrixes = true; check_matrixes = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment