Commit e37e9cfa authored by Ryan S. Elliott's avatar Ryan S. Elliott
Browse files

Add virtual set_contributing() to pair_kim

parent 67e6afaa
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -142,6 +142,16 @@ PairKIM::~PairKIM()
   return;
}

/* ---------------------------------------------------------------------- */
void PairKIM::set_contributing()
{
  int const nall = atom->nlocal + atom->nghost;
  for (int i = 0; i < nall; ++i)
  {
    kim_particleContributing[i] = ( (i < atom->nlocal) ? 1 : 0 );
  }
}

/* ---------------------------------------------------------------------- */

void PairKIM::compute(int eflag , int vflag)
@@ -185,10 +195,11 @@ void PairKIM::compute(int eflag , int vflag)
   for (int i = 0; i < nall; i++) {
      ielement = lmps_map_species_to_unique[species[i]];
      kim_particleSpecies[i] = kim_particle_codes[ielement];

      kim_particleContributing[i] = ( (i<atom->nlocal) ? 1 : 0 );
   }

   // Set kim contributing flags
   set_contributing();

   // pass current atom pointers to KIM
   set_argument_pointers();

+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ namespace LAMMPS_NS {
      int** lmps_stripped_neigh_ptr;  // pointer into lists

      // KIM specific helper functions
      virtual void set_contributing();
      void kim_init();
      void kim_free();
      void set_argument_pointers();