propagate changes to other EAM implementations

This commit is contained in:
Axel Kohlmeyer
2024-04-15 21:04:57 -04:00
parent 8dd1d12a73
commit 28620a6631
3 changed files with 15 additions and 15 deletions

View File

@ -656,13 +656,13 @@ void PairEAMIntel::eval(const int offload, const int vflag,
else
fix->stop_watch(TIME_HOST_PAIR);
if (EFLAG && (exceeded_rhomax >= 0)) {
if (EFLAG && (!exceeded_rhomax)) {
MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_MAX, world);
if (exceeded_rhomax > 0) {
if (exceeded_rhomax) {
if (comm->me == 0)
error->warning(FLERR, "Local rho[i] exceeded rhomax of EAM potential table. "
"Computed embedding term is unreliable.");
exceeded_rhomax = -1;
error->warning(FLERR,
"A per-atom density exceeded rhomax of EAM potential table - "
"a linear extrapolation to the energy was made");
}
}

View File

@ -304,13 +304,13 @@ void PairEAMOMP::eval(int iifrom, int iito, ThrData * const thr)
f[i].z += fztmp;
}
if (EFLAG && (exceeded_rhomax >= 0)) {
if (EFLAG && (!exceeded_rhomax)) {
MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_MAX, world);
if (exceeded_rhomax > 0) {
if (exceeded_rhomax) {
if (comm->me == 0)
error->warning(FLERR, "Local rho[i] exceeded rhomax of EAM potential table. "
"Computed embedding term is unreliable.");
exceeded_rhomax = -1;
error->warning(FLERR,
"A per-atom density exceeded rhomax of EAM potential table - "
"a linear extrapolation to the energy was made");
}
}
}

View File

@ -366,13 +366,13 @@ template <int EVFLAG, int EFLAG, int NEWTON_PAIR> void PairEAMOpt::eval()
free(fast_gamma);
fast_gamma = nullptr;
if (EFLAG && (exceeded_rhomax >= 0)) {
if (EFLAG && (!exceeded_rhomax)) {
MPI_Allreduce(&beyond_rhomax, &exceeded_rhomax, 1, MPI_INT, MPI_MAX, world);
if (exceeded_rhomax > 0) {
if (exceeded_rhomax) {
if (comm->me == 0)
error->warning(FLERR, "Local rho[i] exceeded rhomax of EAM potential table. "
"Computed embedding term is unreliable.");
exceeded_rhomax = -1;
error->warning(FLERR,
"A per-atom density exceeded rhomax of EAM potential table - "
"a linear extrapolation to the energy was made");
}
}