LLNL / Tribol

Modular interface physics library featuring state-of-the-art contact physics methods.
MIT License
25 stars 2 forks source link

Fix normal calc for small elements #61

Closed ebchin closed 9 months ago

ebchin commented 9 months ago

This PR makes the normal computation work for small elements by reducing the size of the allowed magnitude of the normal to around machine precision. If the magnitude of the normal is smaller than this (including zero or negative), the routine will now produce a warning and return false.

Additionally, the scope of some variables has been reduced and they are now initialized upon creation.