Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update communication backend to send/recv header + timestamped data #1957

Open
BenjaminRodenberg opened this issue Feb 22, 2024 · 0 comments
Labels
maintainability Working on this will make our lives easier in the long run as preCICE gets easier to maintain.
Milestone

Comments

@BenjaminRodenberg
Copy link
Member

In #1664 I introduced bulk send/recv of multiple substeps. The main motivation is to support multirate time stepping and higher-order interpolation. This, however, came with some technical debt, because I did not consistently update the communication backend. Instead, I decided to use the existing backend with three stages of communication:

  1. send/recv number of exchanged timesteps n (1 int)
  2. send/recv array of timestamps (n doubles)
  3. send/recv array of actual data (n * dim * size doubles)

Note that we have to know n, before we can trigger the second and the third step.

A more appropriate approach would be the following:

  1. send/recv a header with the number of exchanged timesteps n
  2. send/recv the actual data + timestamps

This approach should also help us to remove the pretty confusing function BaseCouplingScheme::receiveDataForWindowEnd, because we would by default always attach a timestamp to the data and, therefore, we would not need to call getTime() inside receiveData to implicitly derive the time of the received data.

@BenjaminRodenberg BenjaminRodenberg added the maintainability Working on this will make our lives easier in the long run as preCICE gets easier to maintain. label Feb 22, 2024
@BenjaminRodenberg BenjaminRodenberg added this to the Version 3.x.x milestone Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainability Working on this will make our lives easier in the long run as preCICE gets easier to maintain.
Projects
None yet
Development

No branches or pull requests

1 participant