Question about reverse_comm_pair(class Pair *)

Though the forward / reverse comm is declared in comm.h as below

virtual void forward_comm_pair(class Pair *) = 0;

virtual void reverse_comm_pair(class Pair *) = 0;

I find nowhere they are really defined, except in comm_brick.cpp and comm_tiled.cpp.

For example, when I read **src/**MANYBODY/pair_eam.cpp and see the following

if (newton_pair) comm->reverse_comm_pair(this);

how can I trace where the above reverse_comm_pair is really defined?

Thanks for any comment!

Best regard,

Yidong

It depends on your comm style, and comm_brick is the default style.

Ray

Though the forward / reverse comm is declared in comm.h as below

virtual void forward_comm_pair(class Pair *) = 0;

virtual void reverse_comm_pair(class Pair *) = 0;

I find nowhere they are really defined, except in comm_brick.cpp and
comm_tiled.cpp.

yes, please grab your favorite text book on C++ programming, look up
"polymorphism", "virtual methods", and "pure methods" and then compare
what you learn there witH the LAMMPS code. you'll quickly see it all
makes a lot of sense.

axel.

By the way, what is being communicated is defined by each of the pair, fix, etc, styles.