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

Make c1ao->am0m matrix contiguous

parent e411a537
No related branches found
No related tags found
No related merge requests found
......@@ -266,6 +266,8 @@ public:
//! \brief QUESTION: definition?
dcomplex **am0m;
//! \brief QUESTION: definition?
dcomplex *am0v;
//! \brief QUESTION: definition?
dcomplex *vintm;
//! \brief QUESTION: definition?
dcomplex *vintt;
......
......@@ -225,9 +225,10 @@ C1_AddOns::C1_AddOns(C4 *c4) {
vj = new dcomplex[1]();
vyhj = new dcomplex[(nsph * nsph - 1) * litpos]();
vyj0 = new dcomplex[nsph * lmtpos]();
am0v = new dcomplex[nlemt * nlemt]();
am0m = new dcomplex*[nlemt];
for (int ai = 0; ai < nlemt; ai++) {
am0m[ai] = new dcomplex[nlemt]();
am0m[ai] = (am0v + nlemt * ai);
}
vintm = new dcomplex[16]();
vintt = new dcomplex[16]();
......@@ -279,10 +280,11 @@ C1_AddOns::C1_AddOns(const C1_AddOns& rhs) {
int vyj0size = nsph * lmtpos;
vyj0 = new dcomplex[vyj0size]();
for (int hi=0; hi<vyj0size; hi++) vyj0[hi] = rhs.vyj0[hi];
am0v = new dcomplex[nlemt * nlemt]();
am0m = new dcomplex*[nlemt];
for (int ai = 0; ai < nlemt; ai++) {
am0m[ai] = new dcomplex[nlemt]();
for (int aj = 0; aj < nlemt; aj++) am0m[ai][aj] = rhs.am0m[ai][aj];
for (int aj = 0; aj < nlemt; aj++) am0v[nlemt * ai + aj] = rhs.am0v[nlemt * ai + aj];
am0m[ai] = (am0v + nlemt * ai);
}
vintm = new dcomplex[16]();
vintt = new dcomplex[16]();
......@@ -342,10 +344,8 @@ C1_AddOns::~C1_AddOns() {
delete[] vh;
delete[] vj0;
delete[] vj;
for (int ai = nlemt - 1; ai > -1; ai--) {
delete[] am0m[ai];
}
delete[] am0m;
delete[] am0v;
delete[] vintm;
delete[] vintt;
for (int fi = 1; fi > -1; fi--) {
......
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