From 158ef88a0ccb0f43b3c5dcf16def85a4c89e3cf0 Mon Sep 17 00:00:00 2001 From: "S. Eric Clark" <25495882+clarkse@users.noreply.github.com> Date: Wed, 19 Apr 2023 17:10:48 -0700 Subject: 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 --- Source/Particles/PhysicalParticleContainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') 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); -- cgit v1.2.3