# How is the interpolation matrix defined

Hello everyone,

I have difficulties in understanding the interpolation mesh in preCICE.
Running the solverdummy, I can send and recieve data from the coupling partners.

I have modified the case a little bit.

MeshOne has now the vertices (which I set with `interface.set_mesh_vertices`):

``````[[0., 0., 0.],[1., 1., 1.],[2., 2., 2.]]
``````

MeshTwo has now the vertices:

``````[[0., 0., 0.],[0., 0., 0.],[0., 0., 0.]]
``````

For the first communication, SolverOne is sending the following to SolverTwo:
``````[[1., 1., 1.],[1., 1., 1.],[1., 1., 1.]]
``````

Now my question is, why SolverTwo is still recieving, although the two solvers have different meshes:
``````[[1., 1., 1.],[1., 1., 1.],[1., 1., 1.]]
``````

Is there an explanation/documentation of the interpolation mesh between two solvers? Or even better: Is there a mathematical formula to understand the transformation between the meshes?
In the next step I am sending back the following from SolverTwo:
``````[[1., 1., 1.],[1., 1., 1.],[1., 1., 1.]]
``````

SolverOne is now recieving this:
``````[[3., 3., 3.],[0., 0., 0.],[0., 0., 0.]]
``````

I cannot understand, why there is a transformation in the one way, but not in the other one. Further more I do not unterstand the way, how the matrix is transformed.

If you want to look at the modified solver, please see the attatchments.

solverdummy.py.txt (2.9 KB)

This depends on your precice configuration (the XML-file). Could you attach this?

It looks as if you have a nearest-neighbor mapping that is conservative. You can find more information on the mapping in the documentation Mapping configuration | preCICE - The Coupling Library.

Edit: Your mapping could be also conservative in one direction and consistent in the other. I lose a bit track of what the coordinates are.

Looking at the documentation, I still do not understand, how the mapping is calculated (/ how the matrix is transformed). Is there a transformation matrix or something with which, I can better understand what is going on?

precice-config.xml (1.8 KB)

Because I want to simulate a rotating mesh, I have concerns regarding nearest-neighbor mapping:
How does precice map nodes, when they are moving?

If you really want to see some matrices/formulas then I would recommend the PhD theses in the literature guide: Literature guide | preCICE - The Coupling Library
The thesis of Florian Lindner should be the most recent one that discusses interpolation in great detail.

Regarding your use case it really depends on how your solvers work. As far as I know, preCICE does not support truly moving/deforming meshes, but works fine for methods that work on reference meshes like ALE. For details I hope that somebody else answers as I am not an export for that.

Yes, preCICE does currently not yet support dynamic meshes. You need to define them once during initialization and cannot change afterwards. If you have rotating systems, you need to treat the rotation in your solver and let preCICE only handle the reference meshes.
Understandable what this means?

If I have understood you right, I have to displace points in different speeds to obtain a rotation in my fluid / solid simulation.

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