Scale Mesh Size and/or Data Values

Let’s say I’m a glutton for punishment and want to couple two codes that are hard-coded to compute in different units systems. Why these codes were written to only work in certain units systems is problematic in and of itself, but that’s outside my control.

Does preCICE have a way to scale the mesh locations and/or the data values on the mesh? Do I have to use a python action? Any advice?

preCICE does not automatically handle this, at least not easily (it does not know the concept of units).

You could indeed use Python Actions for converting the field. The vertexCallback seems to be the right place for that, here is a test: precice/TestAllAction.py at 34ad87b9a7577c90e5836e9572c641a80cbfffa0 · precice/precice · GitHub

My best wished for quick recovery! :sweat_smile: