new math constants: DEG2RAD and RAD2DEG

This commit is contained in:
Axel Kohlmeyer
2022-03-17 19:39:22 -04:00
parent 6e7eedf148
commit 58030009da
14 changed files with 106 additions and 110 deletions

View File

@ -321,10 +321,7 @@ void Set::command(int narg, char **arg)
} else if (strcmp(arg[iarg],"theta") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1);
else {
dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp);
dvalue *= MY_PI/180.0;
}
else dvalue = DEG2RAD * utils::numeric(FLERR,arg[iarg+1],false,lmp);
if (!atom->line_flag)
error->all(FLERR,"Cannot set this attribute for this atom style");
set(THETA);