move diamflag from fix adapt and adapt/fep to base class for cleaner code
This commit is contained in:
@ -16,8 +16,6 @@
|
||||
#include "atom.h"
|
||||
#include "error.h"
|
||||
#include "fix.h"
|
||||
#include "fix_adapt.h"
|
||||
#include "fix_adapt_fep.h"
|
||||
#include "math_const.h"
|
||||
#include "modify.h"
|
||||
|
||||
@ -90,16 +88,9 @@ void AtomVecSphere::init()
|
||||
// check if optional radvary setting should have been set to 1
|
||||
|
||||
for (auto &ifix : modify->get_fix_by_style("^adapt")) {
|
||||
if (utils::strmatch(ifix->style, "^adapt$")) {
|
||||
auto fix = dynamic_cast<FixAdapt *>(ifix);
|
||||
if (fix && fix->diamflag && radvary == 0)
|
||||
error->all(FLERR, "Fix adapt changes particle radii but atom_style sphere is not dynamic");
|
||||
}
|
||||
if (utils::strmatch(ifix->style, "^adapt/fep$")) {
|
||||
auto fix = dynamic_cast<FixAdaptFEP *>(ifix);
|
||||
if (fix && fix->diamflag && radvary == 0)
|
||||
error->all(FLERR, "Fix adapt/fep changes particle radii but atom_style sphere is not dynamic");
|
||||
}
|
||||
if (ifix->diam_flag && (radvary == 0))
|
||||
error->all(FLERR, "Fix {} changes atom radii but atom_style sphere is not dynamic",
|
||||
ifix->style);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user