Transferring data through the coupled interface

Hello, I am not sure when to use interpolation when transferring data through coupled interfaces.I looked at this partitioned heat transfer tutorial:
https://github.com/precice/tutorials/tree/master/partitioned-heat-conduction/fenics
And in the example, the grids on the coupled boundaries are completely matched (same length and number of nodes). In this case, why can’t the boundary data be directly extracted and assigned, instead of using RBF interpolation? I only know that interpolation is needed when the grid nodes do not match, but for cases where the nodes match (different lengths, such as adjacent boundaries of concentric circles) or where the nodes match (same length, as in this example), is it necessary to use interpolation, or can direct assignment be used for computation?

Hi @Stitch,

In principle, your observation is correct. In case you are sure your meshes are identical, one could use the nearest-neighbour mapping. This mapping has a negligible performance overhead. Using direct access is possible, but often not worth it as it is more complicated to get right.

@BenjaminRodenberg has more insight into this case.
While significantly more expensive, using a global RBF interpolation in this case allows you to change the mesh on both sides without adjusting the configuration. This is useful for experiments, such as parameter studies.

A stricter example is the elastic-tube-1d tutorial, which always defines matching meshes and thus uses nearest-neighbour mapping in the config.

Hope that helps!

Thank you for your response, my mesh nodes always match, I will refer to elastic-tube-1d tutorial.

1 Like

Hi,Could you please provide the link to the source code of nearest-neighbour mapping? I couldn’t find it in the tutorial.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

I am not sure what you are asking for, but I guess you are looking for how to configure the nearest-neighbor mapping. Here is the documentation:

Here is one tutorial using nearest-neighbor mapping:

And, in case you are really looking for the source code of the mapping, here it is: