From 2a69eb8c34c5a99569bbfcd1ac5763e9fa53e07d Mon Sep 17 00:00:00 2001 From: EyaDammak Date: Wed, 5 Feb 2025 15:03:42 +0100 Subject: [PATCH 01/10] new option --- src/Hipace.cpp | 2 ++ src/particles/plasma/MultiPlasma.cpp | 4 +++- src/particles/plasma/PlasmaParticleContainer.H | 1 + src/particles/plasma/PlasmaParticleContainer.cpp | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Hipace.cpp b/src/Hipace.cpp index 20700c02b9..4e220db555 100644 --- a/src/Hipace.cpp +++ b/src/Hipace.cpp @@ -698,10 +698,12 @@ Hipace::SolveOneSlice (int islice, int step) // plasma laser ionization m_multi_plasma.DoLaserIonization(islice, m_multi_laser.GetLaserGeom(), m_multi_laser); + // Push plasma particles for (int lev=0; lev const& gm, bool temp_slice, int lev) { for (int i=0; i Date: Wed, 5 Feb 2025 15:22:05 +0100 Subject: [PATCH 02/10] Update PlasmaParticleContainer.cpp --- src/particles/plasma/PlasmaParticleContainer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/particles/plasma/PlasmaParticleContainer.cpp b/src/particles/plasma/PlasmaParticleContainer.cpp index fd94a1931f..40aaa2e860 100644 --- a/src/particles/plasma/PlasmaParticleContainer.cpp +++ b/src/particles/plasma/PlasmaParticleContainer.cpp @@ -174,6 +174,7 @@ PlasmaParticleContainer::ReadParameters () "to use the fine plasma patch feature"); queryWithParserAlt(pp, "prevent_centered_particle", m_prevent_centered_particle, pp_alt); queryWithParser(pp, "do_push", m_do_push); +} void PlasmaParticleContainer::InitData (const amrex::Geometry& geom) From e5788f74da9cf950441154eb7d769f9eaa57aa87 Mon Sep 17 00:00:00 2001 From: "Eya D." <81635404+EyaDammak@users.noreply.github.com> Date: Wed, 5 Feb 2025 15:31:42 +0100 Subject: [PATCH 03/10] Update MultiPlasma.cpp --- src/particles/plasma/MultiPlasma.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/particles/plasma/MultiPlasma.cpp b/src/particles/plasma/MultiPlasma.cpp index c5401a4e8f..4eb2a00f00 100644 --- a/src/particles/plasma/MultiPlasma.cpp +++ b/src/particles/plasma/MultiPlasma.cpp @@ -99,7 +99,7 @@ MultiPlasma::AdvanceParticles ( const Fields & fields, amrex::Vector const& gm, bool temp_slice, int lev) { for (int i=0; i Date: Wed, 5 Feb 2025 15:49:50 +0100 Subject: [PATCH 04/10] doc --- docs/source/run/parameters.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/source/run/parameters.rst b/docs/source/run/parameters.rst index 1324b844aa..6d121d211b 100644 --- a/docs/source/run/parameters.rst +++ b/docs/source/run/parameters.rst @@ -519,6 +519,9 @@ When both are specified, the per-species value is used. the domain. However, this will also result in a gap at the domain boundary, which can lead to noise. +* `` or plasmas.do_push`` (`bool`) optional (default `1`) + When set to `0`, disables the particle pusher. + Beam parameters --------------- From eb2f136bf2334bcbc3dc98175aeafbd761d56032 Mon Sep 17 00:00:00 2001 From: EyaDammak Date: Wed, 5 Feb 2025 15:50:43 +0100 Subject: [PATCH 05/10] style --- src/Hipace.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Hipace.cpp b/src/Hipace.cpp index 4e220db555..625e2447e9 100644 --- a/src/Hipace.cpp +++ b/src/Hipace.cpp @@ -698,12 +698,12 @@ Hipace::SolveOneSlice (int islice, int step) // plasma laser ionization m_multi_plasma.DoLaserIonization(islice, m_multi_laser.GetLaserGeom(), m_multi_laser); - + // Push plasma particles for (int lev=0; lev Date: Tue, 11 Feb 2025 16:16:02 +0100 Subject: [PATCH 06/10] Update PlasmaParticleContainer.H --- src/particles/plasma/PlasmaParticleContainer.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/particles/plasma/PlasmaParticleContainer.H b/src/particles/plasma/PlasmaParticleContainer.H index cb577924a3..383ea096d5 100644 --- a/src/particles/plasma/PlasmaParticleContainer.H +++ b/src/particles/plasma/PlasmaParticleContainer.H @@ -195,7 +195,7 @@ public: amrex::Real m_mass = 0; /**< mass of each particle of this species */ amrex::Real m_charge = 0; /**< charge of each particle of this species, per Ion level */ int m_n_subcycles = 1; /**< number of subcycles in the plasma particle push */ - bool m_do_push = true; + bool m_do_push = true; /**< whether the plasma pusher is disabled */ // ionization: From d720a2d84bc68d55fa8224f25209ccd0e48fde46 Mon Sep 17 00:00:00 2001 From: Alexander Sinn <64009254+AlexanderSinn@users.noreply.github.com> Date: Tue, 11 Feb 2025 16:20:36 +0100 Subject: [PATCH 07/10] Fix MultiPlasma.cpp after merge --- src/particles/plasma/MultiPlasma.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/particles/plasma/MultiPlasma.cpp b/src/particles/plasma/MultiPlasma.cpp index 67461f686f..06a9154cba 100644 --- a/src/particles/plasma/MultiPlasma.cpp +++ b/src/particles/plasma/MultiPlasma.cpp @@ -101,7 +101,7 @@ MultiPlasma::AdvanceParticles ( { for (int i=0; i Date: Wed, 12 Feb 2025 15:14:03 +0100 Subject: [PATCH 08/10] Update Hipace.cpp --- src/Hipace.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Hipace.cpp b/src/Hipace.cpp index 23aa1b51ba..f06fd9d473 100644 --- a/src/Hipace.cpp +++ b/src/Hipace.cpp @@ -698,13 +698,11 @@ Hipace::SolveOneSlice (int islice, int step) // plasma laser ionization m_multi_plasma.DoLaserIonization(islice, m_multi_laser.GetLaserGeom(), m_multi_laser); - // Push plasma particles for (int lev=0; lev Date: Wed, 12 Feb 2025 15:15:09 +0100 Subject: [PATCH 09/10] Update src/particles/plasma/PlasmaParticleContainer.H --- src/particles/plasma/PlasmaParticleContainer.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/particles/plasma/PlasmaParticleContainer.H b/src/particles/plasma/PlasmaParticleContainer.H index 383ea096d5..aac06653be 100644 --- a/src/particles/plasma/PlasmaParticleContainer.H +++ b/src/particles/plasma/PlasmaParticleContainer.H @@ -195,7 +195,7 @@ public: amrex::Real m_mass = 0; /**< mass of each particle of this species */ amrex::Real m_charge = 0; /**< charge of each particle of this species, per Ion level */ int m_n_subcycles = 1; /**< number of subcycles in the plasma particle push */ - bool m_do_push = true; /**< whether the plasma pusher is disabled */ + bool m_do_push = true; /**< whether the plasma pusher is enabled */ // ionization: From aaf234a5557ab9f2c6de1490fbd0abfc11e93521 Mon Sep 17 00:00:00 2001 From: "Eya D." <81635404+EyaDammak@users.noreply.github.com> Date: Thu, 13 Feb 2025 14:31:30 +0100 Subject: [PATCH 10/10] Update PlasmaParticleContainer.cpp --- src/particles/plasma/PlasmaParticleContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/particles/plasma/PlasmaParticleContainer.cpp b/src/particles/plasma/PlasmaParticleContainer.cpp index 40aaa2e860..f85c8c2114 100644 --- a/src/particles/plasma/PlasmaParticleContainer.cpp +++ b/src/particles/plasma/PlasmaParticleContainer.cpp @@ -173,7 +173,7 @@ PlasmaParticleContainer::ReadParameters () "Both 'fine_ppc' and 'fine_patch(x,y)' must be specified " "to use the fine plasma patch feature"); queryWithParserAlt(pp, "prevent_centered_particle", m_prevent_centered_particle, pp_alt); - queryWithParser(pp, "do_push", m_do_push); + queryWithParserAlt(pp, "do_push", m_do_push, pp_alt); } void