-
Notifications
You must be signed in to change notification settings - Fork 29
2.5D Gaussian Solver #1166
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
base: development
Are you sure you want to change the base?
2.5D Gaussian Solver #1166
Conversation
Add the new Gauss 3D space charge pusher.
- replace with new file name in doc - move into own section in CMake
- avoid temporary arrays - integrate in one go
Only used for particles. Ref orbit asserts well, too.
| int tp5d_bins = 129; | ||
| pp_algo.queryAddWithParser("gauss2p5_bins", tp5d_bins); | ||
|
|
||
| // Measure beam size, extract the min, max of particle positions |
Check notice
Code scanning / CodeQL
Unused local variable Note
| int tp5d_bins = 129; | ||
| pp_algo.queryAddWithParser("gauss2p5_bins", tp5d_bins); | ||
|
|
||
| // Measure beam size, extract the min, max of particle positions |
Check notice
Code scanning / CodeQL
Unused local variable Note
| int tp5d_bins = 129; | ||
| pp_algo.queryAddWithParser("gauss2p5_bins", tp5d_bins); | ||
|
|
||
| // Measure beam size, extract the min, max of particle positions |
Check notice
Code scanning / CodeQL
Unused local variable Note
| int tp5d_bins = 129; | ||
| pp_algo.queryAddWithParser("gauss2p5_bins", tp5d_bins); | ||
|
|
||
| // Measure beam size, extract the min, max of particle positions |
Check notice
Code scanning / CodeQL
Unused local variable Note
| //field integrals from a 3D Gaussian bunch | ||
| // int const nint = 401; | ||
| // amrex::Real const delta=0.01; |
Check notice
Code scanning / CodeQL
Commented-out code Note
docs/source/usage/parameters.rst
Outdated
| ... | ||
|
|
||
| * ``algo.space_charge.gauss_charge_z_bins`` (``int``, default: ``129``) | ||
|
|
||
| ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add nice and verbose, user-facing sentences here.
docs/source/usage/python.rst
Outdated
| ... (default: ``0.01``) | ||
|
|
||
| .. py:property:: space_charge_gauss_charge_z_bins | ||
| ... (default: ``129``) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add nice and verbose, user-facing sentences here.
|
Great! Changing the tolerance now allows the test of the initial beam moments to pass in all cases. For the final beam moments, the |
|
Summary of failed tests (on macOS / AppleClang, OpenMP / GCC w/MPI w/Python, Tooling / Clang ASAN UBSAN): |
|
I will look into that.
Thanks,
Ji
…On Thu, Oct 16, 2025 at 12:49 PM Chad Mitchell ***@***.***> wrote:
*cemitch99* left a comment (BLAST-ImpactX/impactx#1166)
<#1166 (comment)>
Summary of failed tests (on macOS / AppleClang, OpenMP / GCC w/MPI
w/Python, Tooling / Clang ASAN UBSAN): FODO.Gauss3d.sc fails, and the
initial and final beam moments are identical.
—
Reply to this email directly, view it on GitHub
<#1166 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJHRSUNNKUT65B6UJKZ344L3X7ZDDAVCNFSM6AAAAACIOQIZ7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIMJSGYYDKOBQGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
| // Input particle locations (x,y) and RMS sizes (sigx,sigy) and return the integrals for SC fields. | ||
| // | ||
| AMREX_GPU_DEVICE | ||
| void potInt(amrex::ParticleReal delta, int nint, amrex::ParticleReal xin, amrex::ParticleReal yin, amrex::ParticleReal sigx, amrex::ParticleReal sigy, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| void potInt(amrex::ParticleReal delta, int nint, amrex::ParticleReal xin, amrex::ParticleReal yin, amrex::ParticleReal sigx, amrex::ParticleReal sigy, | |
| void potInt (amrex::ParticleReal delta, int nint, amrex::ParticleReal xin, amrex::ParticleReal yin, amrex::ParticleReal sigx, amrex::ParticleReal sigy, |
|
I think I see why the remaining tests are failing now. I can help you resolve those tomorrow if you have time. |
|
|
||
| print("Initial Beam:") | ||
| sig_xi, sig_yi, sig_ti, emittance_xi, emittance_yi, emittance_ti = get_moments(initial) | ||
| sig_xi, sig_yi, sig_ti, emittance_xi, emittance_yi, emittance_ti = get_moments(final) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| sig_xi, sig_yi, sig_ti, emittance_xi, emittance_yi, emittance_ti = get_moments(final) | |
| sig_xi, sig_yi, sig_ti, emittance_xi, emittance_yi, emittance_ti = get_moments(initial) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial and final moments are switched here.
|
@qianglbl It looks like the Gauss3d tests are all passing! The failing Gauss2p5d tests are now due to errors in the final sigma_x and sigma_y of around 10% and 5%, respectively. (The tolerance is 3%.) Those errors seems too large... |
| 9.22e-05, | ||
| 8.55e-05, | ||
| 0.000996, | ||
| 2.04e-09, | ||
| 2.01e-09, | ||
| 1.97e-06, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qianglbl Let's double check these values are correct/converged.
added 3 input parameters for the 2.5D Gaussian solver, modified Gauss2p5dPush.cpp, added examples in fodo_space_charge.
Enhances the implementation from #1127