forked from lijiext/lammps
incorporate bugfix and cleanup from lammps-icms and upstream
This commit is contained in:
parent
bb721db8de
commit
e1045851c0
|
@ -9,10 +9,12 @@
|
|||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
Contributing authors: Steven E. Strong and Joel D. Eaves
|
||||
Joel.Eaves@Colorado.edu
|
||||
------------------------------------------------------------------------- */
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -45,7 +47,8 @@ static const char cite_flow_gauss[] =
|
|||
"pages = {1907--1912}\n"
|
||||
"}\n\n";
|
||||
|
||||
FixFlowGauss::FixFlowGauss(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
||||
FixFlowGauss::FixFlowGauss(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
{
|
||||
if (lmp->citeme) lmp->citeme->add(cite_flow_gauss);
|
||||
|
||||
|
@ -74,7 +77,7 @@ FixFlowGauss::FixFlowGauss(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, a
|
|||
error->all(FLERR,"Constraint flags must be 1 or 0");
|
||||
}
|
||||
|
||||
//by default, do not compute work done
|
||||
// by default, do not compute work done
|
||||
workflag=0;
|
||||
|
||||
// process optional keyword
|
||||
|
@ -83,7 +86,7 @@ FixFlowGauss::FixFlowGauss(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, a
|
|||
if ( strcmp(arg[iarg],"energy") == 0 ) {
|
||||
if ( iarg+2 > narg ) error->all(FLERR,"Illegal energy keyword");
|
||||
if ( strcmp(arg[iarg+1],"yes") == 0 ) workflag = 1;
|
||||
else if ( strcmp(arg[iarg+1],"no") == 1 ) error->all(FLERR,"Illegal energy keyword");
|
||||
else if ( strcmp(arg[iarg+1],"no") != 0 ) error->all(FLERR,"Illegal energy keyword");
|
||||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal fix flow/gauss command");
|
||||
}
|
||||
|
@ -132,7 +135,6 @@ void FixFlowGauss::setup(int vflag)
|
|||
void FixFlowGauss::post_force(int vflag)
|
||||
{
|
||||
double **f = atom->f;
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
|
||||
int *mask = atom->mask;
|
||||
|
|
Loading…
Reference in New Issue