From f2be5a47f4630c99c863d42588beec67695fb5d3 Mon Sep 17 00:00:00 2001 From: gtrichardson Date: Thu, 17 Oct 2019 13:42:24 -0700 Subject: Added E-external particle option and updated documentation accodringly --- Docs/source/running_cpp/parameters.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Docs/source/running_cpp') diff --git a/Docs/source/running_cpp/parameters.rst b/Docs/source/running_cpp/parameters.rst index 631036373..21cdfc08e 100644 --- a/Docs/source/running_cpp/parameters.rst +++ b/Docs/source/running_cpp/parameters.rst @@ -386,6 +386,10 @@ Particle initialization It only works if `.do_qed = 1`. Enables non-linear Breit-Wheeler process for this species. **Implementation of this feature is in progress. It requires to compile with QED=TRUE** +* ``E_external & B_external`` (list of `float`) optional (default `0.0`) + Two seperate paramters which add a uniform E-field or B-field to each particle + which is then added to the field values gathered from the grid in the + PIC cycle. Laser initialization -------------------- @@ -573,6 +577,8 @@ Laser initialization ``mirror_z_width < dz/cell_size``, the upper bound of the mirror is increased so that it contains at least ``mirror_z_npoints``. + + Numerics and algorithms ----------------------- -- cgit v1.2.3 From 6df53e1380fa991b07645006b992d517bea93151 Mon Sep 17 00:00:00 2001 From: gtrichardson Date: Thu, 17 Oct 2019 13:55:54 -0700 Subject: I finally rememebred to delete EOl before the PR --- Docs/source/running_cpp/parameters.rst | 4 ++-- Source/Particles/PhysicalParticleContainer.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Docs/source/running_cpp') diff --git a/Docs/source/running_cpp/parameters.rst b/Docs/source/running_cpp/parameters.rst index 21cdfc08e..328dde8ce 100644 --- a/Docs/source/running_cpp/parameters.rst +++ b/Docs/source/running_cpp/parameters.rst @@ -389,7 +389,7 @@ Particle initialization * ``E_external & B_external`` (list of `float`) optional (default `0.0`) Two seperate paramters which add a uniform E-field or B-field to each particle which is then added to the field values gathered from the grid in the - PIC cycle. + PIC cycle. Laser initialization -------------------- @@ -577,7 +577,7 @@ Laser initialization ``mirror_z_width < dz/cell_size``, the upper bound of the mirror is increased so that it contains at least ``mirror_z_npoints``. - + Numerics and algorithms ----------------------- diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 38c7350ac..6c8d3ec86 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1132,7 +1132,7 @@ PhysicalParticleContainer::Evolve (int lev, Exp.assign(np,WarpX::E_external[0]); Eyp.assign(np,WarpX::E_external[1]); Ezp.assign(np,WarpX::E_external[2]); - + Bxp.assign(np,WarpX::B_external[0]); Byp.assign(np,WarpX::B_external[1]); Bzp.assign(np,WarpX::B_external[2]); @@ -1656,7 +1656,7 @@ PhysicalParticleContainer::PushP (int lev, Real dt, Exp.assign(np,WarpX::E_external[0]); Eyp.assign(np,WarpX::E_external[1]); Ezp.assign(np,WarpX::E_external[2]); - + Bxp.assign(np,WarpX::B_external[0]); Byp.assign(np,WarpX::B_external[1]); Bzp.assign(np,WarpX::B_external[2]); -- cgit v1.2.3 From dd293f5f3a6b1a0aaa1ed8784aba99c37b5c4a7b Mon Sep 17 00:00:00 2001 From: gtrichardson Date: Thu, 17 Oct 2019 13:57:57 -0700 Subject: Deleting blank lines in Laser section of Docs --- Docs/source/running_cpp/parameters.rst | 2 -- 1 file changed, 2 deletions(-) (limited to 'Docs/source/running_cpp') diff --git a/Docs/source/running_cpp/parameters.rst b/Docs/source/running_cpp/parameters.rst index 328dde8ce..10028ed41 100644 --- a/Docs/source/running_cpp/parameters.rst +++ b/Docs/source/running_cpp/parameters.rst @@ -577,8 +577,6 @@ Laser initialization ``mirror_z_width < dz/cell_size``, the upper bound of the mirror is increased so that it contains at least ``mirror_z_npoints``. - - Numerics and algorithms ----------------------- -- cgit v1.2.3 From e69b69a05b0e1c9f67320fa080910fad34fa804d Mon Sep 17 00:00:00 2001 From: gtrichardson Date: Thu, 17 Oct 2019 14:58:45 -0700 Subject: Fixed changes noted on PR comments. --- Docs/source/running_cpp/parameters.rst | 6 +++--- Source/Particles/PhysicalParticleContainer.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'Docs/source/running_cpp') diff --git a/Docs/source/running_cpp/parameters.rst b/Docs/source/running_cpp/parameters.rst index 10028ed41..24296d22d 100644 --- a/Docs/source/running_cpp/parameters.rst +++ b/Docs/source/running_cpp/parameters.rst @@ -386,9 +386,9 @@ Particle initialization It only works if `.do_qed = 1`. Enables non-linear Breit-Wheeler process for this species. **Implementation of this feature is in progress. It requires to compile with QED=TRUE** -* ``E_external & B_external`` (list of `float`) optional (default `0.0`) - Two seperate paramters which add a uniform E-field or B-field to each particle - which is then added to the field values gathered from the grid in the +* ``warpx.E_external`` & ``warpx.B_external`` (list of `float`) optional (default `0.0`) + Two separate parameters which add a uniform E-field or B-field to each particle + which is then added to the field values gathered from the grid in the PIC cycle. Laser initialization diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 6c8d3ec86..79a93abda 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -993,12 +993,12 @@ PhysicalParticleContainer::FieldGather (int lev, const FArrayBox& byfab = By[pti]; const FArrayBox& bzfab = Bz[pti]; - Exp.assign(np,0.0); - Eyp.assign(np,0.0); - Ezp.assign(np,0.0); - Bxp.assign(np,0.0); - Byp.assign(np,0.0); - Bzp.assign(np,0.0); + Exp.assign(np,WarpX::E_external[0]); + Eyp.assign(np,WarpX::E_external[1]); + Ezp.assign(np,WarpX::E_external[2]); + Bxp.assign(np,WarpX::B_external[0]); + Byp.assign(np,WarpX::B_external[1]); + Bzp.assign(np,WarpX::B_external[2]); // // copy data from particle container to temp arrays -- cgit v1.2.3