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

Fix indexes in Transition Matrix HDF5 output

parent ee8ca023
No related branches found
No related tags found
No related merge requests found
......@@ -235,8 +235,8 @@ void TransitionMatrix::write_hdf5(string file_name) {
double *ptr_elements = new double[shape[0] * 2 * shape[1]]();
for (int ei = 0; ei < shape[0]; ei++) {
for (int ej = 0; ej < shape[1]; ej++) {
ptr_elements[ei * (2 * ej)] = elements[shape[1] * ei + ej].real();
ptr_elements[ei * (2 * ej) + 1] = elements[shape[1] * ei + ej].imag();
ptr_elements[shape[1] * ei + 2 * ej] = elements[shape[1] * ei + ej].real();
ptr_elements[shape[1] * ei + 2 * ej + 1] = elements[shape[1] * ei + ej].imag();
}
}
rec_ptr_list.append(ptr_elements);
......
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