Open johnomotani opened 4 years ago
For small messages the communication cost is usually fairly insensitive to the actual amount of data being sent so I'm not sure if this would gain us much in practice. But if it doesn't increase code complexity then there's also not much reason to avoid changing this.
If the communication would be ordered, i.e. first the y communication, then the x with valid guard cells, we would ensure that corner guard cells would be valid. In addition with boundaries for the corners, we could allow mixed derivatives without additional communication in between. Even without corner cells boundary conditions, we would only require applying bc, but no communication.
This works for simply connected domains, but around the X-point the corner cells are more difficult, and in some coordinate systems multi-valued.
In
BoutMesh::send()
we are sending buffers with lengthLocalNx
. I think we are communicating the corner guard cells when we send data in the y-direction (but not when we send in the x-direction). We could get a small optimization by not communicating them, since they do not contain valid data.