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

Fix dangling-reference warnings for particle functions. #4241

Conversation

philip-blakely
Copy link
Contributor

Summary

With gcc 13.2 and all warnings/errors turned on, some particle functions generate a dangling-reference error.
This PR fixes those errors.

Additional background

To reproduce, in Tests/Particles/ParticleMesh/main.cpp add lines 149-150:

myPC.IncrementWithTotal(acceleration , 0);
myPC.SortParticlesForDeposition({0,0,0});

and in Tests/Particles/ParticleMesh/GNUmakefile
add a final line:

CXXFLAGS += -Werror -Wall -Wextra

Similar lines in:
./Src/Extern/SENSEI/AMReX_ParticleDataAdaptorI.H
may also have the same error, but I don't have SENSEI installed to check.

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
  • include documentation in the code and/or rst files, if appropriate

@atmyers atmyers merged commit 1424c86 into AMReX-Codes:development Nov 21, 2024
75 checks passed
@philip-blakely philip-blakely deleted the fix_particle_warning branch November 22, 2024 08:21
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.

2 participants