Thank you Axel, actually my trunc_rad is just like rho in pai_eam… Not too familiar with EAM as I don’t know too much about molecular dynamics but used it as an inspiration for this DEM potential. You mentioned this in a thread we had many months ago.. After I compute the trunc_rad, I have my force calculation loop just like pair_eam.
Can I naively use the methods found in pair_eam.cpp:
- pack_forward_comm()
- unpack_forward_comm()
- pack_reverse_comm()
- unpack_reverse_comm()
and include:
if (newton_pair) comm->reverse_comm_pair(this);
and
comm->forward_comm_pair(this);
between the calculation of trunc_rad and force.
Another thing I noticed is that I defined my arrays such as trunc_rad to be:
memory->create(temp_trunc_rad,nlocal,"pair:temp_trunc_rad")
I am guessing this too won’t be compatible with periodic boundary conditions and I would have to swap nlocal with nmax now that there are ghost atoms?
Thank you!