From 48995a8fc9e4ca8c77d648bb7da382fc6f1ec0cc Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 24 Jun 2008 19:58:37 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1925 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/fix_thermal_conductivity.cpp | 10 +++++----- src/fix_viscosity.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/fix_thermal_conductivity.cpp b/src/fix_thermal_conductivity.cpp index 26d423f7cd..8b46ff807e 100644 --- a/src/fix_thermal_conductivity.cpp +++ b/src/fix_thermal_conductivity.cpp @@ -105,7 +105,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 below half height + // if nbin even, hi bin is just above half height // if nbin odd, hi bin straddles half height if (domain->box_change == 0) { @@ -115,8 +115,8 @@ void FixThermalConductivity::init() double binsize = (boxhi-boxlo) / nbin; slablo_lo = boxlo; slablo_hi = boxlo + binsize; - slabhi_lo = boxlo + ((nbin-1)/2)*binsize; - slabhi_hi = boxlo + ((nbin-1)/2 + 1)*binsize; + slabhi_lo = boxlo + (nbin/2)*binsize; + slabhi_hi = boxlo + (nbin/2+1)*binsize; } periodicity = domain->periodicity[edim]; @@ -143,8 +143,8 @@ void FixThermalConductivity::end_of_step() double binsize = (boxhi-boxlo) / nbin; slablo_lo = boxlo; slablo_hi = boxlo + binsize; - slabhi_lo = boxlo + ((nbin-1)/2)*binsize; - slabhi_hi = boxlo + ((nbin-1)/2 + 1)*binsize; + slabhi_lo = boxlo + (nbin/2)*binsize; + slabhi_hi = boxlo + (nbin/2+1)*binsize; } // make 2 lists of up to nswap atoms diff --git a/src/fix_viscosity.cpp b/src/fix_viscosity.cpp index 3b62746307..cd29ac85ff 100644 --- a/src/fix_viscosity.cpp +++ b/src/fix_viscosity.cpp @@ -116,7 +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 below half height + // if nbin even, hi bin is just above half height // if nbin odd, hi bin straddles half height if (domain->box_change == 0) { @@ -126,8 +126,8 @@ void FixViscosity::init() double binsize = (boxhi-boxlo) / nbin; slablo_lo = boxlo; slablo_hi = boxlo + binsize; - slabhi_lo = boxlo + ((nbin-1)/2)*binsize; - slabhi_hi = boxlo + ((nbin-1)/2 + 1)*binsize; + slabhi_lo = boxlo + (nbin/2)*binsize; + slabhi_hi = boxlo + (nbin/2+1)*binsize; } periodicity = domain->periodicity[pdim]; @@ -154,8 +154,8 @@ void FixViscosity::end_of_step() double binsize = (boxhi-boxlo) / nbin; slablo_lo = boxlo; slablo_hi = boxlo + binsize; - slabhi_lo = boxlo + ((nbin-1)/2)*binsize; - slabhi_hi = boxlo + ((nbin-1)/2 + 1)*binsize; + slabhi_lo = boxlo + (nbin/2)*binsize; + slabhi_hi = boxlo + (nbin/2+1)*binsize; } // make 2 lists of up to nswap atoms with velocity closest to +/- vtarget