trigger building an intel style neighbor list so that buffers are allocated

This commit is contained in:
Axel Kohlmeyer
2022-02-27 14:51:17 -05:00
parent bc9e45ca5a
commit 0ddefb3754
2 changed files with 20 additions and 0 deletions

View File

@ -18,10 +18,15 @@
#include "pair_lj_long_coul_long_intel.h"
#include "fix_intel.h"
#include "modify.h"
#include "neigh_request.h"
#include "suffix.h"
using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
PairLJLongCoulLongIntel::PairLJLongCoulLongIntel(LAMMPS *lmp) :
PairLJLongCoulLong(lmp)
{
@ -30,7 +35,21 @@ PairLJLongCoulLongIntel::PairLJLongCoulLongIntel(LAMMPS *lmp) :
cut_respa = nullptr;
}
/* ---------------------------------------------------------------------- */
PairLJLongCoulLongIntel::~PairLJLongCoulLongIntel()
{
}
/* ---------------------------------------------------------------------- */
void PairLJLongCoulLongIntel::init_style()
{
PairLJLongCoulLong::init_style();
neighbor->find_request(this)->intel = 1;
auto fix = static_cast<FixIntel *>(modify->get_fix_by_id("package_intel"));
if (!fix) error->all(FLERR, "The 'package intel' command is required for /intel styles");
fix->pair_init_check();
}

View File

@ -33,6 +33,7 @@ class PairLJLongCoulLongIntel : public PairLJLongCoulLong {
public:
PairLJLongCoulLongIntel(class LAMMPS *);
~PairLJLongCoulLongIntel() override;
void init_style() override;
};
} // namespace LAMMPS_NS
#endif