This commit is contained in:
Axel Kohlmeyer
2021-08-18 20:26:01 -04:00
parent 546c9a109e
commit d9f3745eff
2 changed files with 5 additions and 10 deletions

View File

@ -1532,15 +1532,12 @@ int DumpCustom::parse_fields(int narg, char **arg)
error->all(FLERR,"Could not find custom per-atom property ID: {}", name); error->all(FLERR,"Could not find custom per-atom property ID: {}", name);
if (argindex[iarg] == 0) { if (argindex[iarg] == 0) {
if (!flag || cols) if (!flag || cols)
error->all(FLERR, error->all(FLERR,"Property double vector for dump custom does not exist");
"Property double vector for dump custom does not exist");
} else { } else {
if (!flag || !cols) if (!flag || !cols)
error->all(FLERR, error->all(FLERR,"Property double array for dump custom does not exist");
"Property double array for dump custom does not exist");
if (argindex[iarg] > atom->dcols[n]) if (argindex[iarg] > atom->dcols[n])
error->all(FLERR, error->all(FLERR,"Dump custom property array is accessed out-of-range");
"Dump custom property array is accessed out-of-range");
} }
field2index[iarg] = add_custom(name,1); field2index[iarg] = add_custom(name,1);

View File

@ -66,8 +66,7 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) :
iarg++; iarg++;
} else if (strcmp(arg[iarg],"q") == 0) { } else if (strcmp(arg[iarg],"q") == 0) {
if (atom->q_flag) if (atom->q_flag)
error->all(FLERR,"Fix property/atom q when atom_style " error->all(FLERR,"Fix property/atom q when atom_style already has charge attribute");
"already has charge attribute");
if (q_flag) if (q_flag)
error->all(FLERR,"Fix property/atom cannot specify q twice"); error->all(FLERR,"Fix property/atom cannot specify q twice");
style[nvalue] = CHARGE; style[nvalue] = CHARGE;
@ -78,8 +77,7 @@ FixPropertyAtom::FixPropertyAtom(LAMMPS *lmp, int narg, char **arg) :
iarg++; iarg++;
} else if (strcmp(arg[iarg],"rmass") == 0) { } else if (strcmp(arg[iarg],"rmass") == 0) {
if (atom->rmass_flag) if (atom->rmass_flag)
error->all(FLERR,"Fix property/atom rmass when atom_style " error->all(FLERR,"Fix property/atom rmass when atom_style already has rmass attribute");
"already has rmass attribute");
if (rmass_flag) if (rmass_flag)
error->all(FLERR,"Fix property/atom cannot specify rmass twice"); error->all(FLERR,"Fix property/atom cannot specify rmass twice");
style[nvalue] = RMASS; style[nvalue] = RMASS;