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

This commit is contained in:
sjplimp
2009-06-26 18:23:16 +00:00
parent 3df8b6e355
commit 2d5a69385a
32 changed files with 2015 additions and 781 deletions

View File

@ -1124,17 +1124,15 @@ void Atom::set_shape(const char *str)
shape[itype][2] = 0.5*c;
shape_setflag[itype] = 1;
if (shape[itype][0] < 0.0 || shape[itype][1] < 0.0 || shape[itype][2] < 0.0)
error->all("Invalid shape value");
if (shape[itype][0] == 0.0 &&
(shape[itype][1] != 0.0 || shape[itype][2] != 0.0))
error->all("Invalid shape value");
if (shape[itype][1] == 0.0 &&
(shape[itype][0] != 0.0 || shape[itype][2] != 0.0))
error->all("Invalid shape value");
if (shape[itype][2] == 0.0 &&
(shape[itype][0] != 0.0 || shape[itype][1] != 0.0))
if (shape[itype][0] < 0.0 || shape[itype][1] < 0.0 ||
shape[itype][2] < 0.0)
error->all("Invalid shape value");
if (shape[itype][0] > 0.0 || shape[itype][1] > 0.0 ||
shape[itype][2] > 0.0) {
if (shape[itype][0] == 0.0 || shape[itype][1] == 0.0 ||
shape[itype][2] == 0.0)
error->all("Invalid shape value");
}
}
/* ----------------------------------------------------------------------
@ -1159,18 +1157,15 @@ void Atom::set_shape(int narg, char **arg)
shape[itype][2] = 0.5*atof(arg[3]);
shape_setflag[itype] = 1;
if (shape[itype][0] < 0.0 || shape[itype][1] < 0.0 ||
if (shape[itype][0] < 0.0 || shape[itype][1] < 0.0 ||
shape[itype][2] < 0.0)
error->all("Invalid shape value");
if (shape[itype][0] == 0.0 &&
(shape[itype][1] != 0.0 || shape[itype][2] != 0.0))
error->all("Invalid shape value");
if (shape[itype][1] == 0.0 &&
(shape[itype][0] != 0.0 || shape[itype][2] != 0.0))
error->all("Invalid shape value");
if (shape[itype][2] == 0.0 &&
(shape[itype][0] != 0.0 || shape[itype][1] != 0.0))
error->all("Invalid shape value");
if (shape[itype][0] > 0.0 || shape[itype][1] > 0.0 ||
shape[itype][2] > 0.0) {
if (shape[itype][0] == 0.0 || shape[itype][1] == 0.0 ||
shape[itype][2] == 0.0)
error->all("Invalid shape value");
}
}
}