Added cautionary comments
This commit is contained in:
4
src/GRANULAR/fix_wall_gran.cpp
Normal file → Executable file
4
src/GRANULAR/fix_wall_gran.cpp
Normal file → Executable file
@ -1541,6 +1541,7 @@ int FixWallGran::pack_restart(int i, double *buf)
|
|||||||
if (!use_history) return 0;
|
if (!use_history) return 0;
|
||||||
|
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[n++] = size_history + 1;
|
buf[n++] = size_history + 1;
|
||||||
for (int m = 0; m < size_history; m++)
|
for (int m = 0; m < size_history; m++)
|
||||||
buf[n++] = history_one[i][m];
|
buf[n++] = history_one[i][m];
|
||||||
@ -1558,7 +1559,8 @@ void FixWallGran::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
m++;
|
m++;
|
||||||
|
|||||||
4
src/GRANULAR/fix_wall_gran_region.cpp
Normal file → Executable file
4
src/GRANULAR/fix_wall_gran_region.cpp
Normal file → Executable file
@ -479,6 +479,7 @@ int FixWallGranRegion::pack_restart(int i, double *buf)
|
|||||||
for (m = 0; m < size_history; m++)
|
for (m = 0; m < size_history; m++)
|
||||||
buf[n++] = history_many[i][iwall][m];
|
buf[n++] = history_many[i][iwall][m];
|
||||||
}
|
}
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = n;
|
buf[0] = n;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
@ -496,7 +497,8 @@ void FixWallGranRegion::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
m++;
|
m++;
|
||||||
|
|||||||
4
src/MISC/fix_gld.cpp
Normal file → Executable file
4
src/MISC/fix_gld.cpp
Normal file → Executable file
@ -547,6 +547,7 @@ int FixGLD::unpack_exchange(int nlocal, double *buf)
|
|||||||
int FixGLD::pack_restart(int i, double *buf)
|
int FixGLD::pack_restart(int i, double *buf)
|
||||||
{
|
{
|
||||||
int m = 0;
|
int m = 0;
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[m++] = 3*prony_terms + 1;
|
buf[m++] = 3*prony_terms + 1;
|
||||||
for (int k = 0; k < 3*prony_terms; k=k+3)
|
for (int k = 0; k < 3*prony_terms; k=k+3)
|
||||||
{
|
{
|
||||||
@ -566,7 +567,8 @@ void FixGLD::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to the nth set of extended variables
|
// skip to the nth set of extended variables
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i< nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i< nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
m++;
|
m++;
|
||||||
|
|||||||
4
src/MISC/fix_ttm.cpp
Normal file → Executable file
4
src/MISC/fix_ttm.cpp
Normal file → Executable file
@ -656,6 +656,7 @@ void FixTTM::restart(char *buf)
|
|||||||
|
|
||||||
int FixTTM::pack_restart(int i, double *buf)
|
int FixTTM::pack_restart(int i, double *buf)
|
||||||
{
|
{
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = 4;
|
buf[0] = 4;
|
||||||
buf[1] = flangevin[i][0];
|
buf[1] = flangevin[i][0];
|
||||||
buf[2] = flangevin[i][1];
|
buf[2] = flangevin[i][1];
|
||||||
@ -672,7 +673,8 @@ void FixTTM::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
m++;
|
m++;
|
||||||
|
|||||||
4
src/MOLECULE/fix_cmap.cpp
Normal file → Executable file
4
src/MOLECULE/fix_cmap.cpp
Normal file → Executable file
@ -1291,6 +1291,7 @@ int FixCMAP::pack_restart(int i, double *buf)
|
|||||||
buf[n++] = ubuf(crossterm_atom4[i][m]).d;
|
buf[n++] = ubuf(crossterm_atom4[i][m]).d;
|
||||||
buf[n++] = ubuf(crossterm_atom5[i][m]).d;
|
buf[n++] = ubuf(crossterm_atom5[i][m]).d;
|
||||||
}
|
}
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = n;
|
buf[0] = n;
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
@ -1305,7 +1306,8 @@ void FixCMAP::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for (int i = 0; i < nth; i++) n += static_cast<int> (extra[nlocal][n]);
|
for (int i = 0; i < nth; i++) n += static_cast<int> (extra[nlocal][n]);
|
||||||
|
|
||||||
|
|||||||
@ -579,6 +579,7 @@ void FixPeriNeigh::restart(char *buf)
|
|||||||
int FixPeriNeigh::pack_restart(int i, double *buf)
|
int FixPeriNeigh::pack_restart(int i, double *buf)
|
||||||
{
|
{
|
||||||
int m = 0;
|
int m = 0;
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
if (isVES) buf[m++] = 4*npartner[i] + 4;
|
if (isVES) buf[m++] = 4*npartner[i] + 4;
|
||||||
else if (isEPS) buf[m++] = 3*npartner[i] + 5;
|
else if (isEPS) buf[m++] = 3*npartner[i] + 5;
|
||||||
else buf[m++] = 2*npartner[i] + 4;
|
else buf[m++] = 2*npartner[i] + 4;
|
||||||
@ -608,6 +609,7 @@ void FixPeriNeigh::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
|
|||||||
0
src/USER-ATC/fix_atc.cpp
Normal file → Executable file
0
src/USER-ATC/fix_atc.cpp
Normal file → Executable file
4
src/USER-MISC/fix_gle.cpp
Normal file → Executable file
4
src/USER-MISC/fix_gle.cpp
Normal file → Executable file
@ -822,6 +822,7 @@ int FixGLE::unpack_exchange(int nlocal, double *buf)
|
|||||||
int FixGLE::pack_restart(int i, double *buf)
|
int FixGLE::pack_restart(int i, double *buf)
|
||||||
{
|
{
|
||||||
int m = 0;
|
int m = 0;
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[m++] = 3*ns + 1;
|
buf[m++] = 3*ns + 1;
|
||||||
for (int k = 0; k < 3*ns; k=k+3)
|
for (int k = 0; k < 3*ns; k=k+3)
|
||||||
{
|
{
|
||||||
@ -841,7 +842,8 @@ void FixGLE::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to the nth set of extended variables
|
// skip to the nth set of extended variables
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i< nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i< nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
m++;
|
m++;
|
||||||
|
|||||||
2
src/USER-MISC/fix_pimd.cpp
Normal file → Executable file
2
src/USER-MISC/fix_pimd.cpp
Normal file → Executable file
@ -794,6 +794,7 @@ int FixPIMD::pack_restart(int i, double *buf)
|
|||||||
{
|
{
|
||||||
int offset=0;
|
int offset=0;
|
||||||
int pos = i * 3;
|
int pos = i * 3;
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[offset++] = size_peratom_cols+1;
|
buf[offset++] = size_peratom_cols+1;
|
||||||
|
|
||||||
memcpy(buf+offset, nhc_eta[pos], nhc_size_one_1); offset += nhc_offset_one_1;
|
memcpy(buf+offset, nhc_eta[pos], nhc_size_one_1); offset += nhc_offset_one_1;
|
||||||
@ -811,6 +812,7 @@ void FixPIMD::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i=0; i<nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i=0; i<nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
|
|||||||
7
src/USER-MISC/fix_srp.cpp
Normal file → Executable file
7
src/USER-MISC/fix_srp.cpp
Normal file → Executable file
@ -555,6 +555,7 @@ void FixSRP::post_run()
|
|||||||
int FixSRP::pack_restart(int i, double *buf)
|
int FixSRP::pack_restart(int i, double *buf)
|
||||||
{
|
{
|
||||||
int m = 0;
|
int m = 0;
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[m++] = 3;
|
buf[m++] = 3;
|
||||||
buf[m++] = array[i][0];
|
buf[m++] = array[i][0];
|
||||||
buf[m++] = array[i][1];
|
buf[m++] = array[i][1];
|
||||||
@ -569,10 +570,12 @@ void FixSRP::unpack_restart(int nlocal, int nth)
|
|||||||
{
|
{
|
||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++){
|
for (int i = 0; i < nth; i++){
|
||||||
m += extra[nlocal][m];
|
m += static_cast<int> (extra[nlocal][m]);
|
||||||
}
|
}
|
||||||
|
|
||||||
m++;
|
m++;
|
||||||
|
|||||||
3
src/USER-MISC/fix_ti_spring.cpp
Normal file → Executable file
3
src/USER-MISC/fix_ti_spring.cpp
Normal file → Executable file
@ -315,7 +315,7 @@ int FixTISpring::unpack_exchange(int nlocal, double *buf)
|
|||||||
|
|
||||||
int FixTISpring::pack_restart(int i, double *buf)
|
int FixTISpring::pack_restart(int i, double *buf)
|
||||||
{
|
{
|
||||||
buf[0] = 4;
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[1] = xoriginal[i][0];
|
buf[1] = xoriginal[i][0];
|
||||||
buf[2] = xoriginal[i][1];
|
buf[2] = xoriginal[i][1];
|
||||||
buf[3] = xoriginal[i][2];
|
buf[3] = xoriginal[i][2];
|
||||||
@ -331,6 +331,7 @@ void FixTISpring::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
|
|||||||
2
src/USER-MISC/fix_ttm_mod.cpp
Normal file → Executable file
2
src/USER-MISC/fix_ttm_mod.cpp
Normal file → Executable file
@ -980,6 +980,7 @@ void FixTTMMod::restart(char *buf)
|
|||||||
|
|
||||||
int FixTTMMod::pack_restart(int i, double *buf)
|
int FixTTMMod::pack_restart(int i, double *buf)
|
||||||
{
|
{
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = 4;
|
buf[0] = 4;
|
||||||
buf[1] = flangevin[i][0];
|
buf[1] = flangevin[i][0];
|
||||||
buf[2] = flangevin[i][1];
|
buf[2] = flangevin[i][1];
|
||||||
@ -996,6 +997,7 @@ void FixTTMMod::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
|
|||||||
2
src/USER-SDPD/fix_meso_move.cpp
Normal file → Executable file
2
src/USER-SDPD/fix_meso_move.cpp
Normal file → Executable file
@ -948,6 +948,7 @@ int FixMesoMove::unpack_exchange (int nlocal, double *buf) {
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int FixMesoMove::pack_restart (int i, double *buf) {
|
int FixMesoMove::pack_restart (int i, double *buf) {
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = 4;
|
buf[0] = 4;
|
||||||
buf[1] = xoriginal[i][0];
|
buf[1] = xoriginal[i][0];
|
||||||
buf[2] = xoriginal[i][1];
|
buf[2] = xoriginal[i][1];
|
||||||
@ -963,6 +964,7 @@ void FixMesoMove::unpack_restart (int nlocal, int nth) {
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
|
|||||||
2
src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp
Normal file → Executable file
2
src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp
Normal file → Executable file
@ -450,6 +450,7 @@ int FixSMD_TLSPH_ReferenceConfiguration::unpack_exchange(int nlocal, double *buf
|
|||||||
|
|
||||||
int FixSMD_TLSPH_ReferenceConfiguration::pack_restart(int i, double *buf) {
|
int FixSMD_TLSPH_ReferenceConfiguration::pack_restart(int i, double *buf) {
|
||||||
int m = 0;
|
int m = 0;
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[m++] = 4 * npartner[i] + 2;
|
buf[m++] = 4 * npartner[i] + 2;
|
||||||
buf[m++] = npartner[i];
|
buf[m++] = npartner[i];
|
||||||
for (int n = 0; n < npartner[i]; n++) {
|
for (int n = 0; n < npartner[i]; n++) {
|
||||||
@ -470,6 +471,7 @@ void FixSMD_TLSPH_ReferenceConfiguration::unpack_restart(int /*nlocal*/, int /*n
|
|||||||
// ipage = NULL if being called from granular pair style init()
|
// ipage = NULL if being called from granular pair style init()
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
// double **extra = atom->extra;
|
// double **extra = atom->extra;
|
||||||
//
|
//
|
||||||
|
|||||||
2
src/fix_move.cpp
Normal file → Executable file
2
src/fix_move.cpp
Normal file → Executable file
@ -1193,6 +1193,7 @@ int FixMove::pack_restart(int i, double *buf)
|
|||||||
buf[n++] = qoriginal[i][2];
|
buf[n++] = qoriginal[i][2];
|
||||||
buf[n++] = qoriginal[i][3];
|
buf[n++] = qoriginal[i][3];
|
||||||
}
|
}
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = n;
|
buf[0] = n;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
@ -1206,6 +1207,7 @@ void FixMove::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
|
|||||||
2
src/fix_neigh_history.cpp
Normal file → Executable file
2
src/fix_neigh_history.cpp
Normal file → Executable file
@ -853,6 +853,7 @@ int FixNeighHistory::pack_restart(int i, double *buf)
|
|||||||
memcpy(&buf[m],&valuepartner[i][dnum*n],dnumbytes);
|
memcpy(&buf[m],&valuepartner[i][dnum*n],dnumbytes);
|
||||||
m += dnum;
|
m += dnum;
|
||||||
}
|
}
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = m;
|
buf[0] = m;
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
@ -868,6 +869,7 @@ void FixNeighHistory::unpack_restart(int nlocal, int nth)
|
|||||||
if (ipage_atom == NULL) allocate_pages();
|
if (ipage_atom == NULL) allocate_pages();
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
|
|||||||
2
src/fix_property_atom.cpp
Normal file → Executable file
2
src/fix_property_atom.cpp
Normal file → Executable file
@ -579,6 +579,7 @@ int FixPropertyAtom::unpack_exchange(int nlocal, double *buf)
|
|||||||
|
|
||||||
int FixPropertyAtom::pack_restart(int i, double *buf)
|
int FixPropertyAtom::pack_restart(int i, double *buf)
|
||||||
{
|
{
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = nvalue+1;
|
buf[0] = nvalue+1;
|
||||||
|
|
||||||
int m = 1;
|
int m = 1;
|
||||||
@ -602,6 +603,7 @@ void FixPropertyAtom::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
|
|||||||
2
src/fix_spring_self.cpp
Normal file → Executable file
2
src/fix_spring_self.cpp
Normal file → Executable file
@ -264,6 +264,7 @@ int FixSpringSelf::unpack_exchange(int nlocal, double *buf)
|
|||||||
|
|
||||||
int FixSpringSelf::pack_restart(int i, double *buf)
|
int FixSpringSelf::pack_restart(int i, double *buf)
|
||||||
{
|
{
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = 4;
|
buf[0] = 4;
|
||||||
buf[1] = xoriginal[i][0];
|
buf[1] = xoriginal[i][0];
|
||||||
buf[2] = xoriginal[i][1];
|
buf[2] = xoriginal[i][1];
|
||||||
@ -280,6 +281,7 @@ void FixSpringSelf::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
|
|||||||
2
src/fix_store.cpp
Normal file → Executable file
2
src/fix_store.cpp
Normal file → Executable file
@ -280,6 +280,7 @@ int FixStore::pack_restart(int i, double *buf)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = nvalues+1;
|
buf[0] = nvalues+1;
|
||||||
if (vecflag) buf[1] = vstore[i];
|
if (vecflag) buf[1] = vstore[i];
|
||||||
else
|
else
|
||||||
@ -299,6 +300,7 @@ void FixStore::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
|
|||||||
2
src/fix_store_state.cpp
Normal file → Executable file
2
src/fix_store_state.cpp
Normal file → Executable file
@ -611,6 +611,7 @@ int FixStoreState::unpack_exchange(int nlocal, double *buf)
|
|||||||
|
|
||||||
int FixStoreState::pack_restart(int i, double *buf)
|
int FixStoreState::pack_restart(int i, double *buf)
|
||||||
{
|
{
|
||||||
|
// pack buf[0] this way b/c other fixes unpack it
|
||||||
buf[0] = nvalues+1;
|
buf[0] = nvalues+1;
|
||||||
for (int m = 0; m < nvalues; m++) buf[m+1] = values[i][m];
|
for (int m = 0; m < nvalues; m++) buf[m+1] = values[i][m];
|
||||||
return nvalues+1;
|
return nvalues+1;
|
||||||
@ -625,6 +626,7 @@ void FixStoreState::unpack_restart(int nlocal, int nth)
|
|||||||
double **extra = atom->extra;
|
double **extra = atom->extra;
|
||||||
|
|
||||||
// skip to Nth set of extra values
|
// skip to Nth set of extra values
|
||||||
|
// unpack the Nth first values this way b/c other fixes pack them
|
||||||
|
|
||||||
int m = 0;
|
int m = 0;
|
||||||
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
for (int i = 0; i < nth; i++) m += static_cast<int> (extra[nlocal][m]);
|
||||||
|
|||||||
Reference in New Issue
Block a user