diff options
author | 2019-05-08 11:18:45 -0700 | |
---|---|---|
committer | 2019-05-08 11:18:45 -0700 | |
commit | 24eadeb23e2a02335472da22ad6f21f8169080f0 (patch) | |
tree | 6b96aacc7ad96cb8b95fdffc93a61ae43e9c749c /Source/WarpX.cpp | |
parent | bd5b41b8178a720ef77eb5155adfac658b3f94d8 (diff) | |
parent | c6335ccaf604b1713449a500eb56559d7c678d7c (diff) | |
download | WarpX-24eadeb23e2a02335472da22ad6f21f8169080f0.tar.gz WarpX-24eadeb23e2a02335472da22ad6f21f8169080f0.tar.zst WarpX-24eadeb23e2a02335472da22ad6f21f8169080f0.zip |
fix merge conflicts with dev
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 8339c7e19..acdf30fa6 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -146,13 +146,14 @@ WarpX::WarpX () // Particle Container mypc = std::unique_ptr<MultiParticleContainer> (new MultiParticleContainer(this)); - - if (do_plasma_injection) { - for (int i = 0; i < num_injected_species; ++i) { - int ispecies = injected_plasma_species[i]; - WarpXParticleContainer& pc = mypc->GetParticleContainer(ispecies); - auto& ppc = dynamic_cast<PhysicalParticleContainer&>(pc); - ppc.injected = true; + warpx_do_continuous_injection = mypc->doContinuousInjection(); + if (warpx_do_continuous_injection){ + if (moving_window_v >= 0){ + // Inject particles continuously from the right end of the box + current_injection_position = geom[0].ProbHi(moving_window_dir); + } else { + // Inject particles continuously from the left end of the box + current_injection_position = geom[0].ProbLo(moving_window_dir); } } @@ -303,21 +304,6 @@ WarpX::ReadParameters () moving_window_v *= PhysConst::c; } - pp.query("do_plasma_injection", do_plasma_injection); - if (do_plasma_injection) { - pp.get("num_injected_species", num_injected_species); - injected_plasma_species.resize(num_injected_species); - pp.getarr("injected_plasma_species", injected_plasma_species, - 0, num_injected_species); - if (moving_window_v >= 0){ - // Inject particles continuously from the right end of the box - current_injection_position = geom[0].ProbHi(moving_window_dir); - } else { - // Inject particles continuously from the left end of the box - current_injection_position = geom[0].ProbLo(moving_window_dir); - } - } - pp.query("do_boosted_frame_diagnostic", do_boosted_frame_diagnostic); if (do_boosted_frame_diagnostic) { |