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

Using bool variable with queryAdd for elements appearing more than once can yield false -> true #803

Closed
cemitch99 opened this issue Jan 17, 2025 · 0 comments · Fixed by #804
Assignees
Labels
bug Something isn't working component: core Core ImpactX functionality

Comments

@cemitch99
Copy link
Member

cemitch99 commented Jan 17, 2025

For a lattice with an element (named, eg, "ap1") that appears more than once in the lattice, the use of lines such as:

bool has_old_xmax = pp_element.queryAdd("xmax", aperture_x);
amrex::Print() << "has_old_xmax" << " " << has_old_xmax << std::endl;

in InitElement.cpp shows that the value of has_old_xmax can change from false to true, even if "xmax" does not appear anywhere.

This appears in the context of PR #802. It has no affect on Python-based input.

@cemitch99 cemitch99 changed the title Using bool variable = __queryAdd(__) for elements appearing more than once yields false -> true Using bool variable with queryAdd for elements appearing more than once can yield false -> true Jan 17, 2025
@ax3l ax3l added the bug Something isn't working label Jan 18, 2025
@ax3l ax3l self-assigned this Jan 18, 2025
@ax3l ax3l added the component: core Core ImpactX functionality label Jan 18, 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 component: core Core ImpactX functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants