Recently I feel confused with a question about the data exchange…
I learn from docs that the data are only exchanged in the end of a time window by advance(), but the codes in docs say:
precice.readData("FluidMesh", "Displacements", vertexIDs, dt, displacements);
setDisplacements(displacements);
solveTimeStep(dt);
computeForces(forces);
precice.writeData("FluidMesh", "Forces", vertexIDs, forces);
// if dt = preciceDt, we will exactly reach the end of the window when calling advance
precice.advance(dt);
It seems whatever if the time window is reached, it always carry the readData and writeData, and it means they exchange data. So I am confused.
I also read the describe of advance() in doxygen, it says If computedTimeStepSize < getMaxTimeStepSize(), then the solver hasn't reached the end of a time window and it is subcycling. Depending on the configuration, written data can be used by preCICE to generate additional samples allowing for time interpolation using readData(). This call is computationally inexpensive., so is it relevant to time interpolation?
This video briefly shows the time interpolation function, but it seems not refer to the detail implementation.
So my questions are:
No matter explicit or implicit coupling is, should we always call read data and write data functions in subcyling? And if it is, what will do in the last step to time window?
Is time interpolation carried in both explicit and implicit coupling?