[lammps-users] Comm_pair and Reverse_comm_pair

Hi all,

Does anyone know when to use comm_pair and when reverse_comm_pair?
They seem to be the same in use?
But in pair_eam.cpp,
"// communicate and sum densities

if (newton_pair) comm->reverse_comm_pair(this);"
" // communicate derivative of embedding function

So I am confused when using them to modify other source codes.

By the way, why is there coefficients for pbc for reverse_comm_pair, but none for comm_pair?


Chen Chen

Forward comm means my owned atoms are being sent to
other procs to become their ghost atoms.

Reverse comm means my ghost atoms are being sent back
to the procs who have them as their owned atoms.

EAM needs to do both those operations for density and the
derivatice of the embedding function. I don't see where
the reverse uses PBC flags. Forward comm does often
use such flags since it sometimes communicates coordinates.