git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2824 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
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)
|
if (shape[itype][0] < 0.0 || shape[itype][1] < 0.0 || shape[itype][2] < 0.0)
|
||||||
error->all("Invalid shape value");
|
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 ||
|
if (shape[itype][0] < 0.0 || shape[itype][1] < 0.0 ||
|
||||||
shape[itype][2] < 0.0)
|
shape[itype][2] < 0.0)
|
||||||
error->all("Invalid shape value");
|
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user