git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12994 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2015-01-27 23:55:36 +00:00
parent 35f215936e
commit 94cd2118c7
6 changed files with 32 additions and 6 deletions

View File

@ -116,10 +116,14 @@ void ComputeTempAsphere::init()
error->all(FLERR,"Bias compute does not calculate a velocity bias"); error->all(FLERR,"Bias compute does not calculate a velocity bias");
if (tbias->igroup != igroup) if (tbias->igroup != igroup)
error->all(FLERR,"Bias compute group does not match compute group"); error->all(FLERR,"Bias compute group does not match compute group");
tbias->init();
tbias->setup();
if (strcmp(tbias->style,"temp/region") == 0) tempbias = 2; if (strcmp(tbias->style,"temp/region") == 0) tempbias = 2;
else tempbias = 1; else tempbias = 1;
// init and setup bias compute because
// this compute's setup()->dof_compute() may be called first
tbias->init();
tbias->setup();
} }
} }

View File

@ -629,7 +629,7 @@ int Comm::binary(double value, int n, double *vec)
if self=1 (default), then callback() is invoked on final iteration if self=1 (default), then callback() is invoked on final iteration
using original inbuf, which may have been updated using original inbuf, which may have been updated
for non-NULL outbuf, final updated inbuf is copied to it for non-NULL outbuf, final updated inbuf is copied to it
outbuf = inbuf is OK ok to specify outbuf = inbuf
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
void Comm::ring(int n, int nper, void *inbuf, int messtag, void Comm::ring(int n, int nper, void *inbuf, int messtag,

View File

@ -97,10 +97,14 @@ void ComputeTempSphere::init()
error->all(FLERR,"Bias compute does not calculate a velocity bias"); error->all(FLERR,"Bias compute does not calculate a velocity bias");
if (tbias->igroup != igroup) if (tbias->igroup != igroup)
error->all(FLERR,"Bias compute group does not match compute group"); error->all(FLERR,"Bias compute group does not match compute group");
tbias->init();
tbias->setup();
if (strcmp(tbias->style,"temp/region") == 0) tempbias = 2; if (strcmp(tbias->style,"temp/region") == 0) tempbias = 2;
else tempbias = 1; else tempbias = 1;
// init and setup bias compute because
// this compute's setup()->dof_compute() may be called first
tbias->init();
tbias->setup();
} }
} }

View File

@ -28,6 +28,8 @@ FixStore::FixStore(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
{ {
if (narg != 5) error->all(FLERR,"Illegal fix store command"); if (narg != 5) error->all(FLERR,"Illegal fix store command");
create_attribute = 1;
// syntax: id group style 0/1 nvalue // syntax: id group style 0/1 nvalue
// 0/1 flag = not-store or store values in restart file // 0/1 flag = not-store or store values in restart file
@ -189,3 +191,17 @@ int FixStore::size_restart(int nlocal)
{ {
return nvalues+1; return nvalues+1;
} }
/* ----------------------------------------------------------------------
initialize one atom's vector/array values, called when atom is created
value of 0.0 may not be desired value, but will be unitialized otherwise
e.g. by compute msd on group all
------------------------------------------------------------------------- */
void FixStore::set_arrays(int i)
{
if (vecflag)
vstore[i] = 0.0;
else
for (int m = 0; m < nvalues; m++) astore[i][m] = 0.0;
}

View File

@ -42,6 +42,7 @@ class FixStore : public Fix {
void unpack_restart(int, int); void unpack_restart(int, int);
int size_restart(int); int size_restart(int);
int maxsize_restart(); int maxsize_restart();
void set_arrays(int);
private: private:
int nvalues; // total # of values per atom int nvalues; // total # of values per atom

View File

@ -249,7 +249,8 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
// sum of procs in all worlds must equal total # of procs // sum of procs in all worlds must equal total # of procs
if (!universe->consistent()) if (!universe->consistent())
error->universe_all(FLERR,"Processor partitions are inconsistent"); error->universe_all(FLERR,"Processor partitions do not match "
"number of allocated processors");
// universe cannot use stdin for input file // universe cannot use stdin for input file