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

Pass gamma_boost as an argument to AcceleratorLattice and LatticeElementFinder #5541

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

lucafedeli88
Copy link
Member

This PR is a small step towards the goal of reducing the usage of static variables in the WarpX class.

…entFinder, instead of using WarpX::gamma_boost
@lucafedeli88 lucafedeli88 added the cleaning Clean code, improve readability label Jan 7, 2025
@lucafedeli88 lucafedeli88 requested a review from EZoni January 9, 2025 03:23
@EZoni EZoni self-assigned this Jan 9, 2025
Source/WarpX.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason why we cannot yet redefine gamma_boost as private in WarpX.H?

    //! Lorentz factor of the boosted frame in which a boosted-frame simulation is run
    static amrex::Real gamma_boost;

Source/AcceleratorLattice/AcceleratorLattice.H Outdated Show resolved Hide resolved
Source/AcceleratorLattice/LatticeElementFinder.H Outdated Show resolved Hide resolved
Copy link
Member

@dpgrote dpgrote left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleaning Clean code, improve readability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants