Skip to content

Feature/fix edge length in parmmg#232

Merged
Algiane merged 8 commits intodevelopfrom
feature/fix-edgeLength-in-ParMmg
Dec 7, 2023
Merged

Feature/fix edge length in parmmg#232
Algiane merged 8 commits intodevelopfrom
feature/fix-edgeLength-in-ParMmg

Conversation

@Algiane
Copy link
Copy Markdown
Member

@Algiane Algiane commented Dec 5, 2023

This PR adds:

  1. return 0 at the beginning of the prilen functions if called without metric;
  2. and the check that we have simplicial elements in the mesh in the same function.

The aim of 1. is to avoid memory issue when calling prilen (edge lengths computations are not intended to be launch without metric): see ParMmg PR102.

The aim of 2. is to avoid infinite edge lengths when histogram is called with no edges/elements (see continuous integration test mmg2d_hybrid-nsd1 where all triangles are deleted from the mesh and the edge length histo is called before remeshing).

Fix possible invalid pointer in MMG3D_movbdyregpt_iso after the reallocation of the xpoint array by the MMG3D_movbdyregpt_geom function.
If all tetra (resp. points) are deleted, the last deletion (iel == mesh->ne)
 leads to mesh->ne = -1 (resp. mesh->np = -1) and to a memory error
 if we don't add a security guard.

See for example the `mmg3d_hybrid-nsd1` continuous integration test with
PATTERN and SCOTCH options setted to off.
Add to prilen funcs:
  - the check that the metric is allocated (avoid memory errors in ParMmg when calling computePrilen)
  - the check that the element array is not empty (avoid infinite edge lengths when mesh->nt = 0, for example after domain deletion)
@Algiane Algiane added the kind: bug error or fault label Dec 5, 2023
@Algiane Algiane self-assigned this Dec 5, 2023
Add to prilen funcs:
  - the check that the metric is allocated (avoid memory errors in ParMmg when calling computePrilen)
  - the check that the element array is not empty (avoid infinite edge lengths when mesh->nt = 0, for example after domain deletion)
@Algiane Algiane changed the title Feature/fix edge length in par mmg Feature/fix edge length in parmmg Dec 7, 2023
@Algiane Algiane merged commit dc78641 into develop Dec 7, 2023
@Algiane Algiane deleted the feature/fix-edgeLength-in-ParMmg branch December 7, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind: bug error or fault

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant