Iceberg ahead and new preCICE release v2.5

Iceberg ahead :ship: … we will be breaking soon :scream:. Breaking means we will go to v3.0 and improve the API and configuration. Many things have piled up and it is about time. Full support of waveform iterations requires some changes, for instance – but it is worth the hassle: This feature will be great. :grin:

Downside is that this means you and we will need to update all adapters and the preCICE configuration files of all testcases. Of course, we will help you updating. And no worries yet, v3.0 is scheduled for spring 2023, well after the preCICE Workshop 2023. If you already want to get a glimpse on what will come, you can inspect the milestone on GitHub.

To prepare for this big step, we decided to fix a last stable version before that:

As always, we again fixed a few bugs, but we also added a few features. A few highlights (or see the complete changelog):

Connectivity-based volume data mapping: linear cell interpolation

As you know, nearest-projection data mapping is a cheap, second-order accurate data mapping requiring mesh connectivity. It, however, only works for surface-coupled problems. Now, we also have a similar data mapping method for volume-coupled problems:

<mapping:linear-cell-interpolation direction="read" 
                                   from="MyMesh1" to="MyMesh2" 
                                   constraint="consistent"/>

To define volume mesh connectivity, you now need to define triangles in 2D and tetrahedra in 3D. For the latter, we added a new API method:

void setMeshTetrahedron(
      int meshID,
      int firstVertexID,
      int secondVertexID,
      int thirdVertexID,
      int fourthVertexID);

Much more is happening under the hood. Boris Martin (@boris-martin) implemented and tested this new data mapping in his master’s thesis. See also the complete project overview. He also added a nice new tutorial on flow-chemistry coupling with FEniCS to test the method.

New version macros

A new interface file precice/Version.h provides version macros PRECICE_VERSION_MAJOR, PRECICE_VERSION_MINOR, and PRECICE_VERSION_PATCH, as well as the convenience macro PRECICE_VERSION_GREATER_EQUAL(major,minor,patch). You can use it to distinguish different preCICE versions in adapters:

#ifndef PRECICE_VERSION_GREATER_EQUAL
   // compatibility with older versions
   #define PRECICE_VERSION_GREATER_EQUAL(x,y,z) FALSE
#endif

#if PRECICE_VERSION_GREATER_EQUAL(2,5,0)
  setMeshTetrahedron(...)
#endif

SolverInterface.hpp and SolverInterfaceC.h include Version.h to simplify macro usage on older versions lacking the header. This can however lead to the error

precice/Version.h cannot be found

when building adapters or bindings. This typically means that you haven’t installed preCICE properly. Read more about this error.

Stay tuned

On our way to v3, we will need your feedback. When building your adapters or preCICE itself, you will get some deprecation warnings, linking to issues on GitHub. Please do let us know if you still need some of these API methods.

Follow us on Twitter for more news regarding v3 and our upcoming workshop. But for now: summer! :cocktail: :sunglasses:

7 Likes