Skip to content

Commit

Permalink
Fix segfault in overlap creation due to previous merge.
Browse files Browse the repository at this point in the history
The `tetraQual_toRecv` array was used without being allocated due to an erroneous merge. As the tetra quality seems to not be used after (not stored in the overlap tetra when we create it), this part of code has been deleted.
  • Loading branch information
Algiane committed Oct 26, 2024
1 parent 2c7dd33 commit 19f0cc4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/overlap_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ int PMMG_create_overlap(PMMG_pParMesh parmesh, MPI_Comm comm) {
int ntTot_in2out; // Total tetras nbr from Pcolor_in sends to Pcolor_out
int ntTot_out2in; // Total tetras nbr on Pcolor_in receives from Pcolor_out

/* Tetras vertices index, ref and quality to send/receive */
double *tetraQual_ToSend, *tetraQual_ToRecv;
/* Tetras vertices index and ref to send/receive */
int *tetraVertices_ToSend; // Indices of tetra vertices from Pcolor_in sends to Pcolor_out
int *tetraVertices_ToRecv_inIdx; // Indices of tetra vertices from Pcolor_out on Pcolor_in
int *tetraVertices_ToRecv_outIdx; // Indices of tetra vertices from Pcolor_out on Pcolor_out
Expand Down Expand Up @@ -247,7 +246,6 @@ int PMMG_create_overlap(PMMG_pParMesh parmesh, MPI_Comm comm) {
if ( !(pt->tag & MG_OVERLAP) ) continue;

tetraRef_ToSend[ntTot_in2out] = pt->ref;
tetraQual_ToSend[ntTot_in2out] = pt->qual;

/* Loop over the vertices of this tetra, all the nodes belong to the overlap
that we want to send to Pcolor_out */
Expand Down

0 comments on commit 19f0cc4

Please sign in to comment.