aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/RigidInjectedParticleContainer.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-07-27Starting with the pusher, consistently use ParticleReal (#3259)Gravatar David Grote 1-18/+18
* Starting with the pusher, consistently use ParticleReal * Update benchmarks for background_mcc_dp_psp
2022-03-28Clean up handling of `v_galilean` (#2989)Gravatar David Grote 1-1/+1
* Cleaned up handling of v_galilean * Missed one * Update Source/WarpX.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/WarpX.H Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/WarpX.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Particles/PhotonParticleContainer.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/FieldSolver/WarpXPushFieldsEM.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Diagnostics/ReducedDiags/FieldProbe.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Particles/WarpXParticleContainer.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Particles/WarpXParticleContainer.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Diagnostics/ReducedDiags/ParticleExtrema.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Particles/PhysicalParticleContainer.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Particles/PhysicalParticleContainer.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Utils/WarpXUtil.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Particles/RigidInjectedParticleContainer.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/Particles/ElementaryProcess/Ionization.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/FieldSolver/WarpXPushFieldsEM.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * More cleanup * Reset Galilean Benchmarks * For mirrors, now include the Galilean shift * Removed the flag since it is true for all calls * Fix Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp * Update Source/WarpX.H Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2022-03-01ionization_level -> ionizationLevel (#2905)Gravatar Axel Huebl 1-1/+1
Rename to follow the naming conventions we use for I/O for scalar and vector/tensor attributes. https://warpx.readthedocs.io/en/latest/developers/particles.html#particle-attributes
2022-02-25Make rigid injected particles work with QED (#2861)Gravatar Neïl Zaim 1-24/+51
* Make rigid injected particles work with QED Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it> * Update Source/Particles/RigidInjectedParticleContainer.cpp Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it> Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it>
2022-02-11Fix some offsets with the gather buffers (#2847)Gravatar Neïl Zaim 1-24/+22
2022-02-11Rename ngE as ngEB (used for E,B) (#2841)Gravatar Edoardo Zoni 1-2/+2
2022-02-05Fixes removing implicit double to float conversions (#2687)Gravatar David Grote 1-5/+5
* Fixes removing implicit double to float conversions * Minor fix in Evolve * Removed comments * Reverted amrex::second to original version. This change will be made in a separate PR * More fixes * Performance: pow2 & pow3 * One more pow2 * Cleaning: auto where types are repetitive std::pow(float, int): see comments and https://stackoverflow.com/a/5627278/2719194
2021-12-07Transform the external fields into the boosted frame (#2610)Gravatar David Grote 1-4/+2
They should be specified in the lab frame
2021-12-06Define WARPX_ZINDEX to denote the index for the Z dimension regardless of ↵Gravatar Phil Miller 1-3/+2
the build's dimensionality (#2622) * Define WARPX_ZINDEX to denote the index for the Z dimension regardless of the build's dimensionality * Add WARPX_ZINDEX macro definition to Makefile as well
2021-09-30Remove array of ints `done_injecting` (#2365)Gravatar Remi Lehe 1-3/+1
2021-09-30Rigid injected species: Remove unused function and variables (#2350)Gravatar Remi Lehe 1-101/+0
* Remove unused function * Remove `focused` and `projected` for rigid particles
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 1-14/+38
* initial tests with IWYU * added a couple of forward declarations * used iwyu on more files * progress * used iwyu on more files * progress with iwyu * progress with iwyu * fixed bug * progress with iwyu * progress with IWYU * progress with IWYU * fixed bug * fixed bug * progress with IWYU * progress with IWYU + use forward declarations in WarpX.H * first try with .def files * fix bugs * progress with IWYU * progress with IWYU * progress with iwyu * correct copyright * fixed bug * fixed bugs * fix missing include * fixed bug * fix bug * fix bug introduced during last bugfix * use iwyu on newly added files * add space * fix bug * fix missing include * fix missing include * fix missing include * fixed bugs * fixed bug * attempt at fixing issue with math functions * added missing include * fixed missing include * using _fwd.H * fixed bug * progress with iwyu * update AMReX branch * enforce alphabetic order * progress with iwyu * use right version of amrex * use right version of amrex for tests * fixed bug * fix another bug * fix missing include * fix missing include * fix missing include * updated amrex * initial work to document new include strategy * updated documentation * Fix rst & private includes * Remove accidentially added files * Fix rst code blocks * one more rst block Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-06-11Fix Offset: PushPX -> evolve_opt (#2011)Gravatar Axel Huebl 1-15/+15
* Fix Offset: PushPX -> evolve_opt Comparing to the `doParticlePush()` above, the `ux`/`uy`/`uz` SoA attributes seem to lack the particle offset in `PushPX`. Also simplifies the offset calculation to reside off-kernel, which saves 8 bytes cmem and some index indirection logic for the compiler. * RigidInjected Particle: Fix Offset Looks like this is missing here, too?
2021-04-13Add an option to skip deposition in the `Evolve` function ; use it for ↵Gravatar Remi Lehe 1-2/+2
electrostatic (#1807) * Introduce new option skip_deposition * Properly implement the option to skip deposition * Skip deposition for electrostatic solver * Correct typo
2021-03-30Remove the avg_aux fields (#1849)Gravatar Remi Lehe 1-4/+0
* Remove the avg_aux fields * Update 3D benchmark * Update benchmark in 2D * Initialize Bfield_avg_cp * Fix two whitespaces left out * Fix two more whitespaces left out Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-03-18Use Clear Naming Standard for ParmParse Variables (#1809)Gravatar Edoardo Zoni 1-5/+5
2021-03-17Replaced almost all nGrow with nGrowVect (#1801)Gravatar David Grote 1-2/+2
2021-03-04RigidInjectedParticleContainer: clean duplicated code (#1752)Gravatar Luca Fedeli 1-8/+3
* avoid code duplication and implicit conversion from int* to bool * elimitate != nullptr
2021-02-08Fix: Missing Geometry Includes (#1690)Gravatar Axel Huebl 1-0/+2
2021-01-21Define: _OPENMP -> AMREX_USE_OMP (#1520)Gravatar Axel Huebl 1-4/+4
* Define: _OPENMP -> AMREX_USE_OMP Replace the define check of `_OPENMP` with the explicit backend control of `AMREX_USE_OMP` for parallel constructs. Doing so avoids that we accidentially turn on OpenMP, e.g. if a dependency pulls it in for linear algebra, I/O, etc. This can led to confusion if the user explicitly requested a serial build. Also, we might want to use OpenMP functionality here and there for auxiliary functions w/o having to use the AMReX OpenMP backend, i.e. because we compile for GPUs. * Add missing amrex::Gpu::notInLaunchRegion
2020-12-02More parser-enabled ParmParse.query and ParmParse.get (#1501)Gravatar MaxThevenet 1-1/+1
* Parser can be used for most input parameters, including charge and mass * update documentation for the math parser * eol * remove typo and update doc for parser * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-09-17Fix few compilation warnings (shift) (#1310)Gravatar Luca Fedeli 1-4/+1
* fix << declaration of galilean_shift shadows a member of WarpX >> * fix << unused mu_stag >> * fix << unused uxp, uyp, uzp >> * renamed galilean_shift (member variable of WarpX class) into m_galilean_shift * renamed v_galilean to m_v_galilean when appropriate * fixed bug introduced in latest commit * fix <<comparison of integer expressions of different signedness>> * Update Source/FieldSolver/FiniteDifferenceSolver/MacroscopicEvolveE.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-09-08Remove ManagedVector from Particles/ (#1273)Gravatar WeiqunZhang 1-7/+13
2020-08-31Fix 🩹 (almost) all warnings ⚠️ with default configuration (DIM=3, ↵Gravatar Luca Fedeli 1-1/+0
openMP+MPI, double precision, no advanced solvers, no QED, native output) (#1263) This PR should fix almost all the compilation warnings in the default configuration (DIM=3, openMP+MPI, double precision, no advanced solvers, no QED, native output...). Or at least it does that on my system (my compiler is `g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0` ). I have just two residual warnings: ### 1 ``` [ 89%] Building CXX object CMakeFiles/WarpX.dir/Source/Parser/wp_parser.lex.cpp.o wp_parser.lex.c:1356:17: warning: ‘void yyunput(int, char*)’ defined but not used [-Wunused-function] ``` I don't know if `yyunput(int, char*)` is there for a reason, even if it is not used. So I didn't do anything. ### 2 ``` [ 96%] Building CXX object CMakeFiles/WarpX.dir/Source/Utils/CoarsenIO.cpp.o /home/luca/Projects/warpx_dir/WarpX/Source/Particles/WarpXParticleContainer.cpp: In member function ‘void WarpXParticleContainer::AddNParticles(int, int, const ParticleReal*, const ParticleReal*, const ParticleReal*, const ParticleReal*, const ParticleReal*, const ParticleReal*, int, const ParticleReal*, int, int)’: /home/luca/Projects/warpx_dir/WarpX/Source/Particles/WarpXParticleContainer.cpp:102:44: warning: unused parameter ‘nattr’ [-Wunused-parameter] 102 | int nattr, const ParticleReal* attr, int uniqueparticles, int id) ``` The first line of `AddNParticles` is `BL_ASSERT(nattr == 1); //! @fixme nattr is unused below: false sense of safety` . So I thought that there might be something to fix here and I didn't do anything.
2020-08-06swap fieldGather and external fields (#1235)Gravatar Revathi Jambunathan 1-3/+2
* swap fieldGather and external fields * clarify EB external on particle for RZ * swap order and initialize Exp-Bzp for Photons
2020-07-30Add input parameter to control Galerkin-scheme gather (#1191)Gravatar danielbelkin 1-2/+2
* Rename l_lower_order_in_v to galerkin_interpolation * Changed galerkin_interpolation from int to bool * ... and same for member versions. * Add input parameter to control galerkin_interpolation * Update documentation * semicolon * Update Docs/source/running_cpp/parameters.rst Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Docs/source/running_cpp/parameters.rst Resolve ambiguity Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Fix doc * Add references to documentation Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-07-08Averaged Galilean PSATD (#869)Gravatar Olga Shapoval 1-0/+4
* Read Galilean velocity * Prepare structures for Galilean solver * Started implementing Galilean equations * Analytical limits for X1, X2, X3, X4 coefficients added * Slight changes added * Added Galilean position pusher * Scale galilean velocity * Remove unneeded Abort * Fix Galilean pusher * Allocate Theta2 array * Fix definition of coefficients * Increase guard cells for Galilean * Add guard cell in particle exchange * Added modifications for PICSAR galilean branch * Averaged coefficients added * Type corrected * v_gal added to warpx_current_deposition * v_gal added to WarpXParticleContainer.H * Bug fixed - update particle x-position over one time step * Fix issues with merge from dev * Averaged fileds allocated on fine patch (Ex) * Preparation for merging dev into galilean. * remove TABs by hand * Removed a tab. * Redeclared v_galilean as a vector & related changed * Added an automated test * Moved v_galilean inside WarpX constructor * Added analysis script for the automated test * Changed name of the automated test to galilean_psatd * Added InitializeSpectralCoefficients method * Removed temporary comments * Averaged fields added to FiledGather * Added infinite order k[i] * Setting kx_mod( kz_mod) = 0 for index = nx/2(-nz/2) * Adding galilean shift * Implemented galilean shift * Changed method's name from GalileanShift to ShiftGalileanBoundary * Added doxygen string for ShiftGalileanBoundary * Removed never used method LowerCornerWithCentering * Removed temporary comments * Removed dt as a variable from DepositCharge method and its dependencies * Changing type of v_galilean from amrex::Vector to amrex::Array * Changed back ng_fft to be equal nox_fft * Changed v_galilean's type from amrex::vector to amrex::array * Removed type * Removed temporary comments * Added flag 'do_time_averaging' to swith from unaveraged to averaged Galilean PSATD * Updated doxygen * Small fix on using 'do_time_averaging' flag * Remove some commented Print statements * [skip ci] Further cleanup * Fix compilation * Guard cells update of the averaged E,B fields * Corrected included header file accordingly * Removed EOL * Removed EOL * Corrected path of the included header file * Updated choice of the spectral solver. * Cleanup. * use amrex::exp instead of std::exp * no backward FFT for avg fields if avg is off * Need to shift avg fields in MoveWindow * Further cleaning * Added 2D automated test for averaged PSATD * Added automated 2D and 3D tests for averaged PSATD * Removed comments * Added specifications for averaged Galilean PSATD tests. * Bug fixed - do FillBoundary of the averaged fields only if averaged is activated * Do shiftMF of the averaged fields only if fft_do_time_averaging=true * Add checksum json benchmarks for averaged Galilean PSATD * Add missing indentation * Add missing indentation * Updated automated analysis script * Updated diags period * Fixed bug: no backtransform of the averaged fields when WARPX_DIM_RZ is set * Fixed an uninitialized variable * Clean-up * Changed permissions for analysis_avg_*d.py * Compactified variables initialization via conditional assignment * Initialized averaged E_avg, B_avg fields * Updated automated test for 2D averaged galilean PSATD * Updated benchmark for 2D averaged galilean PSATD * Updated automated 2D averaged PSATD test & benchmark * Updated automated 3D averaged PSATD test & benchmark * Fixed typo * Updated benchmark averaged_galilean_3d_psatd * Initialize the averaged fields only if the averaged Galilean PSATD algorithm is enabled * Encreased time step for automated 3D averaged Galilean PSATD (to be equal c*dt=dz while dz/dx=3) * Updated 3D automated test: specified standard deviations `.ux_th, .uy_th, .uz_th` along each direction * Typo from the previous commit: enabled the averaged algorithm * Trying out another input parameters for 3D averaged automated test with v_gal = v_plasma * Update benchmark for previously added 3D averaged automated test * Update 2D averaged automated test and corresponding benchmark * Revert "Updated diags period" This reverts commit 7334729b05e96589e020c981efdb430ca095991d. * Cleanup: removed unwanted comment. * Added descriptions of the 2D and 3D automated tests for the averaged Galilean PSATD. * Updated value calculated via standard Galilean PSATD. * Encreased relative error tolerance for 3D automated test for the averaged Galilean PSATD. * Removed to avoid duplication since it already specified in the corresponding 2D/3D input scripts. * Removed unwanted empty lines * Added spaces after function's names * Removed unwanted empty line * Removed * Fixed indentation * Cleanup: removed #include <math.h> * Cleanup: removed empty lines and fixed indentation * Added 'AvgGalileanAlgorithm.cpp' to 'CMakeLists.txt' Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-06-22Remove persistent E+B (#1050)Gravatar Andrew Myers 1-118/+131
* add functor for doing the tmp particles copy for the back-transformed diagnosti * merge the particle push options into one kernel * EOL * fix assertion * add a FieldGatherandPushPX method to PhysicalParticleContainer * handle offset in copyAttribs * allow this functor to be constructed even it we aren't doing the back transformed diagnostics * EOL * update the overloads of PushPX for the Photon and RigidInjected ParticleContainers * function for dispatching the right field gather * init this val to 0.0 * fix some typos * handle scaling the fields for rigid injection * EOL * don't need to get pointers to E and B arrays in PushPX any more. * actually I can't remove these yet * EOL * variable order bug * move the QED stuff to the proper place * EOL * make sure we don't build these functors unless the runtime options are toggled * EOL * perform the field gather prior to the photon particle push * remove E and B components and FieldGather methods. Reimplement PushP for rigid injected and physical particles * update ionization to do field gather inline * remove E and B from the particle diagnostics * don't write E or B in these tests for particles * add missing files * remove EB from the Regtest ini file too * no need to do this twice * important typo * also do the gather inline for the QED processes that need to * move these sources inside ifdef for QED * fix bug in RZ * remove some fields from the Python tests. * remove all particle E and B comps from json benchmarks * don't assert that Ey is the langmuir output * remove uy from this output * update test * restore the mesh fields I turned off by mistake * turn off field IO for a few python tests I missed * fix typo * reset Langmuir_multi benchmark * update Langmuir_multi_nodal benchmark * update single precision langmuir bench * update psatd single precision languir one too * also do ionization_lab * finally, ionizaiton_boost * update benchmarks_json/Langmuir_multi_psatd.json * update benchmarks_json/Langmuir_multi_psatd_current_correction.json * update benchmarks_json/Langmuir_multi_psatd_momentum_conserving.json * update benchmarks_json/Langmuir_multi_psatd_nodal.json * remove the particle E and B from the choices in the docs * fix offset bug * also add the Gather subdirectory * Update Source/WarpX.H Co-authored-by: MaxThevenet <mthevenet@lbl.gov> * add docstring for LowerCornerWithGalilean * add new source files to CMakeLists.txt * also need to update the GPU regression tests * update the name of the output file for this python test * remove field gather call from FieldDiagnostics * fix typo in docstring * init fields to 0 * add docstring to the CopyParticleAttribs constructor * some explicit amrex::namepace Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-06-19Fix: Extra Semicolons & In-Line Doxygen (#1109)Gravatar Axel Huebl 1-1/+1
Fix superfluous semicolons and two in-line doxygen strings.
2020-03-30Port rigid injection to the gpu (#862)Gravatar Andrew Myers 1-32/+41
* port rigid injection to the gpu * eol * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * define csqi Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-30Remove compiler warnings (#843)Gravatar Edoardo Zoni 1-4/+0
* Fix compiler warnings with DIM=2 * Fix compiler warnings with USE_RZ=TRUE * Fix compiler warnings with USE_PSATD=TRUE and DIM=2 * Fix compiler warnings with USE_PSATD=TRUE and DIM=3 * Fix bug: discard only return value when calling DefineAndReturnParticleTile * Remove unused variables not triggering warnings
2020-02-25Includes: Clean Up (#743)Gravatar Axel Huebl 1-13/+14
- Use `""` for WarpX-local includes - Order: WarpX `""`, AMReX `<>`, other third party includes `<>` - Add dir prefixes for WarpX Add order to includes by including from `Source/` onward and keeping directory prefixes of non-local includes for clarity.
2020-02-24Profiler wrapper to allow for cudaDeviceSynchronize (#738)Gravatar MaxThevenet 1-1/+1
* add warpx profiler wrapper * call WX profiler wrapper instead of BL * EOL and cleaning * add doc on profile syncs * do not use PROFILE macros in .H files * replace WX_PROFILE with WARPX_PROFILE and use bool instead of int * typo * this file shouldn't be there
2020-02-06Do not include 'WarpX_f.H' when not necessary.Gravatar Edoardo Zoni 1-1/+0
2020-01-31Merge branch 'dev' into soa_to_aosGravatar Andrew Myers 1-0/+9
2020-01-29rename get/set particle position functorsGravatar Andrew Myers 1-16/+16
2020-01-29Real -> ParticleRealGravatar Andrew Myers 1-5/+5
2020-01-28fix EOL whitespaceGravatar Andrew Myers 1-32/+38
2020-01-28handle rigid injection and particle splittingGravatar Andrew Myers 1-18/+28
2020-01-28switch deposition, gather, and pushers to use the get / set position functorGravatar Andrew Myers 1-6/+1
2020-01-27fix EOL whitespaceGravatar Andrew Myers 1-6/+6
2020-01-27remove the copies between soa and aos for the particle positionsGravatar Andrew Myers 1-78/+80
2020-01-27Automatically add copyright header with update_copyright.shGravatar Tools 1-0/+9
2020-01-13moving E/B parser variables to MultiParticleContainer class. changing input ↵Gravatar RevathiJambunathan 1-7/+0
files appropriately.
2019-11-11Cuda -> Gpu according to AMReX changeGravatar Weiqun Zhang 1-6/+6
2019-10-28Merge branch 'dev' into initial_fieldsGravatar MaxThevenet 1-4/+32
2019-10-22Merge branch 'dev' into classical_radiation_reactionGravatar Luca Fedeli 1-3/+11
2019-10-17replace external field added to particle E_external with ↵Gravatar MaxThevenet 1-6/+6
E_external_particle, same for B
2019-10-17Incldued E_external optionGravatar gtrichardson 1-3/+3
2019-10-15Add E_externalGravatar Yin-YinjianZhao 1-3/+3