I’m trying to implement a 3-participant solver system. The order of execution in one timestep is as follows.
Solver C sends data to Solver A.
Solver A performs some calculations and sends data to Solver B
Solver B performs some calculations and sends data to Solver A
Solver A performs some more calculations and sends data to Solver C.
Since each coupling (A->B and A->C) happens only once per timestep, the dt for both couplings should be the same. However, the read/write steps are not concurrent. I was thinking that a staggered coupling scheme, where A couples to C at t, 3t, 5t and so on, while A couples to B at 2t, 4t … would solve my problem.
So my questions are
Is preCICE capable of handling a staggered scheme?
If not, I’m considering having one coupling run at double the frequency, with every other step being a dummy step. What is the most computationally efficient way to run the dummy step? Is it possible to have a timestep without exchanging data?
It happens once per time window. That’s an important concept in preCICE.
As long as the time windows have a fixed size, yes.
You can use different time window sizes per coupling scheme.
This feature request/idea could help you:
Something that can also work is to misuse an implicit scheme with min and max iterations=2 and no convergence measure to force two iterations of each time window. This allows you to hardcode both iterations in your solvers and compute the update for C in the second iteration of A. This leads to more communication though.
If you dummy time step is a full time window, then there will be data mapping and exchange.
Only coupling schemes with different time window sizes avoid communication.
I suggest to not overthink this cost until you can measure that it is a significant problem.