This guide helps you to upgrade from preCICE 2.x to preCICE 3.x.


  • Migrate connectivity information to the vertex-only API. All setMeshX methods take vertex IDs as input and return nothing.
    • Directly define face elements or cells of your coupling mesh available in your solver by passing their vectices to preCICE, which automatically handles edges of triangles etc. See Mesh Connectivity for more information.
    • Rename setMeshTriangleWithEdges to setMeshTriangle and setMeshQuadWithEdges to setMeshQuad. The edge-based implementation was removed.
    • Use the new bulk functions to reduce sanitization overhead: setMeshEdges, setMeshTriangles, setMeshQuads, setMeshTetrahedra
  • Remove mapWriteDataFrom() and mapReadDataTo().
  • Remove initializeData() and initialize the data after defining the mesh and before calling initialize() if requiresInitialData() is true.
  • Remove isReadDataAvailable() and isWriteDataRequired(), or replace them with your own logic if you are subcycling in your adapter.
  • Remove getMeshVertices() and getMeshVertexIDsFromPositions(). This information is already known by the adapter.
  • Replace precice::constants::* with isActionRequired() and markActionFulfilled() with their respective requirement clause: requiresInitialData(), requiresReadingCheckpoint() or requiresWritingCheckpoint(). If these requirements are checked, then they are promised to be acted on.
  • Replace isMeshConnectivityRequired with requiresMeshConnectivityFor
  • Replace isGradientDataRequired with requiresGradientDataFor
  • Remove the now obsolete calls to getMeshID() and getDataID().
  • Change integer input argument mesh ID to a string with the mesh name in the API commands hasMesh, requiresMeshConnectivityFor, setMeshVertex, getMeshVertexSize, setMeshVertices, setMeshEdge, setMeshEdges, setMeshTriangle, setMeshTriangles, setMeshQuad, setMeshQuads, setMeshTetrahedron, setMeshTetrahedrons, setMeshAccessRegion, getMeshVerticesAndIDs.
  • Change integer input argument data ID to string arguments mesh name and data name in the API commands hasData, writeBlockVectorData, writeVectorData, writeBlockScalarData, writeScalarData, readBlockVectorData, readVectorData, readBlockScalarData, readScalarData, requiresGradientDataFor, writeBlockVectorGradientData, writeVectorGradientData, writeBlockScalarGradientData, writeScalarGradientData.

preCICE configuration file

  • Replace mapping constraint scaled-consistent with scaled-consistent-surface.
  • Replace <use-mesh provide="true" ... /> with <provide-mesh ... />, and <use-mesh provide="false" ... /> with <receive-mesh ... />.
  • Replace <extraplation-order value="2" /> in <coupling-scheme> with <extraplation-order value="1" /> or simply remove it.
  • Remove all timings in the mapping configuration <mapping: ... timing="initial/onadvance/ondemand" />.

Language bindings