diff --git a/src/cluster/cluster.cpp b/src/cluster/cluster.cpp index 54bb4df4e3ac58bc4af26f7f6ef00d5151347dce..8e86c417f9864b838b21a1d9626d6116227b80e3 100644 --- a/src/cluster/cluster.cpp +++ b/src/cluster/cluster.cpp @@ -386,22 +386,24 @@ void cluster(string config_file, string data_file, string output_path) { dcomplex **tqsps_2 = new dcomplex*[2]; for (int ti = 0; ti < 2; ti++) { tqse_2[ti] = new double[nsph](); - tqce_2[ti] = new double[nsph](); - tqcs_2[ti] = new double[nsph](); + tqce_2[ti] = new double[3](); + tqcs_2[ti] = new double[3](); tqspe_2[ti] = new dcomplex[nsph](); - tqcpe_2[ti] = new dcomplex[nsph](); - tqcps_2[ti] = new dcomplex[nsph](); + tqcpe_2[ti] = new dcomplex[3](); + tqcps_2[ti] = new dcomplex[3](); tqss_2[ti] = new double[nsph](); tqsps_2[ti] = new dcomplex[nsph](); for (int tj=0; tj<nsph; tj++) { tqse_2[ti][tj] = tqse[ti][tj]; + tqspe_2[ti][tj] = tqspe[ti][tj]; + tqss_2[ti][tj] = tqss[ti][tj]; + tqsps_2[ti][tj] = tqsps[ti][tj]; + } + for (int tj=0; tj<3; tj++) { tqce_2[ti][tj] = tqce[ti][tj]; tqcs_2[ti][tj] = tqcs[ti][tj]; - tqspe_2[ti][tj] = tqspe[ti][tj]; tqcpe_2[ti][tj] = tqcpe[ti][tj]; tqcps_2[ti][tj] = tqcps[ti][tj]; - tqss_2[ti][tj] = tqss[ti][tj]; - tqsps_2[ti][tj] = tqsps[ti][tj]; } } double ****zpv_2 = new double***[c4->lm]; //[gconf->l_max][3][2][2]; // Matrix: dim[LM x 3 x 2 x 2] diff --git a/src/libnptm/Commons.cpp b/src/libnptm/Commons.cpp index 10b22cb92c121b98d847035cb3f05d96e6d4c7a9..4fad87d23d69b55eaef8e5c71a7e8a34fd49bf95 100644 --- a/src/libnptm/Commons.cpp +++ b/src/libnptm/Commons.cpp @@ -328,7 +328,7 @@ C1_AddOns::~C1_AddOns() { for (int ai = nlemt - 1; ai > -1; ai--) { delete[] am0m[ai]; } - delete am0m; + delete[] am0m; delete[] vint; delete[] vintm; delete[] vintt;