Add spin to ExactQuad.#1323
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
I tried initializing the
|
|
Maybe uses too many resources, try to lower from -j4 to -j3 in CI script of the GH action? |
cemitch99
left a comment
There was a problem hiding this comment.
Corrected filename in CMakeList...
|
I wonder if #1351 can help with the spike of resource usage that fails one of the builds: |
|
Great, #1351 helped to lower the peak resource usage of the compiler (by splitting over multiple translation units / |
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Use some intermediate constants for common terms.
4f8ae5d to
fbd4c40
Compare
| amrex::ParticleReal const alpha = 1_prt - std::pow(2_prt,1_prt/3_prt); | ||
| amrex::ParticleReal const tau2 = dz/(1_prt + alpha); | ||
| amrex::ParticleReal const dz = (zout - zin) / static_cast<amrex::ParticleReal>(nsteps); | ||
| constexpr amrex::ParticleReal alpha = -0.2599210498948732; // C++26: 1_prt - std::pow(2_prt,1_prt/3_prt); |
Check notice
Code scanning / CodeQL
Commented-out code Note
| amrex::ParticleReal const dz = (zout-zin)/nsteps; | ||
| amrex::ParticleReal const alpha = 1_prt - std::pow(2_prt,1_prt/3_prt); | ||
| amrex::ParticleReal const dz = (zout - zin) / static_cast<amrex::ParticleReal>(nsteps); | ||
| constexpr amrex::ParticleReal alpha = -0.2599210498948732; // C++26: 1_prt - std::pow(2_prt,1_prt/3_prt); |
Check notice
Code scanning / CodeQL
Commented-out code Note
This PR adds spin tracking to the
ExactQuadelement, which requires combining the Thomas-BMT equation s-push with the orbit symplectic integration, to the correct order in stepsize h. The basic framework will be reused for theExactMultipoleandExactCFbendelements.mixin/spin_transportclassFollow-up: Investigate alternative 4th and 6th-order symplectic integration algorithms with spin to improve performance (by reducing the number of required map evaluations). See Issue #1341