more additions to USER atom styles and bug fixes

This commit is contained in:
Steve Plimpton
2019-12-13 13:54:12 -07:00
parent 9af08f2d54
commit db6d272303
29 changed files with 218 additions and 1289 deletions

View File

@ -31,7 +31,7 @@ using namespace FixConst;
using namespace MathConst;
enum{CHUTE,SPHERICAL,VECTOR};
enum{CONSTANT,EQUAL};
enum{CONSTANT,EQUAL}; // same as FixPour
/* ---------------------------------------------------------------------- */
@ -134,6 +134,16 @@ FixGravity::FixGravity(LAMMPS *lmp, int narg, char **arg) :
eflag = 0;
egrav = 0.0;
// set gravity components once and for all if CONSTANT
varflag = CONSTANT;
if (mstyle != CONSTANT || vstyle != CONSTANT || pstyle != CONSTANT ||
tstyle != CONSTANT || xstyle != CONSTANT || ystyle != CONSTANT ||
zstyle != CONSTANT) varflag = EQUAL;
if (varflag == CONSTANT) set_acceleration();
}
/* ---------------------------------------------------------------------- */
@ -222,15 +232,6 @@ void FixGravity::init()
if (!input->variable->equalstyle(zvar))
error->all(FLERR,"Variable for fix gravity is invalid style");
}
varflag = CONSTANT;
if (mstyle != CONSTANT || vstyle != CONSTANT || pstyle != CONSTANT ||
tstyle != CONSTANT || xstyle != CONSTANT || ystyle != CONSTANT ||
zstyle != CONSTANT) varflag = EQUAL;
// set gravity components once and for all
if (varflag == CONSTANT) set_acceleration();
}
/* ---------------------------------------------------------------------- */