From 00b59a5f4eea235c76f3313768a554464b7b1333 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 19 Dec 2014 22:51:18 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12842 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/compute_gyration.cpp | 2 +- src/compute_gyration_molecule.cpp | 2 +- src/fix_ave_spatial.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compute_gyration.cpp b/src/compute_gyration.cpp index 438914278e..1025b8fc2a 100644 --- a/src/compute_gyration.cpp +++ b/src/compute_gyration.cpp @@ -109,5 +109,5 @@ void ComputeGyration::compute_vector() MPI_Allreduce(rg,vector,6,MPI_DOUBLE,MPI_SUM,world); if (masstotal == 0.0) return; - for (int i = 0; i < 6; i++) vector[i] = sqrt(vector[i]/masstotal); + for (int i = 0; i < 6; i++) vector[i] = vector[i]/masstotal; } diff --git a/src/compute_gyration_molecule.cpp b/src/compute_gyration_molecule.cpp index 179d4f5f92..cd36fe2021 100644 --- a/src/compute_gyration_molecule.cpp +++ b/src/compute_gyration_molecule.cpp @@ -212,7 +212,7 @@ void ComputeGyrationMolecule::compute_array() for (i = 0; i < nmolecules; i++) for (j = 0; j < 6; j++) - array[i][j] = sqrt(array[i][j]/masstotal[i]); + array[i][j] = array[i][j]/masstotal[i]; } diff --git a/src/fix_ave_spatial.cpp b/src/fix_ave_spatial.cpp index dab6749ea9..5369dc2fd2 100644 --- a/src/fix_ave_spatial.cpp +++ b/src/fix_ave_spatial.cpp @@ -158,6 +158,8 @@ FixAveSpatial::FixAveSpatial(LAMMPS *lmp, int narg, char **arg) : iarg++; } + if (nvalues == 0) error->all(FLERR,"No input values for fix ave/spatial"); + // optional args regionflag = 0;