since nfirst stores the timestep, it must be a bigint
This commit is contained in:
@ -833,7 +833,7 @@ void FixDeposit::write_restart(FILE *fp)
|
||||
double list[5];
|
||||
list[n++] = random->state();
|
||||
list[n++] = ninserted;
|
||||
list[n++] = nfirst;
|
||||
list[n++] = ubuf(nfirst).d;
|
||||
list[n++] = ubuf(next_reneighbor).d;
|
||||
list[n++] = ubuf(update->ntimestep).d;
|
||||
|
||||
@ -853,12 +853,12 @@ void FixDeposit::restart(char *buf)
|
||||
int n = 0;
|
||||
double *list = (double *) buf;
|
||||
|
||||
seed = static_cast<int> (list[n++]);
|
||||
ninserted = static_cast<int> (list[n++]);
|
||||
nfirst = static_cast<int> (list[n++]);
|
||||
next_reneighbor = (bigint) ubuf(list[n++]).i;
|
||||
seed = static_cast<int>(list[n++]);
|
||||
ninserted = static_cast<int>(list[n++]);
|
||||
nfirst = static_cast<bigint>(ubuf(list[n++]).i);
|
||||
next_reneighbor = static_cast<bigint>(ubuf(list[n++]).i);
|
||||
|
||||
bigint ntimestep_restart = (bigint) ubuf(list[n++]).i;
|
||||
bigint ntimestep_restart = static_cast<bigint>(ubuf(list[n++]).i);
|
||||
if (ntimestep_restart != update->ntimestep)
|
||||
error->all(FLERR,"Must not reset timestep when restarting this fix");
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ class FixDeposit : public Fix {
|
||||
~FixDeposit();
|
||||
int setmask();
|
||||
void init();
|
||||
void setup_pre_exchange();
|
||||
void pre_exchange();
|
||||
void write_restart(FILE *);
|
||||
void restart(char *);
|
||||
@ -54,7 +55,8 @@ class FixDeposit : public Fix {
|
||||
class Fix *fixrigid,*fixshake;
|
||||
double oneradius;
|
||||
|
||||
int nfirst,ninserted;
|
||||
int ninserted;
|
||||
bigint nfirst;
|
||||
tagint maxtag_all,maxmol_all;
|
||||
class RanPark *random;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user