precice / openfoam-adapter

OpenFOAM-preCICE adapter
https://precice.org/adapter-openfoam-overview.html
GNU General Public License v3.0
135 stars 80 forks source link

Fix connectivity definition in the adapter #315

Closed davidscn closed 8 months ago

davidscn commented 8 months ago

Closes #313

This was already anticipated in https://github.com/precice/openfoam-adapter/pull/297#discussion_r1273447571 std::map is sorted according to the key, which leads to wrong key-value pairs in the previous implementation, as the keys are resorted before we insert the (not resorted) values.

MakisH commented 8 months ago

Wouldn't it be simpler to replace the std::map with an std::unordered_map?

davidscn commented 8 months ago

Considering, which if these versions is more compact, I like the current version more. An unordered container would solve the problem, too, of course.