Runs only in serial because you use a write-consistent
mapping:
<participant name="OpenFOAM">
<use-mesh name="OpenFOAM-Mesh" provide="yes"/>
<read-data name="Heat-Flux" mesh="OpenFOAM-Mesh"/>
<write-data name="Temperature" mesh="OpenFOAM-Mesh"/>
</participant>
<participant name="Nutils">
<use-mesh name="OpenFOAM-Mesh" from="OpenFOAM"/>
<use-mesh name="Nutils-Mesh-GP" provide="yes"/>
<use-mesh name="Nutils-Mesh-CC" provide="yes"/>
<mapping:nearest-neighbor direction="write" from="Nutils-Mesh-CC" to="OpenFOAM-Mesh" constraint="consistent"/>
<mapping:nearest-neighbor direction="read" from="OpenFOAM-Mesh" to="Nutils-Mesh-GP" constraint="consistent"/>
<read-data name="Temperature" mesh="Nutils-Mesh-GP" />
<write-data name="Heat-Flux" mesh="Nutils-Mesh-CC" />
</participant>
<coupling-scheme:serial-explicit>
...
<exchange data="Temperature" mesh="OpenFOAM-Mesh" from="OpenFOAM" to="Nutils"/>
<exchange data="Heat-Flux" mesh="OpenFOAM-Mesh" from="Nutils" to="OpenFOAM"/>
</coupling-scheme:serial-explicit>
Works in serial and parallel:
<participant name="OpenFOAM">
<use-mesh name="OpenFOAM-Mesh" provide="yes"/>
<use-mesh name="Nutils-Mesh-CC" from="Nutils"/>
<read-data name="Heat-Flux" mesh="OpenFOAM-Mesh"/>
<write-data name="Temperature" mesh="OpenFOAM-Mesh"/>
<mapping:nearest-neighbor direction="read" from="Nutils-Mesh-CC" to="OpenFOAM-Mesh" constraint="consistent"/>
</participant>
<participant name="Nutils">
<use-mesh name="OpenFOAM-Mesh" from="OpenFOAM"/>
<use-mesh name="Nutils-Mesh-GP" provide="yes"/>
<use-mesh name="Nutils-Mesh-CC" provide="yes"/>
<mapping:nearest-neighbor direction="read" from="OpenFOAM-Mesh" to="Nutils-Mesh-GP" constraint="consistent"/>
<read-data name="Temperature" mesh="Nutils-Mesh-GP" />
<write-data name="Heat-Flux" mesh="Nutils-Mesh-CC" />
</participant>
<coupling-scheme:serial-explicit>
...
<exchange data="Temperature" mesh="OpenFOAM-Mesh" from="OpenFOAM" to="Nutils"/>
<exchange data="Heat-Flux" mesh="Nutils-Mesh-CC" from="Nutils" to="OpenFOAM"/>
</coupling-scheme:serial-explicit>