disable support for neighbors of ghosts. see also bff980b56f
This commit is contained in:
@ -336,12 +336,17 @@ void PairMLIAP::v_tally(int i, int j, double *fij, double *rij)
|
|||||||
void PairMLIAP::init_style()
|
void PairMLIAP::init_style()
|
||||||
{
|
{
|
||||||
if (force->newton_pair == 0)
|
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
|
// need a full neighbor list
|
||||||
|
|
||||||
if (ghostneigh == 1) {
|
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 {
|
} else {
|
||||||
neighbor->add_request(this, NeighConst::REQ_FULL);
|
neighbor->add_request(this, NeighConst::REQ_FULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,6 +77,11 @@ TEST(MliapUnified, VersusLJMelt)
|
|||||||
lammps_close(mliap);
|
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)
|
TEST(MliapUnified, VersusLJMeltGhost)
|
||||||
{
|
{
|
||||||
const char *lmpargv[] = {"melt", "-log", "none", "-nocite"};
|
const char *lmpargv[] = {"melt", "-log", "none", "-nocite"};
|
||||||
@ -112,5 +117,5 @@ TEST(MliapUnified, VersusLJMeltGhost)
|
|||||||
lammps_close(ljmelt);
|
lammps_close(ljmelt);
|
||||||
lammps_close(mliap);
|
lammps_close(mliap);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} // namespace LAMMPS_NS
|
} // namespace LAMMPS_NS
|
||||||
|
|||||||
Reference in New Issue
Block a user