aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/MultiParticleContainer.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-01-29make sure we redefine the tmp particle tiles when we load balance. (#1658)Gravatar Andrew Myers 1-0/+8
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
2021-01-03Reconfigured the collision classes to allow for generalization (#1583)Gravatar David Grote 1-47/+5
* Reconfigured the collision classes to allow for generalization * Added literals to PairWiseCoulombCollision * Minor cleanup of PairWiseCoulombCollision.cpp, removing query of ndt * Add boilerplate to CollisionBase class * Fixed white space in CollisionBase.H Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-12-09Use new parser for more real input parameters (#1564)Gravatar NeilZaim 1-21/+21
2020-12-01Add the possibility to disable Schwinger in part of the domain (#1524)Gravatar NeilZaim 1-4/+82
* Add the possibility to disable Schwinger in part of the domain * Update checksum benchmarks * Only query ymin and ymax in 3D
2020-11-22CI: Windows (#1521)Gravatar Axel Huebl 1-4/+4
* CI: Windows Add an MSVC build to CI. * Windows: _USE_MATH_DEFINES Fix: ``` error C2065: 'M_PI': undeclared identifier ``` * Windows: no unistd.h fix: ``` fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory ``` * Injector: Trivially Copyable only GPU Only strictly required when we memcopy to accelerator devices. * Flex: never-interactive We don't use the interactive mode, so we can save some performance and address: ``` Parser\wp_parser.lex.cpp(1503,40): error C3861: 'isatty': identifier not found ``` Alternatively, we can include `<io.h>` on Windows. * MSVC: Vector<Long> != Vector<long> Fix return and assignment issues with `amrex::Long` != `long` in `amrex::Vector`. ``` Particles\MultiParticleContainer.cpp(438,13): error C2440: 'return': cannot convert from 'const amrex::Vector<amrex::Long,std::allocator<__int64>>' to 'amrex::Vector<long,std::allocator<long>>' Particles\MultiParticleContainer.cpp(452,94): error C2440: 'initializing': cannot convert from 'amrex::Vector<amrex::Long,std::allocator<__int64>>' to 'amrex::Vector<long,std::allocator<long>>' Particles\MultiParticleContainer.cpp(459,60): error C2665: 'amrex::ParallelDescriptor::ReduceLongSum': none of the 6 overloads could convert all the argument types Particles\WarpXParticleContainer.cpp(782,51): error C2665: 'amrex::ParallelDescriptor::ReduceLongSum': none of the 6 overloads could convert all the argument types ``` * Windows CI: Parallel Build
2020-11-11Fix error with nested MFIter loop in Schwinger (#1509)Gravatar NeilZaim 1-3/+3
2020-10-22Remove a few segfaults when there is zero particle species (#1449)Gravatar NeilZaim 1-16/+56
* Remove a few segfaults when there is zero particle species * Docs: Update Example * We don't have `part_per_proc` so exemplify with something else. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-10-19Replace wherever possible '.reset(new' with '= make_unique' (#1429)Gravatar Luca Fedeli 1-19/+19
* replace wherever possible .reset(new with = make_unique * fixed bug * fixed bug * revert WarpXOpenPMD.cpp to the original version * removed another .reset(new
2020-10-13[mini-PR] Fix warnings in QED module (#1433)Gravatar Luca Fedeli 1-1/+1
* fix warning concerning comparison of int and unsigned int * fix warning concerning unused variables
2020-10-05Add option to do collisions every # time steps (#1251)Gravatar Yinjian Zhao 1-2/+7
* Update inputs_3d * Update inputs_2d * Add ndt * Doc * Doc * Update inputs_3d * Update inputs_2d Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-10-02Split resampling TinyProfiler entry into 2 (#1390)Gravatar NeilZaim 1-2/+0
2020-10-02[Tiny] use_fdtd_nci_corr set to false for RZ (#1405)Gravatar Lígia Diana Amorim 1-1/+4
* Made particles.use_fdtd_nci_corr false for RZ * Added AMREX ALWAYS ASSERT * Fixed AMREX ASSERT * Revert "Fixed AMREX ASSERT" This reverts commit 902fcaabbf0c01b75cd7b38e7fd198e75cf1703d. * Revert "Added AMREX ALWAYS ASSERT" This reverts commit 7c56270730d0e1e4c9a2ab705cc0027e7ecc1a79. * Fixed confusion between commits
2020-09-28New Diagnostics: FieldMaximum (#988)Gravatar NeilZaim 1-9/+3
* Add MaxField reduced diagnostic * Add test of the MaxField reduced diag * Minor modifications * Fix test input file * Use read_raw_data.py module in test * Merge FieldEnergy and MaxField reduced diags * Add specific error message if old syntax is used * Fix column header numbers * Update copyright * Change name of diag in input file from Field to FieldReduced * Add comment when allocating MultiFAB * Add BackwardCompatibility () function * Update Source/Diagnostics/ReducedDiags/MultiReducedDiags.cpp Co-authored-by: MaxThevenet <mthevenet@lbl.gov> * Add FieldReduced.cpp in CMakeLists.txt * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Remove magic numbers and update MFIter construct * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Fix typo * Do a reduction on the fly instead of allocating a MultiFAB * Interpolate fields to cell center before computing maximum value of |E| and |B| * Reseparate FieldReduced into FieldEnergy and MaxField * Fix few typos * Replace MaxField with FieldMaximum Co-authored-by: MaxThevenet <mthevenet@lbl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-09-25Add CI test and documentation for leveling thinning algorithm (#1327)Gravatar NeilZaim 1-1/+1
* First working version of tests * Add comments to test * Add test in WarpX-test.ini and initial checksum json file * Add resampling to input parameters doc * Uncomment lines about checksum in analysis script + Fix minor typos * Add momentum in plotfiles (for checksum) + Fix minor typoes * Remove particle_theta from checksum json file * Remove rho from checksum json file * Fix syntax error in checksum json file * Add benchmark values * Update Docs/source/running_cpp/parameters.rst Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Have one Resampling object per species Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-09-23Option to have absorbing BC for particles, regardless of field BC (#1334)Gravatar MaxThevenet 1-0/+18
* option to have absorbing BC for particles, regarless of field BC * document input parameter particles.absorbing_bc * minor, just add a small comment * clarify doc and use better input parameter * clarify documentation
2020-09-21Coupling WarpX with an ✨improved✨ version of the QED library (#1198)Gravatar Luca Fedeli 1-90/+95
* Initial work to couple improved QED module to WarpX * WIP to couple with WarpX the new QED library * Continuing work to couple the new version of the QED library with WarpX * progress towards completing coupling with new version of QED library * WarpX coupled with new version of QED library * default behavior is to display table generation progress * some host device functions are now device only * fixed bug * bugfixing * updating tests * updated test * updated test * added initial version of tests (not working) * added check and updated a comment * fixed bug * added inputfiles and analysis script for new BW tests * test for BW process are ready * modified test * make lgtm happy * removed TABs * initial work to add QS tests (not working) * removed old tests * fixed bug in script * changed position of evolution of optical depth * progress with QSR tests * improved test * very low energy photons are always eliminated * added tests to regression suite * improved test * improved tests * removed redundant parameter * removed trailing white space * updated documentation * fix lgtm warnings * fixed missing check on chi parameter * fixed missing check on chi parameter & bugfixing * improved comments * increased tolerance in tests * updated units in test * now test succeds if the error is extremely small * updated checksums * fixed bug * fixed some unused or uninitialized variables warnings * now using ignore_unused instead of commenting out some variables * fixed warnings * partial fix of a test * fixed test * fixed test * added checksums * fixed tests * fixed benchmark for qed_schwinger2 * removed checksums for tests which do no exist anymore * fixed checksums for several qed tests * fixed checksums for several qed tests * fixed checksums * removed unwanted checksum * fixed checksum * removed files which should have been deleted * add some const * [skip ci] added some docstrings and some const * Update Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/ElementaryProcess/QEDInternals/QuantumSyncEngineWrapper.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * added some docstrings and some const * replaced ManagedVectors with DeviceVectors * Update Source/Particles/ElementaryProcess/QEDInternals/QedWrapperCommons.H Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * added some const * removed unwanted assert * updated comment * changed position of GPU synchronization directive * Update Docs/source/running_cpp/parameters.rst Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Examples/Modules/qed/quantum_synchrotron/analysis.py Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Examples/Modules/qed/quantum_synchrotron/analysis.py Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Examples/Modules/qed/breit_wheeler/analysis.py Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Examples/Modules/qed/breit_wheeler/analysis.py Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * add do_plot option to some analysis scripts * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * uncomment a line * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * simplified input scripts for BW tests * simplified input scripts for QS tests * removed unwanted files * simplified analysis script * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * reverted modification to schwinger analysis script * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * remove outdated comment * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Particles/MultiParticleContainer.cpp Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * fix warnings * made test more robust * reset benchmark for qed_breit_wheeler_2d * fixed bug in test * make test more robust * made test more robust * Update Examples/Modules/qed/quantum_synchrotron/analysis.py Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update Examples/Modules/qed/quantum_synchrotron/analysis.py Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> * Update run_test.sh Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Tools <warpx@lbl.gov> Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-09-14Add comments about resample virtual method (#1309)Gravatar NeilZaim 1-0/+1
2020-09-14Clean up profiling labels (#1320)Gravatar Edoardo Zoni 1-8/+8
2020-09-03Add structure for resampling algorithms (#1265)Gravatar NeilZaim 1-1/+12
* First version of resampling structure * Remove new warnings * Added Doxygen comments * Minor modifications * Add do_resampling() in OneStep_sub1 * Apply suggestions from code review Co-authored-by: Luca Fedeli <luca.fedeli.88@gmail.com> * Use mutable in ResamplingTrigger and replace run with operator() * Apply suggestions from code review Co-authored-by: MaxThevenet <maxence.thevenet@desy.de> * Make LevelingThinning operator() final Co-authored-by: Luca Fedeli <luca.fedeli.88@gmail.com> Co-authored-by: MaxThevenet <maxence.thevenet@desy.de>
2020-08-31Fix 🩹 (almost) all warnings ⚠️ with default configuration (DIM=3, ↵Gravatar Luca Fedeli 1-5/+5
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-24Fix some warnings (#1239)Gravatar Luca Fedeli 1-2/+2
This PR fixes the source of several compilation warnings. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-07-30Add input parameter to control Galerkin-scheme gather (#1191)Gravatar danielbelkin 1-1/+1
* 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-27Input: Remove n<something> options (#1217)Gravatar Axel Huebl 1-35/+22
* Input: Remove n<something> options The information in - lasers.nlasers - particles.nspecies - collisions.ncollisions is redundant with their `<...>.names` counter-part and requires users to change info at two locations. We just remove this now since we can query the size of names automatically in the parser. * Examples: remove n<something> Removes: - lasers.nlasers - particles.nspecies - collisions.ncollisions from examples. * QED: Update nspecies * Removed nspecies and nlasers from the Python interface Co-authored-by: Dave Grote <grote1@llnl.gov>
2020-07-08Averaged Galilean PSATD (#869)Gravatar Olga Shapoval 1-1/+3
* 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-74/+88
* 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-05-13Fix error with Schwinger when multiple tiles are used (#1013)Gravatar NeilZaim 1-1/+1
2020-05-11Add Schwinger process (#784)Gravatar NeilZaim 1-2/+148
* Initial work to add back QED particle generation * Work in progress: port old QED routines * Add two distinct CopyFuncs * modified getMFItInfo and CopyFunc (not working) * bugfixing & work to add back QED particle creation routines * bugfixing * added back quantum photon emission * bugfixing * bugfixing * added back pair generation (still some bugs in photon emission) * removed unwanted check * bugfixing * bugfixing * bugfixing * Moved QED folder * added comments + some refactoring * added comments * remove some virtual functions to make lgtm happy * updated tests * added PhysicalParticleType * bugfixing * added copyright * improved comments * improved comments * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * moved inclusion of QEDInternals folder * moved some inclusion directives between Make files * moved some inclusion directives between Make files (forgot to add a file) * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * corrected alignment * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * removed some unnecessary amrex:: * add missing comment * Replaced BL_PROFILE with WARPX_PROFILE * bugfixing and making some variables const * removed some moves * removed some moves * started to change tau into optical_depth_BW or optical_depth_QSR * Using initialization policy to initialize optical depth * bugfixing * forgot to add a file * fixed bug * Revert "fixed bug" This reverts commit a3fb98d10cc30327635aeaa71451a05ca2229ff4. * Define doQEDSchwinger function * Read input parameters for Schwinger process * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Added doQEDEvents to OneStep_sub1 * add a bunch of const * add _rt suffix * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * added path to included files * Introduced a templated AmIA<something> function using physical_species * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * added paths to included headers * updated documentation * updated examples * bugfixing * bugfixing * fixing examples * fixed example * fixed example * correct a misprint in error message * fixed issue related to 1./mass for photons * Add skeleton of doQEDSchwinger function * Linked to PICSAR to calculate pair production rate * Added missing header file * fix conflicts in QEDPhotonEmission.H * Written first version of FilterCreateTransformFromFAB.H * Cleanup some useless comments * Update Source/Particles/ElementaryProcess/QEDInternals/SchwingerProcessWrapper.H Co-Authored-By: Luca Fedeli <luca.fedeli.88@gmail.com> * Update Source/Particles/ParticleCreation/FilterCreateTransformFromFAB.H Co-Authored-By: Luca Fedeli <luca.fedeli.88@gmail.com> * Update Source/Particles/ParticleCreation/FilterCreateTransformFromFAB.H Co-Authored-By: Luca Fedeli <luca.fedeli.88@gmail.com> * Minor revisions and improvements * Remove trailing white spaces * Write filter function * Remove print * Some debugging and cleaning * Write tranform function * remove transform_dummy * Added some tests * Remove EOL whitespaces * update prepare_file_travis.py * Should fix error in automated tests * Make the tests run in parallel * Put path relative to Source/ in includes * update include path * Actually resolve conflicts * put dVdt and weight_index as members of filter and transform functions * a bit of debugging on GPU * Add comments and documentation * Fix typos * Add assert for single precision * Update Docs/source/running_cpp/parameters.rst Co-Authored-By: Luca Fedeli <luca.fedeli.88@gmail.com> * Update Source/Particles/MultiParticleContainer.H Co-Authored-By: Luca Fedeli <luca.fedeli.88@gmail.com> * Update Source/Particles/ParticleCreation/FilterCreateTransformFromFAB.H Co-Authored-By: Luca Fedeli <luca.fedeli.88@gmail.com> * Add profiler and minor modifications * Fix typo * Update asserts so that module works with momentum conserving algo * update assert if particles are created in analysis script * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Add comments to FilterCopyTransform and FilterCreateTransform functions * Add const and comment * Update Source/Particles/ParticleCreation/FilterCreateTransformFromFAB.H Co-authored-by: MaxThevenet <mthevenet@lbl.gov> * Update test for new diags and remove AllContainerType * Update Regression/WarpX-tests.ini * update test * update tests * Split Schwinger test into 4 separate tests * Change name of analysis script * update tests * Combine all analysis scripts into a single one Co-authored-by: Luca Fedeli <luca.fedeli@cea.fr> Co-authored-by: Luca Fedeli <luca.fedeli.88@gmail.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: MaxThevenet <mthevenet@lbl.gov> Co-authored-by: Neil <nzaim@iram-fe-003981.extra.cea.fr>
2020-04-23New diags also handle particle (#938)Gravatar MaxThevenet 1-2/+1
* new class for particle diagnostics * copy all diag properties from WarpXParticleContainer to ParticleDiag * revert change of input example * add some comments * eol * OpenPMD flush format for new diags * eol * fix compilation for new diags with QED * fix bug when QED off * fix typo and include suggestion from review * Remove Dead Code, Add TODO Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * changes due to code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-03-17Add some WarpXUtilMsg::AlwaysAssert in particle containers (#811)Gravatar Luca Fedeli 1-5/+19
* replaced AMREX_ALWAYS_ASSERT_WITH_MESSAGE with WarpXUtilMsg::AlwaysAssert where needed * reverted horrible mistake
2020-03-17Add QED particle creaction routines (#698)Gravatar Luca Fedeli 1-22/+210
* Initial work to add back QED particle generation * Work in progress: port old QED routines * Add two distinct CopyFuncs * modified getMFItInfo and CopyFunc (not working) * bugfixing & work to add back QED particle creation routines * bugfixing * added back quantum photon emission * bugfixing * bugfixing * added back pair generation (still some bugs in photon emission) * removed unwanted check * bugfixing * bugfixing * bugfixing * Moved QED folder * added comments + some refactoring * added comments * remove some virtual functions to make lgtm happy * updated tests * added PhysicalParticleType * bugfixing * added copyright * improved comments * improved comments * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * moved inclusion of QEDInternals folder * moved some inclusion directives between Make files * moved some inclusion directives between Make files (forgot to add a file) * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * corrected alignment * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * removed some unnecessary amrex:: * add missing comment * Replaced BL_PROFILE with WARPX_PROFILE * bugfixing and making some variables const * removed some moves * removed some moves * started to change tau into optical_depth_BW or optical_depth_QSR * Using initialization policy to initialize optical depth * bugfixing * forgot to add a file * fixed bug * Revert "fixed bug" This reverts commit a3fb98d10cc30327635aeaa71451a05ca2229ff4. * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Added doQEDEvents to OneStep_sub1 * add a bunch of const * add _rt suffix * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * added path to included files * Introduced a templated AmIA<something> function using physical_species * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * added paths to included headers * updated documentation * updated examples * bugfixing * bugfixing * fixing examples * fixed example * fixed example * correct a misprint in error message * fixed issue related to 1./mass for photons * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * make the use of energy_threshold more transparent * remove unnecessary checks * bigfixing * added comment * separate checks for QED processes * added a CheckIonizationProductSpecies for consistency * bugfixing * now using a new variable for photon energy creation threshold * removed unwanted comment * added option to set a user-defined threshold for photon creation * bugfixing * updated documentation * updated example to include new option * updated doc * fixed merge conflict * correct bug in example * reorganized function Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-16Add AlwaysAssert with std::string message (#792)Gravatar Luca Fedeli 1-2/+6
* added new function WarpXUtilMsg::AlwaysAssert * Update Source/Utils/WarpXUtil.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Utils/WarpXUtil.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * rename argument of AlwaysAssert * updated documentation of Always Assert Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-12Changed BL_ASSERT to AMREX_ALWAYS_ASSERT for user input (#798)Gravatar David Grote 1-6/+6
* Changed BL_ASSERT to AMREX_ALWAYS_ASSERT for user input * Fixed typo when replacing BL_ASSERTs
2020-03-06Remove old electrostatic code (#780)Gravatar Remi Lehe 1-69/+0
* Create inputs * fixed stuff * Make smaller test * Re-use EvolveEM for ES calculation * Use correct variable const_dt * Avoid out of bound and modify computation of electrostatic field * Update test file * Remove tab * Minor refactoring of space-charge calculation * Remove old electrostatic files * Fix electrostatic test * Rename WarpXEvolveEM to WarpXEvolve * Use if conditions instead of ifdef * Correct initialization of `do_electrostatic` * Fix static variable * Add documentation for `do_electrostatic` * Remove more electrostatic code Co-authored-by: dbizzozero <dbizzozero@users.noreply.github.com>
2020-02-27Comment/Remove Unused Parameters (#749)Gravatar Axel Huebl 1-2/+2
Use the `clang-tidy` pass `misc-unused-parameters` to remove unused parameter warnings. https://clang.llvm.org/extra/clang-tidy/checks/misc-unused-parameters.html) Committed as generic user so git does not credit the many lines to me: ```bash GIT_AUTHOR_NAME="Tools" GIT_AUTHOR_EMAIL="warpx@lbl.gov" \ git commit ```
2020-02-25Includes: Clean Up (#743)Gravatar Axel Huebl 1-6/+4
- 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-3/+3
* 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-21Call AMReX Bin sort (#739)Gravatar MaxThevenet 1-2/+2
* call AMReX Bin sort instead of Cell sort * proper initialization of bin size * IntVect declaration must work in 2D and 3D * Apply suggestions from code review Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * remove print statement Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-02-10template Parser so that it works for any number of variablesGravatar Weiqun Zhang 1-12/+12
2020-02-07Merge pull request #688 from atmyers/two_way_processGravatar MaxThevenet 1-2/+2
Handle two-way processes and multiplicity
2020-02-07Merge pull request #687 from EZoni/build-buffer-masksGravatar MaxThevenet 1-1/+0
Fortran to C++: build buffer masks
2020-02-06Do not include 'WarpX_f.H' when not necessary.Gravatar Edoardo Zoni 1-1/+0
2020-02-06fix TABsGravatar Andrew Myers 1-1/+1
2020-02-06make the multiplicity a template parameter so it can be known at compile timeGravatar atmyers 1-4/+2
2020-02-06add multiplicity argument to filterCopyTransform so we can handle cases like ↵Gravatar atmyers 1-1/+3
splitting.
2020-02-04move the resize into the FilterCopyTransform call, where we know exactly how ↵Gravatar Andrew Myers 1-8/+0
big to make the dst
2020-02-04fix EOL whitespaceGravatar Andrew Myers 1-1/+1
2020-02-04exit early in the case that there are 0 src particlesGravatar Andrew Myers 1-7/+9
2020-02-03fix EOL whitespaceGravatar Andrew Myers 1-5/+5
2020-02-03move filterCopyTransform to its own fileGravatar Andrew Myers 1-3/+3