receiveDatain preCICE? Instead, there only is
advance. We call this a high-level API. On this page, you learn which advantages a high-level API has and how communication and control flow in preCICE works.
preCICE distinguishes between serial and parallel coupling schemes:
- serial: the participants run after one another,
- parallel: the participants run simultaneously.
Serial coupling schemes
In our example, we currently use a serial coupling scheme:
<coupling-scheme:serial-explicit> <participants first="FluidSolver" second="SolidSolver"/> ... </coupling-scheme:serial-explicit>
FluidSolver is first and
SolidSolver second. This means that
FluidSolver starts the simulation and computes the first time step, while
SolidSolver still waits. Where does it wait? Well, communication in preCICE only happens within
initializeData, but more about this in Step 7):
FluidSolvercomputes the first time step and then sends and receives data in
advance. The receive call blocks.
initializefor the first data. When it receives the data it computes its first time step and then calls
FluidSolverreceives data and
Try to swap the roles of
second in your example. Do you see the difference? If everything is just too fast, add some
Parallel coupling schemes
In a way, parallel coupling schemes are much easier here (numerically, they are not, but that’s a different story). Everything is symmetric: