Skip to content

Conversation

maximumcats
Copy link
Member

Summary

The new error tagging scheme from #1166 is modified to allow the threshold value to vary by level. Using the example there, if we did:

amr.refinement_indicators = flame_tracer lo_temp
amr.refine.flame_tracer.max_level = 3
amr.refine.flame_tracer.value_greater = 1.e-6 1.e-5
amr.refine.flame_tracer.field_name = Y(H)

amr.refine.lo_temp.max_level = 2
amr.refine.lo_temp.value_less = 1000.
amr.refine.lo_temp.field_name = temp

Then level 0 would be tagged for refinement for Y(H) >= 1.e-6, while level 1 and all higher levels would be tagged for refinement for Y(H) >= 1.e-5. (If a value for every level is not provided, we assume the last value holds for all remaining levels, similar to how we treat quantities like amr.n_error_buf.)

Additional background

This will help for cases where a field varies substantially on the domain and you want to have better control over refinement so that you don't have too many zones.

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • are described in the proposed changes to the AMReX documentation, if appropriate

@maximumcats maximumcats requested a review from drummerdoc October 7, 2020 14:28
@@ -378,7 +378,7 @@ std::ostream& operator << (std::ostream& os, const ErrorList& elst);

struct AMRErrorTagInfo
{
int m_max_level = 100000;
int m_max_level = 1000;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I changed this just because we're now storing a vector of length m_max_level and I wanted to avoid it being gigantic, and no one will realistically have more than 1000 levels.

Copy link
Member

@drummerdoc drummerdoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I like it.

@WeiqunZhang WeiqunZhang merged commit 3972c6d into AMReX-Codes:development Oct 7, 2020
zingale pushed a commit to AMReX-Astro/Castro that referenced this pull request Oct 13, 2020
We take advantage of AMReX-Codes/amrex#1441 to allow the user to specify a tagging threshold that can vary by level. If a value for every level is not provided, we assume the last value holds for all remaining levels, similar to how we treat quantities like amr.n_error_buf.
maximumcats added a commit to maximumcats/amrex that referenced this pull request Oct 16, 2020
maximumcats added a commit to maximumcats/amrex that referenced this pull request Oct 16, 2020
WeiqunZhang pushed a commit that referenced this pull request Oct 16, 2020
## Summary

The user may have given us a vector that has too many values, so we just ignore the remainder.

## Additional background

## Checklist

The proposed changes:
- [x] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX users
- [ ] are described in the proposed changes to the AMReX documentation, if appropriate
@maximumcats maximumcats deleted the level_dependent_errortag branch November 7, 2020 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants