force_communication

Dear lammps community

  I am reading some pair force codes. the force is calculated locally for myatom (i < local), but also we have force for ghost atoms (in pair). However I did not find any pack/unpack_reverse_comm function in pair*.cpp to reduce the force of ghost atoms. So could anyone point out how lammps deal with force communication between different processors?

Thanks
Cunzhi

Dear lammps community

        I am reading some pair force codes. the force is calculated locally for myatom (i < local), but also we have force for ghost atoms (in pair). However I did not find any pack/unpack_reverse_comm function in pair*.cpp to reduce the force of ghost atoms. So could anyone point out how lammps deal with force communication between different processors?

integrator and minimizer styles call comm->reverse_comm() (and only if
newton_pair is true). note, that this is not
comm->reverse_comm_pair(), so it knows which data to collect and
communicate.

axel.

Thanks

The reverse communication routine you’re looking for is declared in the atom vec class rather than the pair style class. The reverse communication for pair is used in some instances for properties that were not declared in the atom vec class such as the electron density for EAM; in this situation the pair style will call reverse communication to accumulate the electron density as can be seen in the code for EAM.