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];
|
||||
} 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++)
|
||||
|
||||
Reference in New Issue
Block a user