make sure gmres and icc have same kspace flag behavior
This commit is contained in:
@ -273,8 +273,12 @@ void FixPolarizeBEMGMRES::setup(int /*vflag*/)
|
||||
efield_kspace = (dynamic_cast<MSMDielectric *>(force->kspace))->efield;
|
||||
else
|
||||
error->all(FLERR, "Kspace style not compatible with fix polarize/bem/gmres");
|
||||
} else
|
||||
error->all(FLERR, "No Kspace style available for fix polarize/bem/gmres");
|
||||
} else {
|
||||
if (kspaceflag == 1) { // users specified kspace yes but there is no kspace pair style
|
||||
error->warning(FLERR, "No Kspace pair style available for fix polarize/bem/gmres");
|
||||
kspaceflag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
|
||||
@ -175,10 +175,9 @@ void FixPolarizeBEMICC::setup(int /*vflag*/)
|
||||
efield_kspace = (dynamic_cast<MSMDielectric *>(force->kspace))->efield;
|
||||
else
|
||||
error->all(FLERR, "Kspace style not compatible with fix polarize/bem/icc");
|
||||
|
||||
} else {
|
||||
if (kspaceflag == 1) { // users specified kspace yes
|
||||
error->warning(FLERR, "No Kspace style available for fix polarize/bem/icc");
|
||||
if (kspaceflag == 1) { // users specified kspace yes but there is no kspace pair style
|
||||
error->warning(FLERR, "No Kspace pair style available for fix polarize/bem/icc");
|
||||
kspaceflag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user