Simplifying RHEO compute comm calls

This commit is contained in:
jtclemm
2024-11-01 15:04:30 -06:00
parent 14041bb20c
commit f483a90d8a
5 changed files with 10 additions and 21 deletions

View File

@ -199,10 +199,8 @@ void ComputeRHEOSurface::compute_peratom()
// reverse gradC and divr, forward divr
comm_stage = 0;
comm_reverse = dim * dim + 1;
comm_forward = 1;
if (newton) comm->reverse_comm(this);
comm->forward_comm(this);
if (newton) comm->reverse_comm(this, dim * dim + 1);
comm->forward_comm(this, 1);
// calculate nsurface for local atoms
// Note, this isn't forwarded to ghosts
@ -299,10 +297,8 @@ void ComputeRHEOSurface::compute_peratom()
// forward/reverse status and rsurface
comm_stage = 1;
comm_reverse = 2;
comm_forward = 2;
if (newton) comm->reverse_comm(this);
comm->forward_comm(this);
if (newton) comm->reverse_comm(this, 2);
comm->forward_comm(this, 2);
}
/* ---------------------------------------------------------------------- */