diff --git a/doc/src/compute_smd_rho.rst b/doc/src/compute_smd_rho.rst index 8ecb09f318..5f6a9120a7 100644 --- a/doc/src/compute_smd_rho.rst +++ b/doc/src/compute_smd_rho.rst @@ -45,7 +45,8 @@ Restrictions """""""""""" This compute is part of the MACHDYN package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package ` page for more info. +LAMMPS was built with that package. See the :doc:`Build package +` page for more info. Related commands """""""""""""""" diff --git a/doc/src/compute_smd_vol.rst b/doc/src/compute_smd_vol.rst index 94372c23ce..1955111be1 100644 --- a/doc/src/compute_smd_vol.rst +++ b/doc/src/compute_smd_vol.rst @@ -24,7 +24,7 @@ Description """"""""""" Define a computation that provides the per-particle volume and the sum -of the per-particle volumes of the group for which the fix is defined. +of the per-particle volumes of the group for which the compute is defined. See `this PDF guide `_ to using Smooth Mach Dynamics in LAMMPS. @@ -41,13 +41,14 @@ The per-particle vector values will be given in :doc:`units ` of volume. Additionally, the compute returns a scalar, which is the sum of the -per-particle volumes of the group for which the fix is defined. +per-particle volumes of the group for which the compute is defined. Restrictions """""""""""" This compute is part of the MACHDYN package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package ` page for more info. +LAMMPS was built with that package. See the :doc:`Build package +` page for more info. Related commands """""""""""""""" diff --git a/src/MACHDYN/compute_smd_vol.cpp b/src/MACHDYN/compute_smd_vol.cpp index cc7dbe441f..4368e108bf 100644 --- a/src/MACHDYN/compute_smd_vol.cpp +++ b/src/MACHDYN/compute_smd_vol.cpp @@ -25,13 +25,14 @@ #include "compute_smd_vol.h" -#include #include "atom.h" -#include "update.h" -#include "modify.h" #include "comm.h" -#include "memory.h" #include "error.h" +#include "memory.h" +#include "modify.h" +#include "update.h" + +#include using namespace LAMMPS_NS; @@ -39,12 +40,12 @@ using namespace LAMMPS_NS; ComputeSMDVol::ComputeSMDVol(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg) { - if (narg != 3) - error->all(FLERR, "Illegal compute smd/volume command"); + if (narg != 3) error->all(FLERR, "Illegal compute smd/volume command"); if (atom->vfrac_flag != 1) - error->all(FLERR, "compute smd/volume command requires atom_style with density (e.g. smd)"); + error->all(FLERR, "compute smd/volume command requires atom_style with density (e.g. smd)"); scalar_flag = 1; + extscalar = 1; peratom_flag = 1; size_peratom_cols = 0;