diff options
author | 2023-04-19 17:10:48 -0700 | |
---|---|---|
committer | 2023-04-20 00:10:48 +0000 | |
commit | 158ef88a0ccb0f43b3c5dcf16def85a4c89e3cf0 (patch) | |
tree | 57ca7c7e56ad52afb485408ea619d927030cdb88 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | 7a543b983c7ae0a2b204daabbd9ccef6684456b4 (diff) | |
download | WarpX-158ef88a0ccb0f43b3c5dcf16def85a4c89e3cf0.tar.gz WarpX-158ef88a0ccb0f43b3c5dcf16def85a4c89e3cf0.tar.zst WarpX-158ef88a0ccb0f43b3c5dcf16def85a4c89e3cf0.zip |
Add check in `addPlasma` and `addPlasmaFlux` to respect `random_theta` (#3585)
* Adding additional check in addPlasma and addPlasmaFlux to respect the random_theta flag, otherwise acts deterministically.
* Reset RZ benchmarks
---------
Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
Diffstat (limited to '')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 4eb97903f..7a32e051d 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1254,7 +1254,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) // Replace the x and y, setting an angle theta. // These x and y are used to get the momentum and density Real theta; - if (nmodes == 1) { + if (nmodes == 1 && rz_random_theta) { // With only 1 mode, the angle doesn't matter so // choose it randomly. theta = 2._rt*MathConst::pi*amrex::Random(engine); @@ -1793,7 +1793,7 @@ PhysicalParticleContainer::AddPlasmaFlux (amrex::Real dt) // Replace the x and y, setting an angle theta. // These x and y are used to get the momentum and density Real theta; - if (nmodes == 1) { + if (nmodes == 1 && m_rz_random_theta) { // With only 1 mode, the angle doesn't matter so // choose it randomly. theta = 2._prt*MathConst::pi*amrex::Random(engine); |