diff --git a/src/particles/beam/BeamParticleContainer.H b/src/particles/beam/BeamParticleContainer.H index 77eee12a7b..cd7a682769 100644 --- a/src/particles/beam/BeamParticleContainer.H +++ b/src/particles/beam/BeamParticleContainer.H @@ -257,12 +257,6 @@ private: /** 2D reordering index type. 0: cell, 1: node, 2: both */ amrex::IntVect m_reorder_idx_type = {0, 0, 0}; - // laser injection: -public: - bool m_can_laser_injection = false; /**< whether laser injection is unabled */ - std::string m_product_name = ""; /**< name of Injection product beam */ - BeamParticleContainer* m_product_beam_pc = nullptr; /**< Injection product beam */ - // fixed_ppc: private: amrex::IntVect m_ppc {1, 1, 1}; /**< Number of particles per cell in each direction */ diff --git a/src/particles/beam/BeamParticleContainer.cpp b/src/particles/beam/BeamParticleContainer.cpp index 3b8ea14a81..2acea4eac6 100644 --- a/src/particles/beam/BeamParticleContainer.cpp +++ b/src/particles/beam/BeamParticleContainer.cpp @@ -90,8 +90,6 @@ BeamParticleContainer::ReadParameters () AMREX_ALWAYS_ASSERT_WITH_MESSAGE( m_duz_per_uz0_dzeta == 0., "Tilted beams and correlated energy spreads are only implemented for fixed weight beams"); } - m_can_laser_injection = pp.contains("injection_product"); - queryWithParser(pp, "can_laser_injection", m_can_laser_injection); queryWithParserAlt(pp, "initialize_on_cpu", m_initialize_on_cpu, pp_alt); auto& soa = getBeamInitSlice().GetStructOfArrays(); diff --git a/src/particles/beam/MultiBeam.cpp b/src/particles/beam/MultiBeam.cpp index 70e226d63c..370364adfe 100644 --- a/src/particles/beam/MultiBeam.cpp +++ b/src/particles/beam/MultiBeam.cpp @@ -34,15 +34,6 @@ MultiBeam::InitData (const amrex::Geometry& geom) amrex::Real ptime {0.}; for (auto& beam : m_all_beams) { ptime = beam.InitData(geom); - if(beam.m_can_laser_injection) { - for (int i=0; i slice_ba, plasma.InitIonizationModule(gm[0], Hipace::m_background_density_SI); // geometry only for dz } + if(beam.m_can_laser_injection) { + for (int i=0; i m_laser_dp_prefactor; + // laser injection: + bool m_can_laser_injection = false; /**< whether laser injection is unabled */ + std::string m_product_beam_name = ""; /**< name of Injection product beam */ + PlasmaParticleContainer* m_product_beam_pc = nullptr; /**< Injection product beam */ + // plasma sorting/reordering: /** After how many slices the particles are reordered. 0: off */ diff --git a/src/particles/plasma/PlasmaParticleContainer.cpp b/src/particles/plasma/PlasmaParticleContainer.cpp index 0f93737227..1d91e7050b 100644 --- a/src/particles/plasma/PlasmaParticleContainer.cpp +++ b/src/particles/plasma/PlasmaParticleContainer.cpp @@ -82,6 +82,8 @@ PlasmaParticleContainer::ReadParameters () AMREX_ALWAYS_ASSERT_WITH_MESSAGE(m_init_ion_lev >= 0, "The initial ion level must be specified"); } + m_can_laser_injection = pp.contains("injection_product"); + queryWithParser(pp, "can_laser_injection", m_can_laser_injection); queryWithParserAlt(pp, "neutralize_background", m_neutralize_background, pp_alt); AMREX_ALWAYS_ASSERT_WITH_MESSAGE(!m_can_ionize || !m_neutralize_background, "Cannot use neutralize_background when ionization is turned on");