From 4fb6be14680c8468201c10f2359b45a3c3576f37 Mon Sep 17 00:00:00 2001 From: sjplimp <sjplimp@f3b2605a-c512-4ea7-a41b-209d697bcdaa> Date: Tue, 19 May 2009 15:01:02 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2824 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/atom.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/atom.cpp b/src/atom.cpp index 9e1b39e044..c224ff6fd2 100644 --- a/src/atom.cpp +++ b/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"); } }