From cc7538e7b92c4f7f99a778f5c5b0e9963c523c0e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 22 Jun 2021 13:14:24 -0400 Subject: [PATCH] fix cut-n-paste bug in AtomVec class --- src/atom_vec.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index dd13cf3ae0..5ebaf41ebb 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -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++)