aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/ElementaryProcess/QEDInternals (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-08-29Clang tidy CI test: add more readability checks to clang tidy CI test (#4146)Gravatar Luca Fedeli 2-7/+7
* add more readability checks to clang-tidy CI test * reformat check list * starting to address issues found with clang-tidy£ * addressing issues * remove check * address issues * address all issues * address issue found with github code scanning
2023-08-12Transition to pyAMReX (#3474)Gravatar Axel Huebl 1-1/+1
* pyAMReX: Build System * CI Updates (Changed Options) * Callback modernization (#4) * refactor callbacks.py * added binding code in `pyWarpX.cpp` to add or remove keys from the callback dictionary * minor PR cleanups Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Added Python level reference to fetch the multifabs (#3) * pyAMReX: Build System * Added Python level reference to Ex_aux * Now uses the multifab map * Fix typo Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Add initialization and finalize routines (#5) A basic PICMI input file will now run to completion. * Regression Tests: WarpX_PYTHON=ON * Update Imports to nD pyAMReX * IPO/LTO Control Although pybind11 relies heavily on IPO/LTO to create low-latency, small-binary bindings, some compilers will have troubles with that. Thus, we add a compile-time option to optionally disable it when needed. * Fix: Link Legacy WarpXWrappers.cpp * Wrap WarpX instance and start multi particle container * Fix test Python_pass_mpi_comm * Start wrapper for multiparticle container * Add return policy Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update fields to use MultiFabs directly Remove EOL white space Removed old routines accessing MultiFabs Update to use "node_centered" * Fix compilation with Python * Update fields.py to use modified MultiFab tag names * Remove incorrect, unused code * Add function to extract the WarpX MultiParticleContainer * Complete class WarpXParticleContainer * Wrap functions getNprocs / getMyProc * restore `install___` callback API - could remove later if we want but should maintain backward compatibility for now * add `gett_new` and `getistep` functions wrappers; fix typos in `callbacks.py`; avoid error in getting `rho` from `fields.py` * Update callback call and `getNproc`/`getMyProc` function * Replace function add_n_particles * Fix setitem in fields.py for 1d and 2d * also update `gett_new()` in `_libwarpx.py` in case we want to keep that API * added binding for `WarpXParIter` - needed to port `libwarpx.depositChargeDensity()` which is an ongoing effort * Wrap function num_real_comp * added binding for `TotalNumberOfParticles` and continue progress on enabling 1d MCC test to run * add `SyncRho()` binding and create helper function in `libwarpx.depositChargeDensity` to manage scope of the particle iter * Clean up issues in fields.py * update bindings for `get_particle_structs` * Fix setitem in fields.py * switch order of initialization for particle container and particle iterator * switch deposit_charge loop to C++ code; bind `ApplyInverseVolumeScalingToChargeDensity` * move `WarpXParticleContainer.cpp` and `MultiParticleContainer.cpp` to new Particles folder * added binding for `ParticleBoundaryBuffer` * More fixes for fields.py * Fix: Backtraces from Python Add the Python executable name with an absolute path, so backtraces in AMReX work. See linked AMReX issue for details. * Cleaning * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix: Backtraces from Python Part II Do not add Python script name - it confuses the AMReX ParmParser to build its table. * Fix: CMake Dependencies for Wheel This fixes a racecondition during `pip_install`: it was possible that not all dimensions where yet build from pybind before we start packing them in the wheel for pip install. * MCC Test: Install Callbacks before Run Otherwise hangs in aquiring the gil during shutdown. * addition of `Python/pywarpx/particle_containers.py` and various associated bindings * Fix: CMake Superbuild w/ Shared AMReX We MUST build AMReX as a shared (so/dll/dylib) library, otherwise all the global state in it will cause split-brain situations, where our Python modules operate on different stacks. * add `clear_all()` to callbacks in order to remove all callbacks at finalize * add `-DWarpX_PYTHON=ON` to CI tests that failed to build * add `get_comp_index` and continue to port particle data bindings * Add AMReX Module as `libwarpx_so.amr` Attribute to pass through the already loaded AMReX module with the matching dimensionality to the simulation. * Fix for fields accounting for guard cells * Fix handling of ghost cells in fields * Update & Test: Particle Boundary Scraping * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * CI: Python Updates - modernize Python setups - drop CUDA 11.0 for good and go 11.3+ as documented already ``` Error #3246: Internal Compiler Error (codegen): "there was an error in verifying the lgenfe output!" ``` * CI: Python Updates (chmod) * Add support for cupy in fields.py * Add MultiFab reduction routines * CI: CUDA 11.3 is <= Ubuntu 20.04 * changed `AddNParticles` to take `amrex::Vector` arguments * setup.py: WarpX_PYTHON=ON * update various 2d and rz tests with new APIs * add `-DWarpX_PYTHON_IPO=OFF` to compile string for 2d and 3d Python CI tests to speed up linking * CI: -DpyAMReX_IPO=OFF * CI: -DpyAMReX_IPO=OFF actually adding `=OFF` * CI: Intel Python * CI: macOS Python Executable Ensure we always use the same `python3` executable, as specified by the `PATH` priority. * CMake: Python Multi-Config Build Add support for multi-config generators, especially on Windows. * __init__.py: Windows DLL Support Python 3.8+ on Windows: DLL search paths for dependent shared libraries Refs.: - https://github.com/python/cpython/issues/80266 - https://docs.python.org/3.8/library/os.html#os.add_dll_directory * CI: pywarpx Update our setup.py cannot install pyamrex yet as a dependency. * ABLASTR: `ablastr/export.H` Add a new header to export public globals that are not covered by `WINDOWS_EXPORT_ALL_SYMBOLS`. https://stackoverflow.com/questions/54560832/cmake-windows-export-all-symbols-does-not-cover-global-variables/54568678#54568678 * WarpX: EXPORT Globals in `.dll` files WarpX still uses a lot of globals: - `static` member variables - `extern` global variables These globals cannot be auto-exported with CMake's `WINDOWS_EXPORT_ALL_SYMBOLS` helper and thus we need to mark them manually for DLL export (and import) via the new ABLASTR `ablastr/export.H` helper macros. This starts to export symbols in the: - WarpX and particle container classes - callback hook database map - ES solver * CI: pywarpx Clang CXXFLAGS Down Move CXXFLAGS (`-Werror ...`) down until deps are installed. * GNUmake: Generate `ablastr/export.H` * CMake: More Symbol Exports for Windows * `WarpX-tests.ini`: Simplify Python no-IPO Also avoids subtle differences in compilation that increase compile time. * Update PICMI_inputs_EB_API.py for embedded_boundary_python_API CI test * Fix Python_magnetostatic_eb_3d * Update: Python_restart_runtime_components New Python APIs * Windows: no dllimport for now * CI: Skip `PYINSTALLOPTIONS` For Now * CMake: Dependency Bump Min-Versions for external packages picked up by `find_package`. * Fix F and G_fp names in fields.py * Tests: Disable `Python_pass_mpi_comm` * Wrappers: Cleanup * pyWarpX: Include Cleaning * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fields.py: Fix F and G Wrappers Correct MultiFab names (w/o components). * Remove unused in fields.py * Windows: New Export Headers - ABLASTR: `ablastr/export.H` - WarpX: `Utils/export.H` * removed `WarpInterface.py` since that functionality is now in `particle_containers.py`; removed parts of `WarpXWrappers.cpp` that have been ported to pyamrex * CMake: Link OBJECT Target PRIVATE * CMake: Remove OBJECT Target Simplify and make `app` link `lib` (default: static). Remove OBJECT target. * Fix in fields.py for the components index * Update get_particle_id/cpu As implemented in pyAMReX with https://github.com/AMReX-Codes/pyamrex/pull/165 * WarpX: Update for Private Constructor * Import AMReX Before pyd DLL Call Importing AMReX will add the `add_dll_directory` to a potentially shared amrex DLL on Windows. * Windows CI: Set PATH to amrex_Nd.dll * CMake: AMReX_INSTALL After Python In superbuild, Python can modify `AMReX_BUILD_SHARED_LIBS`. * Clang Win CI: Manually Install requirements Sporadic error is: ``` ... Installing collected packages: pyparsing, numpy, scipy, periodictable, picmistandard ERROR: Could not install packages due to an OSError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\hostedtoolcache\\windows\\Python\\3.11.4\\x64\\Lib\\site-packages\\numpy\\polynomial\\__init__.py' Consider using the `--user` option or check the permissions. ``` * Hopefully final fixes to fields.py * Update getProbLo/getProbHi * Set plasma length strength Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Fix fields method to remove CodeQL notice * Update Comments & Some Finalize * Move: set_plasma_lens_strength to MPC --------- Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Co-authored-by: David Grote <dpgrote@lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Dave Grote <grote1@llnl.gov> Co-authored-by: Roelof Groenewald <regroenewald@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-31Clang tidy CI test: add some modernize checks to clang-tidy CI test (#4133)Gravatar Luca Fedeli 2-8/+6
* Clang Tidy: add several modernize checks * eliminate file included in commit by mistake * fix bug
2023-06-12Replace amrex::Abort with WARPX_ABORT_WITH_MESSAGE (#3965)Gravatar Luca Fedeli 2-2/+6
* replace amrex::Abort with WarpX macros * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * adding back missing include * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * bump precision
2023-05-22Multi-Dim Buildsystem Support (#3933)Gravatar Axel Huebl 1-5/+8
* Multi-Dim Buildsystem Support * Docs
2023-04-27Fix missing GPU synchronization when QED lookup tables are loaded or ↵Gravatar Luca Fedeli 5-1047/+1105
generated (#3873) Add thin wrapper aroung amrex::Gpu::DeviceVector in order to be able to use it in lookup tables also when managed memory is not used.
2022-09-02Remove some magic numbers (#3355)Gravatar Luca Fedeli 2-15/+34
* remove some magic numbers * fixed unreachable code issue * fixed issue with unreachable code * fixed issue with unreachable code * remove type traits * revert one change in Gaussian Laser * improved ParticleExtrema * fix bug
2022-07-22Fixes to allow mixed precision, ParticleReal float, Real double (#3239)Gravatar David Grote 4-2141/+2141
* Fixes to allow mixed precision, ParticleReal float, Real double * Fix for the optical depth * A different way of fixing QuantumSynchrotronEvolveOpticalDepth * In the QED code, consistently use ParticleReal
2022-05-24Specify particle precision (#3065)Gravatar Kevin Z. Zhu 1-1/+1
* Add precision to printed PIC parameters * Added WarpX_PARTICLE_PRECISION as a build option * Update types to ParticleReal * Updated libwarpx to inject particles with correct ParticleReal type * Fix syntax error * Add logic to avoid duplicate definitions * Use correct ParticleReal type in add_particles * Cleaned up code, addressed comments * Update Python/pywarpx/_libwarpx.py Co-authored-by: Peter Scherpelz <31747262+peterscherpelz@users.noreply.github.com> * Removed redundant functions, fixed some typing * Modified template functions * Cast d_w to Real * Fixed failing tests * Cast types to be consistent * removed in-tree-build from pip command * Added GPU device macros to PDim3 methods * rerun tests * Removed unecessary casting, update calls to use PDim3 instead of XDim3 * Refactored comments * Added mcc fields double precision, particles single precision test * Updated casting and formatting * Removed cast, updated declaration Co-authored-by: Peter Scherpelz <peter.scherpelz@modernelectron.com> Co-authored-by: Peter Scherpelz <31747262+peterscherpelz@users.noreply.github.com>
2022-02-07Implement some clang-tidy suggestions (#2826)Gravatar Luca Fedeli 4-14/+8
* implement some clang-tidy suggestions * Update loop Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-10-27Fix Doxygen: Particles (#2486)Gravatar Axel Huebl 2-1/+2
* Fix Doxygen: Particles Fix doxygen errors & warnings. * Apply suggestions from code review Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it> Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Apply suggestions from code review * Document ForwardIterator * Fix tparam and comma Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it> Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>
2021-08-25Fix: Missing Include Guards (FWD) (#2226)Gravatar Axel Huebl 2-2/+12
* Fix: Missing Include Guards (FWD) All header files need include guards to avoid double definitons. * Fix copy-paste guard
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 8-23/+85
* 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-05-05QED module: use PICSAR function to calculate gamma for photons (#1928)Gravatar Luca Fedeli 1-2/+9
2021-03-04QEDInternals: replace amrex::Real with amrex::ParticleReal where appropriate ↵Gravatar Luca Fedeli 4-34/+45
(#1741) * Replace amrex::Real with amrex::ParticleReal where appropriate Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com>
2021-02-05Set QED support ON by default (#1529)Gravatar Luca Fedeli 7-10/+11
* updated doc * updated cmake * fixed bug * updates to take into account modifications in picsar_qed folder structure * fixed bug * fixed bug * picsar/improve_makefile is now used for tests * use sycl fix with picsar_qed * update defines for picsar * Update PICSAR Git Links Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-11-02fixed calls to amrex::Random() to enable HIP compilation (#1487)Gravatar Luca Fedeli 2-6/+10
2020-10-28deleted some useless end-of-line ';' (#1478)Gravatar Luca Fedeli 2-6/+6
2020-10-13[mini-PR] Fix warnings in QED module (#1433)Gravatar Luca Fedeli 2-0/+6
* fix warning concerning comparison of int and unsigned int * fix warning concerning unused variables
2020-09-25Use amrex::ParallelForRNG for random number generation (#1373)Gravatar Weiqun Zhang 2-5/+6
* Use amrex::ParallelForRNG for random number generation In order to support RNG on non-Nvidia GPUs, we need to use amrex::ParallelForRNG for kernels with calls to AMReX random number generation functions. * missing a RandomEngine argument
2020-09-21Coupling WarpX with an ✨improved✨ version of the QED library (#1198)Gravatar Luca Fedeli 18-1237/+2702
* 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-06-22Remove persistent E+B (#1050)Gravatar Andrew Myers 2-6/+12
* 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-12Add CMake Scripts (#759)Gravatar Axel Huebl 1-0/+12
* [skip travis] CMake: Add CMake Scripts This add CMake scripts for the CMake build system generator. * CUDA Support Achieved Fastest compile via: cmake .. -DENABLE_CUDA=ON -DCUDA_ARCH=6.0 * CMake: openPMD & QED * CMake: Dimension Support WarpX_DIMS=2,3,RZ * CCache & Out-of-Source Enable CCache when found and prevent in-root builds (in-source okay-ish). * CMake: CUDA C++ Language Minimum * Add new Files * CI: Migrate macOS to CMake * Fortran: Enable Because Transitive ... for now :) * CI: Migrate Linux ICC to CMake * CI: Verbose Make * CMake: Add Missing PSATD Sources * CMake: PSATD, Compute, Precision, Clean
2020-05-11Add Schwinger process (#784)Gravatar NeilZaim 1-0/+65
* 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-28Style change to match the standard (#957)Gravatar Michael E Rowan 4-6/+6
2020-03-31Make Build System: No Public Includes (#870)Gravatar Axel Huebl 1-11/+0
Remove the listing of all header-files from the Make-buildsystem. Listing public header files here tells the AMReX Makefile build system to install those in an install step after build. WarpX is currently not building a public library which can be consumed by users for their projects and only an executable.
2020-03-17Add QED particle creaction routines (#698)Gravatar Luca Fedeli 16-0/+1780
* 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>