In LB a lot of stuff is send aroudn twice in ghost comm:
Push scheme:
reset force (requires and changeslocal forces)
collides: requires local forces and pdfs
pdf comm: communicats pdfs and forces
boundary: requres pdfs and fores (for velocity calculation)
streaming: requires pdfs, writes velocity field used by particle coupling
full comm: communicates pdfs, forces, velocities
The final communication step is only there for particle coupling, which needs up to date velocities in ghost layers. Forces could be removed from that communication. The velocities could also be removed, as that info can be re-calculatd from the pdfs on the other side.
Alternatively, the pdfs could be removed, as the velocities are communicated anyway. The only client of pdfs in ghost layers outside LB is the get_density_at_pos() function. If this is needed, the ghost comm could be done lazily once this is called, or a density field could be added to the output in the streaming step.
Pull scheme:
Here, there is only one communicatnio at the end, communicating pdfs, velocities and forces.
The velocities could in principle be removed and re-calculated on the other side.
Right now, the final communication in the push and the pull scheme are done by the same funciton (ghost_communicaiton_pdfs), although the schemes have different comm requirements.
In LB a lot of stuff is send aroudn twice in ghost comm:
Push scheme:
The final communication step is only there for particle coupling, which needs up to date velocities in ghost layers. Forces could be removed from that communication. The velocities could also be removed, as that info can be re-calculatd from the pdfs on the other side. Alternatively, the pdfs could be removed, as the velocities are communicated anyway. The only client of pdfs in ghost layers outside LB is the get_density_at_pos() function. If this is needed, the ghost comm could be done lazily once this is called, or a density field could be added to the output in the streaming step.
Pull scheme:
Here, there is only one communicatnio at the end, communicating pdfs, velocities and forces. The velocities could in principle be removed and re-calculated on the other side.
Right now, the final communication in the push and the pull scheme are done by the same funciton (ghost_communicaiton_pdfs), although the schemes have different comm requirements.