forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8188 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
78f1a06ea6
commit
8af0a6a14c
|
@ -1222,6 +1222,26 @@ void Domain::print_box(const char *str)
|
|||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
format boundary string for output
|
||||
assume str is 9 chars or more in length
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Domain::boundary_string(char *str)
|
||||
{
|
||||
int m = 0;
|
||||
for (int idim = 0; idim < 3; idim++) {
|
||||
for (int iside = 0; iside < 2; iside++) {
|
||||
if (boundary[idim][iside] == 0) str[m++] = 'p';
|
||||
else if (boundary[idim][iside] == 1) str[m++] = 'f';
|
||||
else if (boundary[idim][iside] == 2) str[m++] = 's';
|
||||
else if (boundary[idim][iside] == 3) str[m++] = 'm';
|
||||
}
|
||||
str[m++] = ' ';
|
||||
}
|
||||
str[8] = '\0';
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
convert triclinic 0-1 lamda coords to box coords for all N atoms
|
||||
x = H lamda + x0;
|
||||
|
|
|
@ -110,6 +110,7 @@ class Domain : protected Pointers {
|
|||
int find_region(char *);
|
||||
void set_boundary(int, char **, int);
|
||||
void print_box(const char *);
|
||||
void boundary_string(char *);
|
||||
|
||||
virtual void lamda2x(int);
|
||||
virtual void x2lamda(int);
|
||||
|
|
|
@ -59,17 +59,7 @@ void DumpAtom::init_style()
|
|||
|
||||
// setup boundary string
|
||||
|
||||
int m = 0;
|
||||
for (int idim = 0; idim < 3; idim++) {
|
||||
for (int iside = 0; iside < 2; iside++) {
|
||||
if (domain->boundary[idim][iside] == 0) boundstr[m++] = 'p';
|
||||
else if (domain->boundary[idim][iside] == 1) boundstr[m++] = 'f';
|
||||
else if (domain->boundary[idim][iside] == 2) boundstr[m++] = 's';
|
||||
else if (domain->boundary[idim][iside] == 3) boundstr[m++] = 'm';
|
||||
}
|
||||
boundstr[m++] = ' ';
|
||||
}
|
||||
boundstr[8] = '\0';
|
||||
domain->boundary_string(boundstr);
|
||||
|
||||
// setup column string
|
||||
|
||||
|
|
|
@ -218,17 +218,7 @@ void DumpCustom::init_style()
|
|||
|
||||
// setup boundary string
|
||||
|
||||
int m = 0;
|
||||
for (int idim = 0; idim < 3; idim++) {
|
||||
for (int iside = 0; iside < 2; iside++) {
|
||||
if (domain->boundary[idim][iside] == 0) boundstr[m++] = 'p';
|
||||
else if (domain->boundary[idim][iside] == 1) boundstr[m++] = 'f';
|
||||
else if (domain->boundary[idim][iside] == 2) boundstr[m++] = 's';
|
||||
else if (domain->boundary[idim][iside] == 3) boundstr[m++] = 'm';
|
||||
}
|
||||
boundstr[m++] = ' ';
|
||||
}
|
||||
boundstr[8] = '\0';
|
||||
domain->boundary_string(boundstr);
|
||||
|
||||
// setup function ptrs
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
|
|
@ -1606,7 +1606,8 @@ void Neighbor::modify_params(int narg, char **arg)
|
|||
error->all(FLERR,"Invalid group ID in neigh_modify command");
|
||||
if (includegroup && (atom->firstgroupname == NULL ||
|
||||
strcmp(arg[iarg+1],atom->firstgroupname) != 0))
|
||||
error->all(FLERR,"Neigh_modify include group != atom_modify first group");
|
||||
error->all(FLERR,
|
||||
"Neigh_modify include group != atom_modify first group");
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"exclude") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal neigh_modify command");
|
||||
|
|
|
@ -360,13 +360,17 @@ void Update::reset_timestep(int narg, char **arg)
|
|||
|
||||
for (int i = 0; i < output->ndump; i++)
|
||||
if (output->last_dump[i] >= 0)
|
||||
error->all(FLERR,"Cannot reset timestep with dump file already written to");
|
||||
error->all(FLERR,
|
||||
"Cannot reset timestep with dump file already written to");
|
||||
|
||||
if (output->restart && output->last_restart >= 0)
|
||||
error->all(FLERR,"Cannot reset timestep with restart file already written");
|
||||
error->all(FLERR,
|
||||
"Cannot reset timestep with restart file already written");
|
||||
|
||||
for (int i = 0; i < modify->nfix; i++)
|
||||
if (modify->fix[i]->time_depend)
|
||||
error->all(FLERR,"Cannot reset timestep with a time-dependent fix defined");
|
||||
error->all(FLERR,
|
||||
"Cannot reset timestep with a time-dependent fix defined");
|
||||
|
||||
for (int i = 0; i < domain->nregion; i++)
|
||||
if (domain->regions[i]->dynamic_check())
|
||||
|
|
Loading…
Reference in New Issue