first attempt at adding a default kspaceflag to gmres

This commit is contained in:
ali
2022-09-09 15:09:38 -05:00
parent be208f037d
commit b56df94b34

View File

@ -265,18 +265,17 @@ void FixPolarizeBEMGMRES::setup(int /*vflag*/)
else else
error->all(FLERR, "Pair style not compatible with fix polarize/bem/gmres"); error->all(FLERR, "Pair style not compatible with fix polarize/bem/gmres");
if (kspaceflag) { if (force->kspace) {
if (force->kspace) { kspaceflag = 1;
if (strcmp(force->kspace_style, "pppm/dielectric") == 0) if (strcmp(force->kspace_style, "pppm/dielectric") == 0)
efield_kspace = (dynamic_cast<PPPMDielectric *>(force->kspace))->efield; efield_kspace = (dynamic_cast<PPPMDielectric *>(force->kspace))->efield;
else if (strcmp(force->kspace_style, "msm/dielectric") == 0) else if (strcmp(force->kspace_style, "msm/dielectric") == 0)
efield_kspace = (dynamic_cast<MSMDielectric *>(force->kspace))->efield; efield_kspace = (dynamic_cast<MSMDielectric *>(force->kspace))->efield;
else else
error->all(FLERR, "Kspace style not compatible with fix polarize/bem/gmres"); error->all(FLERR, "Kspace style not compatible with fix polarize/bem/gmres");
} else } else
error->all(FLERR, "No Kspace style available for fix polarize/bem/gmres"); error->all(FLERR, "No Kspace style available for fix polarize/bem/gmres");
}
// NOTE: epsilon0e2q converts (epsilon0 * efield) to the unit of (charge unit / squared distance unit) // NOTE: epsilon0e2q converts (epsilon0 * efield) to the unit of (charge unit / squared distance unit)
// efield is computed by pair and kspace styles in the unit of energy unit / charge unit / distance unit // efield is computed by pair and kspace styles in the unit of energy unit / charge unit / distance unit
// for units real efield is in the unit of kcal/mol/e/A // for units real efield is in the unit of kcal/mol/e/A