only allow "lj" and "real" units for now

This commit is contained in:
Axel Kohlmeyer
2022-04-14 16:43:59 -04:00
parent 4380ed23d1
commit 81e203b5fa
2 changed files with 6 additions and 2 deletions

View File

@ -287,8 +287,10 @@ void FixPolarizeBEMGMRES::setup(int /*vflag*/)
// = 0.000240258
epsilon0e2q = 1.0;
if (strcmp(update->unit_style,"real") == 0)
if (strcmp(update->unit_style, "real") == 0)
epsilon0e2q = 0.0795776 / force->qqrd2e;
else if (strcmp(update->unit_style, "lj") != 0)
error->all(FLERR, "Only unit styles 'real' and 'lj' are supported");
first = 1;
compute_induced_charges();

View File

@ -193,8 +193,10 @@ void FixPolarizeBEMICC::setup(int /*vflag*/)
// = 0.000240258
epsilon0e2q = 1.0;
if (strcmp(update->unit_style,"real") == 0)
if (strcmp(update->unit_style, "real") == 0)
epsilon0e2q = 0.0795776 / force->qqrd2e;
else if (strcmp(update->unit_style, "lj") != 0)
error->all(FLERR, "Only unit styles 'lj' and 'real' are supported");
compute_induced_charges();
}