mirror of https://github.com/lammps/lammps.git
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2824 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
b6cd5233bd
commit
4fb6be1468
18
src/atom.cpp
18
src/atom.cpp
|
@ -1126,6 +1126,15 @@ void Atom::set_shape(const char *str)
|
|||
|
||||
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");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -1153,6 +1162,15 @@ void Atom::set_shape(int narg, char **arg)
|
|||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue