MmgTools / ParMmg

Distributed parallelization of 3D volume mesh adaptation
Other
34 stars 19 forks source link

Fix the way internal and external communicators communicate in `PMMG_cuttet_ls` #126

Closed laetitia-m closed 1 month ago

laetitia-m commented 1 month ago

This PR fixes the way internal and external communicators communicates in PMMG_cuttet_ls, due to an initial misunderstanding of the way the communicators worked.

In details this PR:

  1. In PMMG_cuttet_ls, in the loop where the points located on the parallel interface are created, the communication between the internal and external node and edge communicators is modified. Now, we loop on the internal edge comm (edge2int_edge_comm_index1) to create new points (instead of external edge comm as done before). Once a new point is created, it is added to the internal node comm (node2int_node_comm_index1 and node2int_node_comm_index2) and its position as in node2int_node_comm_index2 is added to the internal edge comm int_edge_comm->intvalues. Only after having done that, the external node communicator ext_node_comm[k]->int_comm_index is updated.
  2. In PMMG_cuttet_ls, in the loop where the tetras having a face on the parallel interface is split, the communication between the internal and external face communicators is modified. Now, we loop on the internal face comm (face2int_face_comm_index1) and we split the according tetra (instead of looping on the external face comm as done before). Once a tetra is split, the position of the new parallel faces created are stored in int_face_comm->intvalues. Only after having done that, the external face communicator ext_face_comm[k]->int_comm_index is updated.
  3. In file, hash_pmmg.c: Because of the change detailed in (1), the function PMMG_hashUpdate_all and PMMG_hashGet_all are not useful anymore and were removed from the code as they are not used elsewhere.
  4. Overall comments in the code have been updated in accordance
  5. In addition, based on comments in ParMmg PR#124: _"In fact we don't need the mesh pointer here, we can get the mesh inside the parmesh [...] The mesh pointer [...] is passed in the PMMG_ls function where there is no need either, as it is the case for the ls and met pointers)."_: mesh, ls and met are not given anymore as arguments to the functions PMMG_ls and PMMG_cuttet_ls
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 81.30841% with 40 lines in your changes missing coverage. Please review.

Project coverage is 63.32%. Comparing base (0f82307) to head (5df06a1). Report is 8 commits behind head on develop.

Files with missing lines Patch % Lines
src/ls_pmmg.c 81.69% 33 Missing and 6 partials :warning:
src/libparmmg.c 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #126 +/- ## =========================================== - Coverage 63.40% 63.32% -0.08% =========================================== Files 46 46 Lines 18929 18952 +23 Branches 3537 3540 +3 =========================================== Hits 12001 12001 - Misses 6000 6027 +27 + Partials 928 924 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.