Error when building OpenFOAM v9 adapter — possible version mismatch?

Body:
Hello,

When I try to build the preCICE adapter for OpenFOAM v9, I encounter the following error during the OpenFOAM9 / ./Allwmake step:

Interface.C:218:14: error: ‘map’ is not a member of ‘std’
  218 |         std::map<std::tuple<double, double, double>, int> verticesMap;
      |              ^~~
Interface.C:5:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
    4 | #include "cellSet.H"
  +++ |+#include <map>
    5 |
Interface.C:218:52: error: expected primary-expression before ‘,’ token
  218 |         std::map<std::tuple<double, double, double>, int> verticesMap;
      |                                                    ^
Interface.C:218:54: error: expected primary-expression before ‘int’
  218 |         std::map<std::tuple<double, double, double>, int> verticesMap;
      |                                                      ^~~
Interface.C:262:17: error: ‘verticesMap’ was not declared in this scope; did you mean ‘vertices’?
  262 |                 verticesMap.emplace(std::make_tuple(vertices[3 * i], vertices[3 * i + 1], vertices[3 * i + 2]), vertexIDs_[i]);
      |                 ^~~~~~~~~~~
      |                 vertices
Interface.C:306:21: error: ‘triEngine’ was not declared in this scope
  306 |                     triEngine.triangulate(UIndirectList<point>(pointCoords, faceQuad));
      |                     ^~~~~~~~~
Interface.C:314:50: error: ‘verticesMap’ was not declared in this scope; did you mean ‘vertices’?
  314 |                             triVertIDs.push_back(verticesMap.at(std::make_tuple(pointCoords[triEngine.triPoints()[triIndex][nodeIndex]][0], pointCoords[triEngine.triPoints()[triIndex][nodeIndex]][1], pointCoords[triEngine.triPoints()[triIndex][nodeIndex]][2])));
      |                                                  ^~~~~~~~~~~
      |                                                  vertices
make: *** [/opt/openfoam9/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/Interface.o] Error 1
=== ERROR: Building failed. See wmake.log for more. ===

I’m not sure what caused this. Could it be due to an incompatible version between preCICE (v3.2.0) and the OpenFOAM v9 adapter?
Here is some information about my environment:

  • OpenFOAM version: 9

  • preCICE version: 3.2.0

  • Operating system: Ubuntu 22.04

  • Installation method: Installed via install

  • Experience level: I’m a beginner with OpenFOAM and preCICE

Any suggestions or guidance would be greatly appreciated. Thank you!

Allwmake.log (4.4 KB)

wmake.log (2.9 KB)

The Foundation versions are currently not supported. They were supported before preCICE v3 and they will be supported again in this repository:

In the meantime, we are documenting porting-related differences between versions in

Consider switching to the latest OpenCFD version, which is the main version we support (currently v2506), or contributing in the porting.

thanks,i will try it

I have installed version 2.51, but I’m getting “file not found” errors. What’s the reason for this, and how can I fix it? The situation described in the official tutorial is different from mine.

Interface.H:8:10: fatal error: precice/precice.hpp: No such file or directory
8 | #include <precice/precice.hpp>

wmake.log (2.9 KB)

For preCICE v2, you need an older version of the tutorials. This is the last one that supported preCICE v2: Release v202211.0 - Before the iceberg hits · precice/tutorials · GitHub

You could also use the Distribution v2211.0: The preCICE distribution | preCICE - The Coupling Library