Morpho-lang / morpho

The Morpho language 🦋. Morpho is a small embeddable language for scientific computing applications.
MIT License
33 stars 11 forks source link

Fix duplicate element generation #253

Closed softmattertheory closed 6 months ago

softmattertheory commented 6 months ago

This PR fixes a minor bug in MeshPruner that could occasionally generate duplicate elements. The new algorithm explicitly checks for duplicates.

A check in area_functional and length_functional prevents a possible SEGFAULT if a badly formed element is incorrectly passed to these functions.