Skip to content
Snippets Groups Projects
Commit e1045851 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

incorporate bugfix and cleanup from lammps-icms and upstream

parent bb721db8
No related branches found
No related tags found
No related merge requests found
...@@ -9,10 +9,12 @@ ...@@ -9,10 +9,12 @@
the GNU General Public License. the GNU General Public License.
See the README file in the top-level LAMMPS directory. See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing authors: Steven E. Strong and Joel D. Eaves Contributing authors: Steven E. Strong and Joel D. Eaves
Joel.Eaves@Colorado.edu Joel.Eaves@Colorado.edu
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
...@@ -45,7 +47,8 @@ static const char cite_flow_gauss[] = ...@@ -45,7 +47,8 @@ static const char cite_flow_gauss[] =
"pages = {1907--1912}\n" "pages = {1907--1912}\n"
"}\n\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); 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 ...@@ -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"); 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; workflag=0;
// process optional keyword // process optional keyword
...@@ -83,7 +86,7 @@ FixFlowGauss::FixFlowGauss(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, a ...@@ -83,7 +86,7 @@ FixFlowGauss::FixFlowGauss(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, a
if ( strcmp(arg[iarg],"energy") == 0 ) { if ( strcmp(arg[iarg],"energy") == 0 ) {
if ( iarg+2 > narg ) error->all(FLERR,"Illegal energy keyword"); if ( iarg+2 > narg ) error->all(FLERR,"Illegal energy keyword");
if ( strcmp(arg[iarg+1],"yes") == 0 ) workflag = 1; 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; iarg += 2;
} else error->all(FLERR,"Illegal fix flow/gauss command"); } else error->all(FLERR,"Illegal fix flow/gauss command");
} }
...@@ -132,7 +135,6 @@ void FixFlowGauss::setup(int vflag) ...@@ -132,7 +135,6 @@ void FixFlowGauss::setup(int vflag)
void FixFlowGauss::post_force(int vflag) void FixFlowGauss::post_force(int vflag)
{ {
double **f = atom->f; double **f = atom->f;
double **x = atom->x;
double **v = atom->v; double **v = atom->v;
int *mask = atom->mask; int *mask = atom->mask;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment