diff --git a/src/libnptm/Commons.cpp b/src/libnptm/Commons.cpp index 1d67281b19812dd194fd00dd01e844888d443ab4..af2b222ea0a3948bbfc412247c6f30a9966a353a 100644 --- a/src/libnptm/Commons.cpp +++ b/src/libnptm/Commons.cpp @@ -98,31 +98,31 @@ C1_AddOns::C1_AddOns(C4 *c4) { lmpo = c4->lmpo; nlemt = 2 * c4->nlem; vh = new complex<double>[(nsph * nsph - 1) * c4->litpo](); - vj0 = new complex<double>[nsph * c4->lmtpo]; - vj = new complex<double>[1]; // QUESTION: is 1 really enough for a general case? - vyhj = new complex<double>[(nsph * nsph - 1) * c4->litpos]; - vyj0 = new complex<double>[nsph * c4->lmtpos]; + vj0 = new complex<double>[nsph * c4->lmtpo](); + vj = new complex<double>[1](); // QUESTION: is 1 really enough for a general case? + vyhj = new complex<double>[(nsph * nsph - 1) * c4->litpos](); + vyj0 = new complex<double>[nsph * c4->lmtpos](); am0m = new complex<double>*[nlemt]; for (int ai = 0; ai < nlemt; ai++) { - am0m[ai] = new complex<double>[nlemt]; + am0m[ai] = new complex<double>[nlemt](); } - vint = new complex<double>[16]; - vintm = new complex<double>[16]; - vintt = new complex<double>[16]; + vint = new complex<double>[16](); + vintm = new complex<double>[16](); + vintt = new complex<double>[16](); fsac = new complex<double>*[2]; sac = new complex<double>*[2]; fsacm = new complex<double>*[2]; for (int fi = 0; fi < 2; fi++) { - fsac[fi] = new complex<double>[2]; - sac[fi] = new complex<double>[2]; - fsacm[fi] = new complex<double>[2]; + fsac[fi] = new complex<double>[2](); + sac[fi] = new complex<double>[2](); + fsacm[fi] = new complex<double>[2](); } - scscp = new complex<double>[2]; - ecscp = new complex<double>[2]; - scscpm = new complex<double>[2]; - ecscpm = new complex<double>[2]; + scscp = new complex<double>[2](); + ecscp = new complex<double>[2](); + scscpm = new complex<double>[2](); + ecscpm = new complex<double>[2](); allocate_vectors(c4); - sscs = new double[nsph]; + sscs = new double[nsph](); } C1_AddOns::~C1_AddOns() {