fix cut-n-paste bug in AtomVec class

This commit is contained in:
Axel Kohlmeyer
2021-06-22 13:14:24 -04:00
parent 8f60a54656
commit cc7538e7b9

View File

@ -1471,8 +1471,8 @@ int AtomVec::pack_restart(int i, double *buf)
buf[m++] = array[i][mm];
} else {
double **array = *((double ***) pdata);
collength = mexchange.collength[nn];
plength = mexchange.plength[nn];
collength = mrestart.collength[nn];
plength = mrestart.plength[nn];
if (collength) ncols = (*((int ***) plength))[i][collength-1];
else ncols = (*((int **) plength))[i];
for (mm = 0; mm < ncols; mm++)
@ -1488,8 +1488,8 @@ int AtomVec::pack_restart(int i, double *buf)
buf[m++] = ubuf(array[i][mm]).d;
} else {
int **array = *((int ***) pdata);
collength = mexchange.collength[nn];
plength = mexchange.plength[nn];
collength = mrestart.collength[nn];
plength = mrestart.plength[nn];
if (collength) ncols = (*((int ***) plength))[i][collength-1];
else ncols = (*((int **) plength))[i];
for (mm = 0; mm < ncols; mm++)
@ -1505,8 +1505,8 @@ int AtomVec::pack_restart(int i, double *buf)
buf[m++] = ubuf(array[i][mm]).d;
} else {
bigint **array = *((bigint ***) pdata);
collength = mexchange.collength[nn];
plength = mexchange.plength[nn];
collength = mrestart.collength[nn];
plength = mrestart.plength[nn];
if (collength) ncols = (*((int ***) plength))[i][collength-1];
else ncols = (*((int **) plength))[i];
for (mm = 0; mm < ncols; mm++)
@ -1572,8 +1572,8 @@ int AtomVec::unpack_restart(double *buf)
array[nlocal][mm] = buf[m++];
} else {
double **array = *((double ***) pdata);
collength = mexchange.collength[nn];
plength = mexchange.plength[nn];
collength = mrestart.collength[nn];
plength = mrestart.plength[nn];
if (collength) ncols = (*((int ***) plength))[nlocal][collength-1];
else ncols = (*((int **) plength))[nlocal];
for (mm = 0; mm < ncols; mm++)
@ -1589,8 +1589,8 @@ int AtomVec::unpack_restart(double *buf)
array[nlocal][mm] = (int) ubuf(buf[m++]).i;
} else {
int **array = *((int ***) pdata);
collength = mexchange.collength[nn];
plength = mexchange.plength[nn];
collength = mrestart.collength[nn];
plength = mrestart.plength[nn];
if (collength) ncols = (*((int ***) plength))[nlocal][collength-1];
else ncols = (*((int **) plength))[nlocal];
for (mm = 0; mm < ncols; mm++)
@ -1606,8 +1606,8 @@ int AtomVec::unpack_restart(double *buf)
array[nlocal][mm] = (bigint) ubuf(buf[m++]).i;
} else {
bigint **array = *((bigint ***) pdata);
collength = mexchange.collength[nn];
plength = mexchange.plength[nn];
collength = mrestart.collength[nn];
plength = mrestart.plength[nn];
if (collength) ncols = (*((int ***) plength))[nlocal][collength-1];
else ncols = (*((int **) plength))[nlocal];
for (mm = 0; mm < ncols; mm++)