From 80a3baf36c0947ce4e777f8df56c591957e49ea2 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 24 Jun 2008 23:24:37 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1927 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/fix_thermal_conductivity.cpp | 6 +++--- src/fix_viscosity.cpp | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/fix_thermal_conductivity.cpp b/src/fix_thermal_conductivity.cpp index 8b46ff807e..5be5ed0ae4 100644 --- a/src/fix_thermal_conductivity.cpp +++ b/src/fix_thermal_conductivity.cpp @@ -51,7 +51,8 @@ FixThermalConductivity::FixThermalConductivity(LAMMPS *lmp, else error->all("Illegal fix thermal/conductivity command"); nbin = atoi(arg[5]); - if (nbin < 3) error->all("Illegal fix thermal/conductivity command"); + if (nbin % 2 || nbin <= 2) + error->all("Illegal fix thermal/conductivity command"); // optional keywords @@ -105,8 +106,7 @@ void FixThermalConductivity::init() // set bounds of 2 slabs in edim // only necessary for static box, else re-computed in end_of_step() // lo bin is always bottom bin - // if nbin even, hi bin is just above half height - // if nbin odd, hi bin straddles half height + // hi bin is just above half height if (domain->box_change == 0) { prd = domain->prd[edim]; diff --git a/src/fix_viscosity.cpp b/src/fix_viscosity.cpp index cd29ac85ff..39a8936fb5 100644 --- a/src/fix_viscosity.cpp +++ b/src/fix_viscosity.cpp @@ -56,7 +56,7 @@ FixViscosity::FixViscosity(LAMMPS *lmp, int narg, char **arg) : else error->all("Illegal fix viscosity command"); nbin = atoi(arg[6]); - if (nbin < 3) error->all("Illegal fix viscosity command"); + if (nbin % 2 || nbin <= 2) error->all("Illegal fix viscosity command"); // optional keywords @@ -116,8 +116,7 @@ void FixViscosity::init() // set bounds of 2 slabs in pdim // only necessary for static box, else re-computed in end_of_step() // lo bin is always bottom bin - // if nbin even, hi bin is just above half height - // if nbin odd, hi bin straddles half height + // hi bin is just above half height if (domain->box_change == 0) { prd = domain->prd[pdim];