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

global_max doesn't work with AMR #20176

Open
philip-blakely opened this issue Jan 7, 2025 · 0 comments
Open

global_max doesn't work with AMR #20176

philip-blakely opened this issue Jan 7, 2025 · 0 comments
Labels
bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood

Comments

@philip-blakely
Copy link

Describe the bug

The new global_max (and probably other similar operators) only work on a per-patch basis with AMR. They should work across all patches (and levels).

Helpful additional information

  • Did VisIt crash: No
  • Did you get wrong results: Yes

To Reproduce

Open an AMR data-set, and create an expression using global_max. For example with the attached dataset:

max_density_grad = global_max(magnitude(gradient(Air_density)))

Plotting this shows that the global maximum is actually done on a per-patch basis, not a global level as suggested by the name.

Expected behavior

I would expect the global_max() to work across all AMR patches and levels. This would allow the simplification of (for example) a mock-schlieren plot for highlighting density discontinuities.

Although I haven't generated any test-data yet, there may also be issues when multi-material data is involved as well, e.g. restricting plotting to a specific material that does not exist on some patches. However, this may be solved by debugging the primary issue.

Attachments

and you can plot either Air_sch or Air_sch_old to see the screenshots below.
In case the session file doesn't work:

density_grad = magnitude(gradient(Air_density))
Air_sch = exp(-20*density_grad/global_max(density_grad))
Air_sch_old = exp(-20*density_grad/824)

Relevant screenshots:
If I compute the global_max() manually (by checking plot limits on magnitude(gradient(density))) then I can get a mock-schlieren plot that looks correct:
shock_bubble_schlieren_manual

If I use global_max instead, I get the following:
shock_bubble_schlieren_global_max

Desktop

  • OS and version: Ubuntu 24.04
  • VisIt Version: 3.4.2
@philip-blakely philip-blakely added bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood
Projects
None yet
Development

No branches or pull requests

1 participant