Mesh Connectivity with quads

Dear preCICE community,

I am currently creating the adapter for our fortran fluid solver. I would like to share the connectivities of the fluid Cartesian meshes (mesh based on the nodes, mesh based on the cell centers) using the function setMeshQuadWithEdges().

  • Does the definition/sequence of the vertices play a role for preCICE? Let’s say a quad is defined in anti-clockwise direction with the vertices V1, V2, V3 and V4. Does it change something for preCICE if I define the same quad in clockwise direction with V1, V4, V3, V2?

  • During the initialization of several meshes (mesh_nodes and mesh_centers in my case), where should the function setMeshQuadWithEdges() be called? Directly after the first call of setVertices() for the first mesh ‘mesh_nodes’ or after the definition of all meshes with setVertices()?

  • Is there a way to force preCICE to get the connectivities of my meshes? I tried to set the mapping ‘nearest-projection’, but it does not seem to take my connectivities for the moment. And no connectivities are used in my vtu export files.

Thank in advance,
Regards
Guillaume

Does the definition/sequence of the vertices play a role for preCICE? Let’s say a quad is defined in anti-clockwise direction with the vertices V1, V2, V3 and V4. Does it change something for preCICE if I define the same quad in clockwise direction with V1, V4, V3, V2?

No, preCICE should sort out the ordering. Should make no difference.

During the initialization of several meshes (mesh_nodes and mesh_centers in my case), where should the function setMeshQuadWithEdges() be called? Directly after the first call of setVertices() for the first mesh ‘mesh_nodes’ or after the definition of all meshes with setVertices()?

Should make no difference. Whatever feels more natural in your adapter.

Is there a way to force preCICE to get the connectivities of my meshes? I tried to set the mapping ‘nearest-projection’, but it does not seem to take my connectivities for the moment. And no connectivities are used in my vtu export files.

No, there is not (but would not be tooo complicated to add such a feature if needed). preCICE only creates connectivity if it is also needed. For a consistent nearest-projection mapping, connectivity on the “from” mesh is needed (“to” mesh for a conservative mapping).
So for a classical “displacements + forces FSI”, you only need connectivity from the solid solver.
If you just want to check the connectivity in the vtu file, you could just use also a consistent mapping for your forces (which will then be bogus of course).

1 Like

Thanks for the tips, Benjamin.

I tested my connectivities with your trick “bogus conservative/consistent mapping”. It seems ok now.

Just a last question about this topic:

  • I send connectivities for quads. I read that the quads are divided in 2 triangles. So is it normal to only see triangles when I visualized my VTU files? or should I see quads?

regards

1 Like

Exactly. preCICE cuts every quad internally into two triangles for data mapping. That’s why in the vtu you see triangles, not quads.

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