# How does preCICE use meshes for mapping and communication?

**URL:** <https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823>\
**Category:** Using preCICE\
**Tags:** data-mapping, configuration\
**Created:** [December 8, 2021, 4:05pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823 "2021-12-08T16:05:09Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 8, 2021, 4:05pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/1 "2021-12-08T16:05:09Z")

</div>

Dear preCICE community,

I use nearest neighbor mapping to exchange data between fluid (OpenFOAM) and solid (python code). The fluid mesh use 9 nodes in the vertical direction, and the solid uses 5 nodes only but they are exactly a subset of the fluid nodes.

 ![2021-12-08_082330](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/e/ede8fe3dceaca0a3b5f153db52c8f71992b2f188.jpeg)

The conservative mapping seems wrong in two aspects (Figs 1 and 2).

- the right nodes do not get data from the fluid. (Fig. 2)
- the left nodes only get the data from its neighbors but no data from itself (the same location of fluid mesh). (Fig. 2) For example, the data 2.0 boxed in Solid Mesh of Fig.2, should be (0.2+1.0+2.2)=3.4, and all the other values at solid nodes should be calculated the same way.

The consistent mapping (Figs 3 and 4) looks reasonable, but the error looks large. I expect the consistent mapping gives the exact the same value if the coordinates of the fluid and solid nodes are the same.

Please note I deliberately move the left nodes in the solid mesh a little bit for testing. It seems the nodes of solid Mesh which are closer to the face center can receive the data, because the fluid data(force) are located at the face center.

What could be the reasons causing these errors?

Best,  
Michael

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 8, 2021, 6:16pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/2 "2021-12-08T18:16:47Z")

</div>

If “mapping:rbf-thin-plate-splines” is used, the results are ever worse. If I decrease the dimension of y direction which only has one cell, it improves, but still not good. Setting y-dead=“true” does not help.

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 8, 2021, 7:20pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/3 "2021-12-08T19:20:10Z")

</div>

![mapping](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/d/db50afb239e6e90cd092082038e78f22c7ca2138.png)

In the documentation, it is clear and easy to understand how the data are mapped from finer mesh to coarse mesh. However, it will be very helpful if this is illustrated in 2D fashion.

For example, in the configuration figure above, how are ‘S1’ to ‘S4’ calculated from the data of ‘F1’ and ‘F2’ when using **consistent** and **conservative**  **nearest** mappings?

On the contrary, how are ‘F1’ and ‘F2’ calculated if ‘S1’ to ‘S4’ are known?

---

<div class="post-metadata">

**Author:** ![Makis](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/makis/32/25_2.png) [@Makis](https://precice.discourse.group/u/Makis)\
**Post date:** [December 8, 2021, 8:00pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/4 "2021-12-08T20:00:15Z")

</div>

Are you referring to this page? [Mapping configuration | preCICE - The Coupling Library](https://precice.org/configuration-mapping.html)  
There is a similar example there.

- If the mapping has a direction from S to F:
  - The closest neighbors to F1 are S1 and S2.
  - Since S1 and S2 have equal distances from F1, a nearest-neighbor consistent mapping will just pick one arbitrarily.
  - A conservative mapping will give F1 the sum of S1 and S2.

- If the mapping has a direction from F to S:
  - The closest neighbor to S1 is F1.
  - A consistent mapping will just assign the value to S1.
  - A conservative mapping will assign half of the value to S1, assigning the other half to S2.

There is a chance that I am writing something wrong here, though.

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 8, 2021, 9:33pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/5 "2021-12-08T21:33:37Z")

</div>

Your explanation makes things really clear!

> If the mapping has a direction from F to S:

> - The closest neighbor to S1 is F1.
> - A consistent mapping will just assign the value to S1.

Can the list be extended the same way for S2 for consistent mapping?

- The closest neighbor to **S2** is F1.
- A consistent mapping will just assign the value to **S2** (from F1).
- Same principle applies to S3 and S4.

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 8, 2021, 9:35pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/6 "2021-12-08T21:35:59Z")

</div>

Yes, I was referring to that page. [Mapping configuration | preCICE - The Coupling Library](https://precice.org/configuration-mapping.html)

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 8, 2021, 10:00pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/7 "2021-12-08T22:00:34Z")

</div>

![onlyoneside](https://global.discourse-cdn.com/free1/uploads/precice/original/2X/9/9e3d40c765d60ff8cb43f0e29158eecca814c9e7.png)

However, I don’t know why the forces from fluid faceCenters are not evenly distributed to both nodes of the solid grid.

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 8, 2021, 10:02pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/8 "2021-12-08T22:02:03Z")

</div>

I was using nearest conservative mapping to transfer force from OpenFOAM to solid nodes.

---

<div class="post-metadata">

**Author:** ![Makis](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/makis/32/25_2.png) [@Makis](https://precice.discourse.group/u/Makis)\
**Post date:** [December 14, 2021, 1:08pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/9 "2021-12-14T13:08:03Z")

</div>

I am not sure I understand the setup and the question. Do you mean why the spheres on the right all have value `(0.0 0.0 0.0)`, while the spheres on the left have some correct values?

If you are reading from the grid (Fluid) to the spheres (Solid), then every sphere should get a value.

If you are writing from the grid to the spheres, then maybe these nodes are ommitted.

But I am starting to get dangerously confused myself here, so maybe @uekerman may be able to confirm.

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 16, 2021, 7:27pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/10 "2021-12-16T19:27:59Z")

</div>

Exactly. I expect they have the same values on both sides due to symmetry.

> [@Makis](#):
>
> I am not sure I understand the setup and the question. Do you mean why the spheres on the right all have value `(0.0 0.0 0.0)` , while the spheres on the left have some correct values?

I am reading data from fluid to my solid solver:

```
 if interface.is_read_data_available():
        force1 = interface.read_block_vector_data(force1ID, vertex_ids)

```

But I guess, in OpenFOAM, these data are written to the solid grid points as well, otherwise, they are available for reading in solid solver.

> [@Makis](#):
>
> If you are reading from the grid (Fluid) to the spheres (Solid), then every sphere should get a value.
> 
> If you are writing from the grid to the spheres, then maybe these nodes are ommitted.

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 17, 2021, 5:10pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/11 "2021-12-17T17:10:10Z")

</div>

> [@Makis](#):
>
> If you are reading from the grid (Fluid) to the spheres (Solid), then every sphere should get a value.
> 
> If you are writing from the grid to the spheres, then maybe these nodes are ommitted.

I am still not very clear about the mapping direction. Suppose I need to read `force` from `Fluid` to `Solid`. Do I need to set both mapping directions in both participants as follows?

> **Both mapping directions are set**
>
> ```
> <participant name="Fluid">
> <use-mesh name="Fluid-Mesh" provide="yes" />
> <use-mesh name="Solid-Mesh" from="Solid" />
> <write-data name="Force" mesh="Fluid-Mesh" />
> <mapping:nearest-neighbor direction="write" from="Fluid-Mesh" to="Solid-Mesh" constraint="consistent" />
> </participant>
> 
> <participant name="Solid">
> <use-mesh name="Solid-Mesh" provide="yes" />
> <use-mesh name="Fluid-Mesh" from="Fluid" />
> <read-data name="Force" mesh="Solid-Mesh" />
> <mapping:nearest-neighbor direction="read" from="Fluid-Mesh" to="Solid-Mesh" constraint="consistent" />
> </participant>
> 
> ```

Or

> **Only write direction is set in Fluid**
>
> ```
> <participant name="Fluid">
> <use-mesh name="Fluid-Mesh" provide="yes" />
> <use-mesh name="Solid-Mesh" from="Solid" />
> <write-data name="Force" mesh="Fluid-Mesh" />
> <mapping:nearest-neighbor direction="write" from="Fluid-Mesh" to="Solid-Mesh" constraint="consistent" />
> </participant>
> 
> <participant name="Solid">
> <use-mesh name="Solid-Mesh" provide="yes" />
> <use-mesh name="Fluid-Mesh" from="Fluid" />
> <read-data name="Force" mesh="Solid-Mesh" />
> </participant>
> 
> ```

Or

> **Only read direction is set in Solid**
>
> ```
> <participant name="Fluid">
> <use-mesh name="Fluid-Mesh" provide="yes" />
> <use-mesh name="Solid-Mesh" from="Solid" />
> <write-data name="Force" mesh="Fluid-Mesh" />
> </participant>
> 
> <participant name="Solid">
> <use-mesh name="Solid-Mesh" provide="yes" />
> <use-mesh name="Fluid-Mesh" from="Fluid" />
> <read-data name="Force" mesh="Solid-Mesh" />
> <mapping:nearest-neighbor direction="read" from="Fluid-Mesh" to="Solid-Mesh" constraint="consistent" />
> </participant>
> 
> ```

---

<div class="post-metadata">

**Author:** ![uekerman](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/uekerman/32/2199_2.png) [@uekerman](https://precice.discourse.group/u/uekerman)\
**Post date:** [December 19, 2021, 1:13pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/12 "2021-12-19T13:13:32Z")

</div>

You should define the mapping only once.

Either on fluid side:

```xml
    <participant name="Fluid">
      <use-mesh name="Fluid-Mesh" provide="yes" />
      <use-mesh name="Solid-Mesh" from="Solid" />
      <write-data name="Force" mesh="Fluid-Mesh" />
      <mapping:nearest-neighbor direction="write" from="Fluid-Mesh" to="Solid-Mesh" constraint="conservative" />
    </participant>

	<participant name="Solid">
      <use-mesh name="Solid-Mesh" provide="yes" />
	  <read-data name="Force" mesh="Solid-Mesh" />
    </participant>

```

Or on solid side:

```xml
    <participant name="Fluid">
      <use-mesh name="Fluid-Mesh" provide="yes" />
      <write-data name="Force" mesh="Fluid-Mesh" />
    </participant>

	<participant name="Solid">
      <use-mesh name="Solid-Mesh" provide="yes" />
	  <use-mesh name="Fluid-Mesh" from="Fluid" />
      <read-data name="Force" mesh="Solid-Mesh" />
      <mapping:nearest-neighbor direction="read" from="Fluid-Mesh" to="Solid-Mesh" constraint="conservative" />
    </participant>

```

Please note the differences to your configuration:

- In both cases, I removed one redundant mesh.
- I made the mapping conservative as you want to map forces.

For participants running in serial, both configurations are valid. As soon as you run in parallel, only the first one (mapping on `Fluid`) is valid as conservative mappings always have to be write mappings. More information: [Mapping configuration | preCICE - The Coupling Library](https://precice.org/configuration-mapping.html#restrictions-for-parallel-participants)

Don’t forget to also adjust the mesh over which you `exchange` in the coupling scheme if you change from one option to the other.

I must admit I was not able to fully follow the discussion above. I don’t think that there is an actual bug, but there seems to be a misunderstanding. In case the explanation here did not help already, please attach your preCICE configuration file and vtk files for both meshes ([Exports configuration | preCICE - The Coupling Library](https://precice.org/configuration-export.html)).

---

<div class="post-metadata">

**Author:** ![Stan](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/stan/32/599_2.png) [@Stan](https://precice.discourse.group/u/Stan)\
**Post date:** [December 20, 2021, 3:12am UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/13 "2021-12-20T03:12:17Z")

</div>

Hi @uekerman,  
I have a quesiton about the `read` and `write` in the configuration file.  
For the `perpendicular-flap` case in preCICE tutorials, the mapping is defined only on the fluid side with both `read` and `write`.  
[precice-config.xml](https://precice.discourse.group/uploads/short-url/atK9ZjAYLkGPRg1LBil269UZMJe.xml) (2.4 KB)  
However, as for the `multiple-perpendicular-flaps` case, the mapping is defined on both solid and fluid sides. Besides, only `read` is used in the mapping.  
[precice-config\_multipleFlaps.xml](https://precice.discourse.group/uploads/short-url/2VsNrEZeBz6TJq6PzvW6Dw6eX58.xml) (4.6 KB)

So I guess in the mapping configuration, `read` on the fluid side is the same as `write` on the solid side, right?

---

<div class="post-metadata">

**Author:** ![uekerman](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/uekerman/32/2199_2.png) [@uekerman](https://precice.discourse.group/u/uekerman)\
**Post date:** [December 20, 2021, 8:47am UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/14 "2021-12-20T08:47:16Z")

</div>

> [@Stan](#):
>
> For the `perpendicular-flap` case in preCICE tutorials, the mapping is defined only on the fluid side with both `read` and `write` .

Yes. Here, the read mapping is consistent (to map displacements) and the write mapping conservative (to map forces).

> [@Stan](#):
>
> However, as for the `multiple-perpendicular-flaps` case, the mapping is defined on both solid and fluid sides. Besides, only `read` is used in the mapping.  
> [precice-config\_multipleFlaps.xml](https://precice.discourse.group/uploads/short-url/2VsNrEZeBz6TJq6PzvW6Dw6eX58.xml) (4.6 KB)

Here, all mappings are consistent (to map stresses or displacements).

> [@Stan](#):
>
> So I guess in the mapping configuration, `read` on the fluid side is the same as `write` on the solid side, right?

Correct. This is a choice the user can make. As pointed out above, if you run in parallel, there is only one good choice (read for a consistent mapping, write for a conservative mapping).

Try to use the config visualizer. It often helps to understand these things.

> **[Config visualization | preCICE - The Coupling Library](https://precice.org/tooling-config-visualization.html)**
>
> Understanding, handling and debugging preCICE configuration files can be difficult and tedious. This tool simplifies this process by visualizing the configuration as a dot graph.

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 20, 2021, 4:20pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/15 "2021-12-20T16:20:43Z")

</div>

Hi @uekerman,  
Thank you for your explanation! That helps a lot and gives me the guideline when defining the mapping.

Regarding your comments on **redundant mesh**. I hope you can confirm or correct my following understanding:

- If the data exchange is one way, only the participant who is responsible for the mapping uses all the meshes involved, the other participant only uses its own mesh.
- If both participants want to read and write data from each other, then they use both meshes.

> [@uekerman](#):
>
> In both cases, I removed one redundant mesh.

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 20, 2021, 4:39pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/16 "2021-12-20T16:39:49Z")

</div>

The first configuration means:  
`Fluid` first maps data from `Fluid-Mesh` to `Solid-Mesh`, then `Solid` obtains the data directly from its own mesh, i.e., `Solid-Mesh`. Data is **actively** transferred by `Fluid`, and `Solid` \*\* passively receives the data.  
Is it correct?

> [@uekerman](#):
>
> Either on fluid side:
> 
> ```
> <participant name="Fluid">
> <use-mesh name="Fluid-Mesh" provide="yes" />
> <use-mesh name="Solid-Mesh" from="Solid" />
> <write-data name="Force" mesh="Fluid-Mesh" />
> <mapping:nearest-neighbor direction="write" from="Fluid-Mesh" to="Solid-Mesh" constraint="conservative" />
> </participant>
> 
> <participant name="Solid">
> <use-mesh name="Solid-Mesh" provide="yes" />
> <read-data name="Force" mesh="Solid-Mesh" />
> </participant>
> 
> ```

* * *

On the other hand, the configuration below means:  
`Solid` fetches data from `Fluid` **actively** , and `Fluid` passively gives data to `Solid`.

> [@uekerman](#):
>
> Or on solid side:
> 
> ```
> <participant name="Fluid">
> <use-mesh name="Fluid-Mesh" provide="yes" />
> <write-data name="Force" mesh="Fluid-Mesh" />
> </participant>
> 
> <participant name="Solid">
> <use-mesh name="Solid-Mesh" provide="yes" />
> <use-mesh name="Fluid-Mesh" from="Fluid" />
> <read-data name="Force" mesh="Solid-Mesh" />
> <mapping:nearest-neighbor direction="read" from="Fluid-Mesh" to="Solid-Mesh" constraint="conservative" />
> </participant>
> 
> ```

* * *

So, regarding the data exchange, the two configurations are equivalent. The only difference is which participant initiates the exchange and is responsible for the mapping. Is it correct?

---

<div class="post-metadata">

**Author:** ![uekerman](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/uekerman/32/2199_2.png) [@uekerman](https://precice.discourse.group/u/uekerman)\
**Post date:** [December 20, 2021, 5:26pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/17 "2021-12-20T17:26:10Z")

</div>

> [@Michael](#):
>
> - If the data exchange is one way, only the participant who is responsible for the mapping uses all the meshes involved, the other participant only uses its own mesh.
> - If both participants want to read and write data from each other, then they use both meshes.

I would explain it this way: If you want to compute a mapping between two meshes, the participant who computes the mapping needs to “use” both meshes.

> [@Michael](#):
>
> Data is **actively** transferred by `Fluid` , and `Solid` \*\* passively receives the data.

I would not use the term “active” and “passive”.

```xml
    <participant name="Fluid">
      <use-mesh name="Fluid-Mesh" provide="yes" />
      <use-mesh name="Solid-Mesh" from="Solid" />
      <write-data name="Force" mesh="Fluid-Mesh" />
      <mapping:nearest-neighbor direction="write" from="Fluid-Mesh" to="Solid-Mesh" constraint="conservative" />
    </participant>

	<participant name="Solid">
      <use-mesh name="Solid-Mesh" provide="yes" />
	  <read-data name="Force" mesh="Solid-Mesh" />
    </participant>

```

Just take it very literally:

- `Fluid` uses `Fluid-Mesh`, which `Fluid` also provides (i.e. it defines the coordinates).
- `Fluid` uses `Solid-Mesh`, which it receives from `Solid`.
- `Fluid` writes `Force` data to the mesh `Fluid-Mesh`.
- `Fluid` maps write data (here only `Force` data) from `Fluid-Mesh` to `Solid-Mesh`.
- `Solid` uses `Solid-Mesh`, which `Solid` also provides.
- `Solid` reads `Force` data from `Solid-Mesh`.

The communication of data is defined in the coupling scheme:

```xml
    <coupling-scheme:parallel-implicit>
      <participants first="Fluid" second="Solid" />
      <exchange data="Force" mesh="Solid-Mesh" from="Fluid" to="Solid" />
     ...
    </coupling-scheme:parallel-implicit>

```

- The coupling scheme exchanges (i.e. communicates) `Force` data from `Fluid` to `Solid`.

Maybe reading through the first “couple your code” steps could help understanding:

> **[Step 1 – Preparation | preCICE - The Coupling Library](https://precice.org/couple-your-code-preparing-your-solver.html)**
>
> If you want to couple your own code you need to properly understand it. That is why, in this first step, we have a look at your own code. We discuss what you need to do to prepare the code for coupling.

---

<div class="post-metadata">

**Author:** ![Michael](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/michael/32/716_2.png) [@Michael](https://precice.discourse.group/u/Michael)\
**Post date:** [December 20, 2021, 6:31pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/18 "2021-12-20T18:31:18Z")

</div>

Thank you so much for your further explanation!

> [@uekerman](#):
>
> Just take it very literally:
> 
> - `Fluid` uses `Fluid-Mesh` , which `Fluid` also provides (i.e. it defines the coordinates).
> - `Fluid` uses `Solid-Mesh` , which it receives from `Solid` .
> - `Fluid` writes `Force` data to the mesh `Fluid-Mesh` .
> - `Fluid` maps write data (here only `Force` data) from `Fluid-Mesh` to `Solid-Mesh` .
> - `Solid` uses `Solid-Mesh` , which `Solid` also provides.
> - `Solid` reads `Force` data from `Solid-Mesh` .

This breaks up the procedure of data mapping and exchanging and makes things easier to understand. I think I was confused with `Fluid` and `Fluid-Mesh`. They have different responsibility during the mapping and exchanging. Reading the [Step 1](https://precice.org/couple-your-code-preparing-your-solver.html) a few more times does help understand the logic.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/67d2a5fa6f80e597e2267ff17fa8c1673cd11caa.svg) [@system](https://precice.discourse.group/u/system)\
**Post date:** [December 23, 2021, 6:31pm UTC](https://precice.discourse.group/t/how-does-precice-use-meshes-for-mapping-and-communication/823/19 "2021-12-23T18:31:24Z")

</div>

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