Loading src/cluster/cluster.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -638,9 +638,9 @@ void cluster(string config_file, string data_file, string output_path) { real(c1->sas[i226 - 1][1][1]), imag(c1->sas[i226 - 1][1][1]) ); for (int j225 = 0; j225 < 16; j225++) { // QUESTION: check that 16 is a fixed dimension c1ao->vint[j225] = c1->vints[i226 - 1][j225]; c1->vint[j225] = c1->vints[i226 - 1][j225]; } // j225 loop mmulc(c1ao->vint, cmullr, cmul); mmulc(c1->vint, cmullr, cmul); fprintf(output, " MULS\n"); for (int i1 = 0; i1 < 4; i1++) { fprintf( Loading Loading @@ -670,7 +670,7 @@ void cluster(string config_file, string data_file, string output_path) { fprintf(output, " CLUSTER\n"); pcros(vk, exri, c1, c1ao, c4); mextc(vk, exri, c1ao->fsac, cextlr, cext); mmulc(c1ao->vint, cmullr, cmul); mmulc(c1->vint, cmullr, cmul); if (jw != 0) { jw = 0; // Some implicit loops writing to binary. Loading Loading @@ -735,9 +735,9 @@ void cluster(string config_file, string data_file, string output_path) { } // label 254 for (int i = 0; i < 16; i++) { double value = real(c1ao->vint[i]); double value = real(c1->vint[i]); tppoan.write(reinterpret_cast<char *>(&value), sizeof(double)); value = imag(c1ao->vint[i]); value = imag(c1->vint[i]); tppoan.write(reinterpret_cast<char *>(&value), sizeof(double)); } for (int i = 0; i < 4; i++) { Loading src/include/Commons.h +3 −3 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ protected: int nsph; //! \brief Maximum order of field expansion. int lm; //! \brief NLMMT. QUESTION: definition? //! \brief NLMMT = 2 * LM * (LM + 2) int nlmmt; //! \brief Contiguous RMI vector. dcomplex *vec_rmi; Loading @@ -63,6 +63,8 @@ public: //! \brief QUESTION: definition? dcomplex **vints; //! \brief QUESTION: definition? dcomplex *vint; //! \brief QUESTION: definition? double *sscs; //! \brief QUESTION: definition? double *sexs; Loading Loading @@ -233,8 +235,6 @@ public: //! \brief QUESTION: definition? dcomplex **am0m; //! \brief QUESTION: definition? dcomplex *vint; //! \brief QUESTION: definition? dcomplex *vintm; //! \brief QUESTION: definition? dcomplex *vintt; Loading src/libnptm/Commons.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ C1::C1(int ns, int l_max, int *_nshl, int *_iog) { for (int ci = 1; ci <= nsph; ci++) { if (_iog[ci - 1] >= ci) configurations++; } vint = new dcomplex[16](); vec_vints = new dcomplex[nsph * 16](); vints = new dcomplex*[nsph]; rc = new double*[configurations]; Loading Loading @@ -91,6 +92,7 @@ C1::~C1() { } } delete[] rc; delete[] vint; delete[] vec_vints; delete[] vints; for (int si = nsph - 1; si > -1; si--) { Loading Loading @@ -128,7 +130,6 @@ C1_AddOns::C1_AddOns(C4 *c4) { for (int ai = 0; ai < nlemt; ai++) { am0m[ai] = new dcomplex[nlemt](); } vint = new dcomplex[16](); // QUESTION: is dimension 16 generally fixed? vintm = new dcomplex[16](); vintt = new dcomplex[16](); fsac = new dcomplex*[2]; Loading Loading @@ -164,7 +165,6 @@ C1_AddOns::~C1_AddOns() { delete[] am0m[ai]; } delete am0m; delete[] vint; delete[] vintm; delete[] vintt; for (int fi = 1; fi > -1; fi--) { Loading src/libnptm/clu_subs.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1100,7 +1100,7 @@ void pcros(double vk, double exri, C1 *c1, C1_AddOns *c1ao, C4 *c4) { cc = dconjg(c1ao->sac[jpo1 - 1][ipo1 - 1]); for (int ipo2 = 1; ipo2 <= 2; ipo2 ++) { for (int jpo2 = 1; jpo2 <= 2; jpo2++) { c1ao->vint[i++] = c1ao->sac[jpo2 - 1][ipo2 - 1] * cc * cfsq; c1->vint[i++] = c1ao->sac[jpo2 - 1][ipo2 - 1] * cc * cfsq; } // jpo2 loop } // ipo2 loop } // jpo1 loop Loading src/sphere/sphere.cpp +4 −6 Original line number Diff line number Diff line Loading @@ -102,7 +102,6 @@ void sphere(string config_file, string data_file, string output_path) { } double frx = 0.0, fry = 0.0, frz = 0.0; double cfmp, cfsp, sfmp, sfsp; dcomplex *vint = new dcomplex[16]; int jw; int nsph = gconf->number_of_spheres; C1 *c1 = new C1(nsph, gconf->l_max, sconf->nshl_vec, sconf->iog_vec); Loading Loading @@ -509,8 +508,8 @@ void sphere(string config_file, string data_file, string output_path) { output, " Fx=%15.7lE, Fy=%15.7lE, Fz=%15.7lE\n", frx, fry, frz ); for (int i225 = 0; i225 < 16; i225++) vint[i225] = c1->vints[ns226][i225]; mmulc(vint, cmullr, cmul); for (int i225 = 0; i225 < 16; i225++) c1->vint[i225] = c1->vints[ns226][i225]; mmulc(c1->vint, cmullr, cmul); fprintf(output, " MULS\n "); for (int imul = 0; imul < 4; imul++) { for (int jmul = 0; jmul < 4; jmul++) { Loading @@ -528,9 +527,9 @@ void sphere(string config_file, string data_file, string output_path) { else fprintf(output, "\n"); } for (int vi = 0; vi < 16; vi++) { double value = real(vint[vi]); double value = real(c1->vint[vi]); tppoan.write(reinterpret_cast<char *>(&value), sizeof(double)); value = imag(vint[vi]); value = imag(c1->vint[vi]); tppoan.write(reinterpret_cast<char *>(&value), sizeof(double)); } for (int imul = 0; imul < 4; imul++) { Loading Loading @@ -577,7 +576,6 @@ void sphere(string config_file, string data_file, string output_path) { delete[] upsmp; delete[] unmp; delete[] unsmp; delete[] vint; delete[] argi; delete[] args; delete[] gaps; Loading Loading
src/cluster/cluster.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -638,9 +638,9 @@ void cluster(string config_file, string data_file, string output_path) { real(c1->sas[i226 - 1][1][1]), imag(c1->sas[i226 - 1][1][1]) ); for (int j225 = 0; j225 < 16; j225++) { // QUESTION: check that 16 is a fixed dimension c1ao->vint[j225] = c1->vints[i226 - 1][j225]; c1->vint[j225] = c1->vints[i226 - 1][j225]; } // j225 loop mmulc(c1ao->vint, cmullr, cmul); mmulc(c1->vint, cmullr, cmul); fprintf(output, " MULS\n"); for (int i1 = 0; i1 < 4; i1++) { fprintf( Loading Loading @@ -670,7 +670,7 @@ void cluster(string config_file, string data_file, string output_path) { fprintf(output, " CLUSTER\n"); pcros(vk, exri, c1, c1ao, c4); mextc(vk, exri, c1ao->fsac, cextlr, cext); mmulc(c1ao->vint, cmullr, cmul); mmulc(c1->vint, cmullr, cmul); if (jw != 0) { jw = 0; // Some implicit loops writing to binary. Loading Loading @@ -735,9 +735,9 @@ void cluster(string config_file, string data_file, string output_path) { } // label 254 for (int i = 0; i < 16; i++) { double value = real(c1ao->vint[i]); double value = real(c1->vint[i]); tppoan.write(reinterpret_cast<char *>(&value), sizeof(double)); value = imag(c1ao->vint[i]); value = imag(c1->vint[i]); tppoan.write(reinterpret_cast<char *>(&value), sizeof(double)); } for (int i = 0; i < 4; i++) { Loading
src/include/Commons.h +3 −3 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ protected: int nsph; //! \brief Maximum order of field expansion. int lm; //! \brief NLMMT. QUESTION: definition? //! \brief NLMMT = 2 * LM * (LM + 2) int nlmmt; //! \brief Contiguous RMI vector. dcomplex *vec_rmi; Loading @@ -63,6 +63,8 @@ public: //! \brief QUESTION: definition? dcomplex **vints; //! \brief QUESTION: definition? dcomplex *vint; //! \brief QUESTION: definition? double *sscs; //! \brief QUESTION: definition? double *sexs; Loading Loading @@ -233,8 +235,6 @@ public: //! \brief QUESTION: definition? dcomplex **am0m; //! \brief QUESTION: definition? dcomplex *vint; //! \brief QUESTION: definition? dcomplex *vintm; //! \brief QUESTION: definition? dcomplex *vintt; Loading
src/libnptm/Commons.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ C1::C1(int ns, int l_max, int *_nshl, int *_iog) { for (int ci = 1; ci <= nsph; ci++) { if (_iog[ci - 1] >= ci) configurations++; } vint = new dcomplex[16](); vec_vints = new dcomplex[nsph * 16](); vints = new dcomplex*[nsph]; rc = new double*[configurations]; Loading Loading @@ -91,6 +92,7 @@ C1::~C1() { } } delete[] rc; delete[] vint; delete[] vec_vints; delete[] vints; for (int si = nsph - 1; si > -1; si--) { Loading Loading @@ -128,7 +130,6 @@ C1_AddOns::C1_AddOns(C4 *c4) { for (int ai = 0; ai < nlemt; ai++) { am0m[ai] = new dcomplex[nlemt](); } vint = new dcomplex[16](); // QUESTION: is dimension 16 generally fixed? vintm = new dcomplex[16](); vintt = new dcomplex[16](); fsac = new dcomplex*[2]; Loading Loading @@ -164,7 +165,6 @@ C1_AddOns::~C1_AddOns() { delete[] am0m[ai]; } delete am0m; delete[] vint; delete[] vintm; delete[] vintt; for (int fi = 1; fi > -1; fi--) { Loading
src/libnptm/clu_subs.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1100,7 +1100,7 @@ void pcros(double vk, double exri, C1 *c1, C1_AddOns *c1ao, C4 *c4) { cc = dconjg(c1ao->sac[jpo1 - 1][ipo1 - 1]); for (int ipo2 = 1; ipo2 <= 2; ipo2 ++) { for (int jpo2 = 1; jpo2 <= 2; jpo2++) { c1ao->vint[i++] = c1ao->sac[jpo2 - 1][ipo2 - 1] * cc * cfsq; c1->vint[i++] = c1ao->sac[jpo2 - 1][ipo2 - 1] * cc * cfsq; } // jpo2 loop } // ipo2 loop } // jpo1 loop Loading
src/sphere/sphere.cpp +4 −6 Original line number Diff line number Diff line Loading @@ -102,7 +102,6 @@ void sphere(string config_file, string data_file, string output_path) { } double frx = 0.0, fry = 0.0, frz = 0.0; double cfmp, cfsp, sfmp, sfsp; dcomplex *vint = new dcomplex[16]; int jw; int nsph = gconf->number_of_spheres; C1 *c1 = new C1(nsph, gconf->l_max, sconf->nshl_vec, sconf->iog_vec); Loading Loading @@ -509,8 +508,8 @@ void sphere(string config_file, string data_file, string output_path) { output, " Fx=%15.7lE, Fy=%15.7lE, Fz=%15.7lE\n", frx, fry, frz ); for (int i225 = 0; i225 < 16; i225++) vint[i225] = c1->vints[ns226][i225]; mmulc(vint, cmullr, cmul); for (int i225 = 0; i225 < 16; i225++) c1->vint[i225] = c1->vints[ns226][i225]; mmulc(c1->vint, cmullr, cmul); fprintf(output, " MULS\n "); for (int imul = 0; imul < 4; imul++) { for (int jmul = 0; jmul < 4; jmul++) { Loading @@ -528,9 +527,9 @@ void sphere(string config_file, string data_file, string output_path) { else fprintf(output, "\n"); } for (int vi = 0; vi < 16; vi++) { double value = real(vint[vi]); double value = real(c1->vint[vi]); tppoan.write(reinterpret_cast<char *>(&value), sizeof(double)); value = imag(vint[vi]); value = imag(c1->vint[vi]); tppoan.write(reinterpret_cast<char *>(&value), sizeof(double)); } for (int imul = 0; imul < 4; imul++) { Loading Loading @@ -577,7 +576,6 @@ void sphere(string config_file, string data_file, string output_path) { delete[] upsmp; delete[] unmp; delete[] unsmp; delete[] vint; delete[] argi; delete[] args; delete[] gaps; Loading