fix cut-n-paste bug in AtomVec class
This commit is contained in:
@ -1471,8 +1471,8 @@ int AtomVec::pack_restart(int i, double *buf)
|
|||||||
buf[m++] = array[i][mm];
|
buf[m++] = array[i][mm];
|
||||||
} else {
|
} else {
|
||||||
double **array = *((double ***) pdata);
|
double **array = *((double ***) pdata);
|
||||||
collength = mexchange.collength[nn];
|
collength = mrestart.collength[nn];
|
||||||
plength = mexchange.plength[nn];
|
plength = mrestart.plength[nn];
|
||||||
if (collength) ncols = (*((int ***) plength))[i][collength-1];
|
if (collength) ncols = (*((int ***) plength))[i][collength-1];
|
||||||
else ncols = (*((int **) plength))[i];
|
else ncols = (*((int **) plength))[i];
|
||||||
for (mm = 0; mm < ncols; mm++)
|
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;
|
buf[m++] = ubuf(array[i][mm]).d;
|
||||||
} else {
|
} else {
|
||||||
int **array = *((int ***) pdata);
|
int **array = *((int ***) pdata);
|
||||||
collength = mexchange.collength[nn];
|
collength = mrestart.collength[nn];
|
||||||
plength = mexchange.plength[nn];
|
plength = mrestart.plength[nn];
|
||||||
if (collength) ncols = (*((int ***) plength))[i][collength-1];
|
if (collength) ncols = (*((int ***) plength))[i][collength-1];
|
||||||
else ncols = (*((int **) plength))[i];
|
else ncols = (*((int **) plength))[i];
|
||||||
for (mm = 0; mm < ncols; mm++)
|
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;
|
buf[m++] = ubuf(array[i][mm]).d;
|
||||||
} else {
|
} else {
|
||||||
bigint **array = *((bigint ***) pdata);
|
bigint **array = *((bigint ***) pdata);
|
||||||
collength = mexchange.collength[nn];
|
collength = mrestart.collength[nn];
|
||||||
plength = mexchange.plength[nn];
|
plength = mrestart.plength[nn];
|
||||||
if (collength) ncols = (*((int ***) plength))[i][collength-1];
|
if (collength) ncols = (*((int ***) plength))[i][collength-1];
|
||||||
else ncols = (*((int **) plength))[i];
|
else ncols = (*((int **) plength))[i];
|
||||||
for (mm = 0; mm < ncols; mm++)
|
for (mm = 0; mm < ncols; mm++)
|
||||||
@ -1572,8 +1572,8 @@ int AtomVec::unpack_restart(double *buf)
|
|||||||
array[nlocal][mm] = buf[m++];
|
array[nlocal][mm] = buf[m++];
|
||||||
} else {
|
} else {
|
||||||
double **array = *((double ***) pdata);
|
double **array = *((double ***) pdata);
|
||||||
collength = mexchange.collength[nn];
|
collength = mrestart.collength[nn];
|
||||||
plength = mexchange.plength[nn];
|
plength = mrestart.plength[nn];
|
||||||
if (collength) ncols = (*((int ***) plength))[nlocal][collength-1];
|
if (collength) ncols = (*((int ***) plength))[nlocal][collength-1];
|
||||||
else ncols = (*((int **) plength))[nlocal];
|
else ncols = (*((int **) plength))[nlocal];
|
||||||
for (mm = 0; mm < ncols; mm++)
|
for (mm = 0; mm < ncols; mm++)
|
||||||
@ -1589,8 +1589,8 @@ int AtomVec::unpack_restart(double *buf)
|
|||||||
array[nlocal][mm] = (int) ubuf(buf[m++]).i;
|
array[nlocal][mm] = (int) ubuf(buf[m++]).i;
|
||||||
} else {
|
} else {
|
||||||
int **array = *((int ***) pdata);
|
int **array = *((int ***) pdata);
|
||||||
collength = mexchange.collength[nn];
|
collength = mrestart.collength[nn];
|
||||||
plength = mexchange.plength[nn];
|
plength = mrestart.plength[nn];
|
||||||
if (collength) ncols = (*((int ***) plength))[nlocal][collength-1];
|
if (collength) ncols = (*((int ***) plength))[nlocal][collength-1];
|
||||||
else ncols = (*((int **) plength))[nlocal];
|
else ncols = (*((int **) plength))[nlocal];
|
||||||
for (mm = 0; mm < ncols; mm++)
|
for (mm = 0; mm < ncols; mm++)
|
||||||
@ -1606,8 +1606,8 @@ int AtomVec::unpack_restart(double *buf)
|
|||||||
array[nlocal][mm] = (bigint) ubuf(buf[m++]).i;
|
array[nlocal][mm] = (bigint) ubuf(buf[m++]).i;
|
||||||
} else {
|
} else {
|
||||||
bigint **array = *((bigint ***) pdata);
|
bigint **array = *((bigint ***) pdata);
|
||||||
collength = mexchange.collength[nn];
|
collength = mrestart.collength[nn];
|
||||||
plength = mexchange.plength[nn];
|
plength = mrestart.plength[nn];
|
||||||
if (collength) ncols = (*((int ***) plength))[nlocal][collength-1];
|
if (collength) ncols = (*((int ***) plength))[nlocal][collength-1];
|
||||||
else ncols = (*((int **) plength))[nlocal];
|
else ncols = (*((int **) plength))[nlocal];
|
||||||
for (mm = 0; mm < ncols; mm++)
|
for (mm = 0; mm < ncols; mm++)
|
||||||
|
|||||||
Reference in New Issue
Block a user