disable support for neighbors of ghosts. see also bff980b56f

This commit is contained in:
Axel Kohlmeyer
2025-04-07 14:37:35 -04:00
parent fdbae98345
commit fe9915f307
2 changed files with 13 additions and 3 deletions

View File

@ -336,12 +336,17 @@ void PairMLIAP::v_tally(int i, int j, double *fij, double *rij)
void PairMLIAP::init_style()
{
if (force->newton_pair == 0)
error->all(FLERR,"Pair style MLIAP requires newton pair on");
error->all(FLERR, Error::NOLASTLINE, "Pair style mliap requires newton pair on");
// need a full neighbor list
if (ghostneigh == 1) {
neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_GHOST);
// AK: 2025-04-07 nothing seems to be using this feature and it was leaking memory, too.
error->all(FLERR, Error::NOLASTLINE,
"Pair_style mliap does not support requesting neighbors of ghost atoms anymore.\n"
"If you have a model requiring this setting, please contact the LAMMPS developers"
+ utils::errorurl(35));
// neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_GHOST);
} else {
neighbor->add_request(this, NeighConst::REQ_FULL);
}

View File

@ -77,6 +77,11 @@ TEST(MliapUnified, VersusLJMelt)
lammps_close(mliap);
}
#if 0
// This setting was producing wrong results and leaking memory.
// Thus support for it was removed from LAMMPS.
TEST(MliapUnified, VersusLJMeltGhost)
{
const char *lmpargv[] = {"melt", "-log", "none", "-nocite"};
@ -112,5 +117,5 @@ TEST(MliapUnified, VersusLJMeltGhost)
lammps_close(ljmelt);
lammps_close(mliap);
}
#endif
} // namespace LAMMPS_NS