apply new utility function to most places creating new styles
This commit is contained in:
@ -258,9 +258,7 @@ Pair *Force::new_pair(const char *style, int trysuffix, int &sflag)
|
||||
return pair_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown pair style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("pair",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -373,9 +371,7 @@ Bond *Force::new_bond(const char *style, int trysuffix, int &sflag)
|
||||
return bond_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown bond style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("bond",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -454,9 +450,7 @@ Angle *Force::new_angle(const char *style, int trysuffix, int &sflag)
|
||||
return angle_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown angle style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("angle",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -536,9 +530,7 @@ Dihedral *Force::new_dihedral(const char *style, int trysuffix, int &sflag)
|
||||
return dihedral_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown dihedral style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("dihedral",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -617,9 +609,7 @@ Improper *Force::new_improper(const char *style, int trysuffix, int &sflag)
|
||||
return improper_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown improper style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("improper",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -702,9 +692,7 @@ KSpace *Force::new_kspace(const char *style, int trysuffix, int &sflag)
|
||||
return kspace_creator(lmp);
|
||||
}
|
||||
|
||||
char str[128];
|
||||
sprintf(str,"Unknown kspace style %s",style);
|
||||
error->all(FLERR,str);
|
||||
error->all(FLERR,utils::check_packages_for_style("kspace",style,lmp).c_str());
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user