Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider relaxing default tolerance for truncate_small_values #2458

Closed
billsacks opened this issue Apr 5, 2024 · 2 comments
Closed

Consider relaxing default tolerance for truncate_small_values #2458

billsacks opened this issue Apr 5, 2024 · 2 comments
Labels
enhancement new capability or improved behavior of existing capability

Comments

@billsacks
Copy link
Member

The default tolerance for truncate_small_values is 1e-13. This is proving to be too stringent in some cases - e.g., see #2457 . Currently there is a mechanism to override the default tolerance on a case-by-case basis, but it might be better to just relax the tolerance to make us less likely to run into issues in the future. I'd suggest at least relaxing it to 1e-12, and possibly 1e-11 or 1e-10. The danger of relaxing it too much is that we could truncate values to 0 that are really meant to be non-zero. But even with 1e-10 this means that a state variable was just reduced by 10 orders of magnitude, so setting it to 0 in that case seems unlikely to do too much harm scientifically, unless this is happening a lot in which case I guess it's possible that we could get accumulating conservation issues.

If we make this change, we should remove settings of custom_rel_epsilon that are currently using values smaller than the new default. e.g., we should remove settings of custom_rel_epsilon=1e-12 if the new default is 1e-12, 1e-11, 1e-10 or bigger.

@billsacks billsacks added the enhancement new capability or improved behavior of existing capability label Apr 5, 2024
@ekluzek ekluzek added the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Apr 5, 2024
@billsacks billsacks changed the title Consider relaxing default tolerance for truncate_small_values Consider relaxing default tolerance for truncate_small_values or do more substantial rework of how this truncation is handled Apr 5, 2024
@billsacks billsacks changed the title Consider relaxing default tolerance for truncate_small_values or do more substantial rework of how this truncation is handled Consider relaxing default tolerance for truncate_small_values Apr 5, 2024
@billsacks
Copy link
Member Author

I realized a possible issue with relaxing the tolerance too much – or with how this truncation is done in general – and this led me to think of a different, probably more robust way to handle this truncation - see #2459 .

I'm keeping that as a separate issue because in the shorter-term I think it could make sense to just relax the tolerance a bit, but longer term I think that more substantial rework could be warranted.

@slevis-lmwg slevis-lmwg removed the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Apr 11, 2024
@ekluzek
Copy link
Collaborator

ekluzek commented Sep 25, 2024

This was completed as part of #2457 so closing.

@ekluzek ekluzek closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new capability or improved behavior of existing capability
Projects
None yet
Development

No branches or pull requests

3 participants