Add virtual set_contributing() to pair_kim
This commit is contained in:
@ -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();
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user