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

@ -61,18 +61,22 @@ AtomVecSphere::AtomVecSphere(LAMMPS *lmp) : AtomVec(lmp)
void AtomVecSphere::process_args(int narg, char **arg)
{
if (narg == 0) return;
if (narg != 1) error->all(FLERR,"Illegal atom_style sphere command");
radvary = utils::numeric(FLERR,arg[0],true,lmp);
if (radvary < 0 || radvary > 1)
if (narg != 0 && narg != 1)
error->all(FLERR,"Illegal atom_style sphere command");
if (radvary == 0) return;
radvary = 0;
if (narg == 1) {
radvary = utils::numeric(FLERR,arg[0],true,lmp);
if (radvary < 0 || radvary > 1)
error->all(FLERR,"Illegal atom_style sphere command");
}
// dynamic particle radius and mass must be communicated every step
fields_comm = (char *) "radius rmass";
fields_comm_vel = (char *) "radius rmass omega";
if (radvary) {
fields_comm = (char *) "radius rmass";
fields_comm_vel = (char *) "radius rmass omega";
}
// delay setting up of fields until now