LLNL / Tribol

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

Update How Face Geometry 'Errors' Are Handled #70

Closed srwopschall closed 6 months ago

srwopschall commented 6 months ago
srwopschall commented 6 months ago

@kennyweiss and @liu15 - This PR resolves the issue of computational geometry 'issues' causing tribol to return an error. Please review at your earliest convenience as multiple codes are experiencing issues related to this. The rationale behind this 'fix' is as follows:

The main thing that this PR does is removes tribol::update() from returning an error if computational geometry issues are encountered. The thinking is that we don't want even just one bad face-pair bringing down the whole simulation. Additionally, there may simply be nasty face geometry that the contact algorithm realistically wants to punt on. We have seen globally correct behavior in the presence of such 'bad' face-pairs.

The second thing this PR does is a simple, maybe crude attempt at debug reporting what percentage of face-pairs encountered some comp. geom. issue, just to give the developer/tester some idea of how much of a problem these 'issues' may be. This is not a perfect solution, and a more sophisticated system for reporting comp. geom issues (even for catching bugs) is likely a warranted future development task (with careful thought and consideration). That said, it is extremely cumbersome to hunt down how many face-pairs (and dare I say which ones) experience some issue in the CG routines. This will at least give a user/developer an idea of how prevelant any CG issues may be, qualitatively guiding them to either ignore, or pursue a solution, or even attempt to debug the issue.