Morpho-lang / morpho

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

Fix duplicate element generation #254

Closed softmattertheory closed 4 months ago

softmattertheory commented 4 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.