simplify by using utils::strdup() and reorder includes

This commit is contained in:
Axel Kohlmeyer
2021-03-28 17:02:49 -04:00
parent 31726f56e6
commit b32570c15e
70 changed files with 447 additions and 1009 deletions

View File

@ -12,12 +12,12 @@
------------------------------------------------------------------------- */
#include "fix_nve.h"
#include <cstring>
#include "atom.h"
#include "force.h"
#include "update.h"
#include "respa.h"
#include "error.h"
#include "force.h"
#include "respa.h"
#include "update.h"
using namespace LAMMPS_NS;
using namespace FixConst;
@ -27,7 +27,7 @@ using namespace FixConst;
FixNVE::FixNVE(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg)
{
if (strcmp(style,"nve/sphere") != 0 && narg < 3)
if (!utils::strmatch(style,"^nve/sphere") && narg < 3)
error->all(FLERR,"Illegal fix nve command");
dynamic_group_allow = 1;
@ -53,7 +53,7 @@ void FixNVE::init()
dtv = update->dt;
dtf = 0.5 * update->dt * force->ftm2v;
if (strstr(update->integrate_style,"respa"))
if (utils::strmatch(update->integrate_style,"^respa"))
step_respa = ((Respa *) update->integrate)->step;
}