programming style
This commit is contained in:
@ -332,7 +332,7 @@ void PairHybrid::settings(int narg, char **arg)
|
|||||||
jarg = iarg + 1;
|
jarg = iarg + 1;
|
||||||
while ((jarg < narg)
|
while ((jarg < narg)
|
||||||
&& !force->pair_map->count(arg[jarg])
|
&& !force->pair_map->count(arg[jarg])
|
||||||
&& !lmp->match_style("pair",arg[jarg])) jarg++;
|
&& !lmp->match_style("pair", arg[jarg])) jarg++;
|
||||||
|
|
||||||
styles[nstyles]->settings(jarg-iarg-1,&arg[iarg+1]);
|
styles[nstyles]->settings(jarg-iarg-1,&arg[iarg+1]);
|
||||||
iarg = jarg;
|
iarg = jarg;
|
||||||
@ -1010,8 +1010,7 @@ void PairHybrid::modify_special(int m, int /*narg*/, char **arg)
|
|||||||
special[3] = utils::numeric(FLERR,arg[3],false,lmp);
|
special[3] = utils::numeric(FLERR,arg[3],false,lmp);
|
||||||
|
|
||||||
if (styles[m]->suffix_flag & (Suffix::INTEL|Suffix::GPU))
|
if (styles[m]->suffix_flag & (Suffix::INTEL|Suffix::GPU))
|
||||||
error->all(FLERR,"Pair_modify special is not compatible with "
|
error->all(FLERR,"Pair_modify special not compatible with suffix version of hybrid substyle");
|
||||||
"suffix version of hybrid substyle");
|
|
||||||
|
|
||||||
if (strcmp(arg[0],"lj/coul") == 0) {
|
if (strcmp(arg[0],"lj/coul") == 0) {
|
||||||
if (!special_lj[m]) special_lj[m] = new double[4];
|
if (!special_lj[m]) special_lj[m] = new double[4];
|
||||||
@ -1090,13 +1089,11 @@ void *PairHybrid::extract(const char *str, int &dim)
|
|||||||
ptr = styles[m]->extract(str,dim);
|
ptr = styles[m]->extract(str,dim);
|
||||||
if (ptr && strcmp(str,"cut_coul") == 0) {
|
if (ptr && strcmp(str,"cut_coul") == 0) {
|
||||||
if (couldim != -1 && dim != couldim)
|
if (couldim != -1 && dim != couldim)
|
||||||
error->all(FLERR,
|
error->all(FLERR, "Coulomb styles of pair hybrid sub-styles do not match");
|
||||||
"Coulomb styles of pair hybrid sub-styles do not match");
|
|
||||||
auto p_newvalue = (double *) ptr;
|
auto p_newvalue = (double *) ptr;
|
||||||
double newvalue = *p_newvalue;
|
double newvalue = *p_newvalue;
|
||||||
if (cutptr && (newvalue != cutvalue))
|
if (cutptr && (newvalue != cutvalue))
|
||||||
error->all(FLERR,
|
error->all(FLERR, "Coulomb cutoffs of pair hybrid sub-styles do not match");
|
||||||
"Coulomb cutoffs of pair hybrid sub-styles do not match");
|
|
||||||
if (dim == 0) {
|
if (dim == 0) {
|
||||||
cutptr = ptr;
|
cutptr = ptr;
|
||||||
cutvalue = newvalue;
|
cutvalue = newvalue;
|
||||||
|
|||||||
Reference in New Issue
Block a user