corret strmatch() semantics and restore strcmp() in extract function
This commit is contained in:
@ -286,7 +286,7 @@ void PairCoulTT::init_style()
|
|||||||
error->all(FLERR,"Pair style coul/tt requires atom attribute q");
|
error->all(FLERR,"Pair style coul/tt requires atom attribute q");
|
||||||
int ifix;
|
int ifix;
|
||||||
for (ifix = 0; ifix < modify->nfix; ifix++)
|
for (ifix = 0; ifix < modify->nfix; ifix++)
|
||||||
if (utils::strmatch(modify->fix[ifix]->style,"drude") == 0) break;
|
if (utils::strmatch(modify->fix[ifix]->style,"^drude")) break;
|
||||||
if (ifix == modify->nfix) error->all(FLERR, "Pair coul/tt requires fix drude");
|
if (ifix == modify->nfix) error->all(FLERR, "Pair coul/tt requires fix drude");
|
||||||
fix_drude = (FixDrude *) modify->fix[ifix];
|
fix_drude = (FixDrude *) modify->fix[ifix];
|
||||||
|
|
||||||
@ -438,9 +438,9 @@ double PairCoulTT::single(int i, int j, int itype, int jtype,
|
|||||||
void *PairCoulTT::extract(const char *str, int &dim)
|
void *PairCoulTT::extract(const char *str, int &dim)
|
||||||
{
|
{
|
||||||
dim = 2;
|
dim = 2;
|
||||||
if (utils::strmatch(str,"scale") == 0) return (void *) scale;
|
if (strcmp(str,"scale") == 0) return (void *) scale;
|
||||||
if (utils::strmatch(str,"b") == 0) return (void *) b;
|
if (strcmp(str,"b") == 0) return (void *) b;
|
||||||
if (utils::strmatch(str,"c") == 0) return (void *) c;
|
if (strcmp(str,"c") == 0) return (void *) c;
|
||||||
if (utils::strmatch(str,"ntt") == 0) return (void *) ntt;
|
if (strcmp(str,"ntt") == 0) return (void *) ntt;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user