aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/Collision (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-01-04Add Coulomb collision and nuclear fusion subfolders (#2389)Gravatar Neïl Zaim 11-7/+8
2021-12-16Doxygen: Fix Diags, FieldSolver, Parallelization & Particles (#2662)Gravatar Axel Huebl 4-7/+13
* Doxygen: Fix Diags, FieldSolver, Parallelization & Particles * Apply suggestions: Remi Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Apply suggestions: Roelof Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> * Apply suggestions: Luca Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it> * Apply suggestions: Edoardo Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Apply suggestions: Andrew * Apply suggestions: Edoardo Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Apply suggestions: Neil Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Apply suggestions: Roelof * Apply suggestions: Weiqun Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov>
2021-12-13Add high energy asymptotic fit for Proton-Boron total cross section (#2408)Gravatar Neïl Zaim 1-26/+72
* Add high energy asymptotic fit for Proton Boron total cross section * Write keV and MeV instead of kev and mev * Add @return doxystrings
2021-12-06AMREX_SPACEDIM : Initialization and Particles (#2628)Gravatar Prabhat Kumar 1-2/+2
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * AMREX_SPACEDIM : Initialization * Fix Typo * space * AMREX_SPACEDIM : Particles
2021-12-06Correct collision algorithm in RZ. (#2510)Gravatar Yinjian Zhao 3-4/+38
* Add rotation. * Fix a small bug * Add automated test. * rename inputs_rz * Add json * minor * add comment. * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update analysis_collision_rz.py * Fix missing import * Change tolerance. * Add warnings * Apply suggestions from code review * Move assert. * fix end-of-Line whitespaces. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-11-22Proton-boron fusion: compute initial momentum of produced alphas (#2330)Gravatar Neïl Zaim 6-31/+232
* Proton-boron fusion: initialize alphas momentum assuming isotropy * Remove constexpr underflow in single precision * Update Source/Particles/Collision/BinaryCollision/ProtonBoronFusionInitializeMomentum.H Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-11-19added cost of MCC collisions to load balancing calculation (when using ↵Gravatar Roelof Groenewald 2-3/+33
Timers) (#2584)
2021-11-191D3V Cartesian Support (#2307)Gravatar Prabhat Kumar 1-2/+6
* Build System: Add 1D Geometry * test PR * test PR * 1D cartesian yee algorithm * fixed typo * Fixes for PML * 1D support related multiple changes * Fix compilation * change 1D to 1D_Z * 1D Field Gather and typo fix * 1D Charge Deposition * Particle Pusher * multiple changes related to 1D * 1D diagnostics and initialization * PlasmaInjector and PEC fixes for 1D * clean-up delete diags file * mobility 1D laser particle and bilinear filter * deleted diags files * update laser particle weight formula * delete diags files * Azure: Add 1D Cartesian Runner * 1D fixes for FieldProbe * Update Docs/source/developers/dimensionality.rst Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * 1d laser injection and langmuir test input files * 1d tests * clean up : delete print statements * analyse simulation result for laser injection and Langmuir tests * EOL * delete input files for which there are no automated tests * delete input files for which there are no automated tests * add ignore_unused to remove warnings * remove space * Fix compilation issues * fix error : macro name must be an identifier * Small bug fix * cleanup Python script for analysis * bug fix * bug fix * Update ParticleProbe: Check 1D in-domain * Update Source/Make.WarpX * Update .azure-pipelines.yml * Add USE_OPENPMD=FALSE to .azure-pipeline.yml * resolve conflict * resolve conflict * fix typo * Correct out-of-bound access * Fix Particle BC in WarpXParticleContainer and correct path to checksumAPI in python analysis scripts * EOL * Fix bug : accessing out of bound index of cell in 1D * remove 1d test for cartesian3d * Fix CI check * Slight style change * Address review comments * Fix GPU compilation Filter.cpp * Fix CI * Fix Indentation * Address review comments * More consistent ifdef for dimension bigger than 1 * Update Examples/Tests/Langmuir/analysis_langmuir_multi_1d.py Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update GNUmakefile Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Regression/prepare_file_ci.py Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Initialization/PlasmaInjector.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Initialization/PlasmaInjector.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * add comment inline to explain twice push_back * Add amrex::Abort for NCIGodfreyFilter Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Prabhat Kumar <prabhatkumar@kraken.dhcp.lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Remi Lehe <rlehe@lbl.gov>
2021-11-12std::ifstream: Defensive Patterns (#2547)Gravatar Axel Huebl 1-3/+4
Add failure handling if inputs in `std::ifstream`s cannot be opened or have problems seek-ing through them. This should catch I/O errors early.
2021-11-08Install pre-commit (#2532)Gravatar Axel Huebl 2-2/+0
* Add pre-commit Add basis for automated pre-commit checks. Install locally via: ```bash python3 -m pip install -U pre-commit pre-commit install ``` See: https://pre-commit.com * Cleanup: Whitespaces * Cleanup: requirements.txt order
2021-10-27Fix Doxygen: Particles (#2486)Gravatar Axel Huebl 6-39/+34
* 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-10-27Fix BinaryCollision on GPU (#2504)Gravatar Neïl Zaim 1-4/+6
2021-10-19BinaryCollision: implement particle creation functor (#2315)Gravatar Neïl Zaim 6-103/+313
* BinaryCollision: implement particle creation functor * Apply suggestions from code review (restrict keyword) Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Don't restrict the particle pointers * Use atomicSetID * Use more restricts * Don't use auto restrict Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-10-12Add total cross section for proton boron nuclear reaction (#2301)Gravatar Neïl Zaim 1-3/+88
* Implement Higginson's nuclear fusion algorithm * Fix uninitialized variable * Typo fix and compute probability in a more robust way numerically * Set mask to false when no fusion * Update NuclearFusionFunc Doxystring * Add total cross section for proton boron nuclear reaction * Rewrite reduced mass calculation to avoir compilation error in single precision (underflow in constexpr evaluation) * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-10-11Use parser for more input parameters (#2386)Gravatar Neïl Zaim 2-9/+11
* Use parser for more input parameters * Fix PSATD compilation and apply suggestions from code review * Avoid out of bound array access for num_particles_per_cell_each_dim * Fix few input files with respect to num_particles_per_cell_each_dim * Fix get that incorrectly became query
2021-10-07Implement Higginson's nuclear fusion algorithm (#2290)Gravatar Neïl Zaim 5-20/+343
* Implement Higginson's nuclear fusion algorithm * Fix uninitialized variable * Typo fix and compute probability in a more robust way numerically * Set mask to false when no fusion * Update NuclearFusionFunc Doxystring
2021-10-04Add structure for proton-boron fusion module (#2217)Gravatar Neïl Zaim 18-57/+391
* Add structure for proton-boron fusion module * Fix clang compile error * Generalize structure for other nuclear fusion types * Workaround: try to use std::vectors to fix clang compile error * Simplify workaround for clang * Rebase on 2245 and add empty particle creation functor * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Add couple of consts and runtime assert * Add another const Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-09-22Move RandomizeVelocity to ParticleUtils (#2326)Gravatar Neïl Zaim 2-47/+7
2021-09-13Enable particle creation from binary collisions (#2245)Gravatar Neïl Zaim 4-18/+304
* Enable particle creation from binary collisions * Do not directly use DeviceVector * Make defineAllParticleTiles () public
2021-08-24Avoid an NaN in collision module (#2225)Gravatar Yinjian Zhao 1-2/+7
* Update inputs_3d * Update inputs_2d * Update inputs_2d * Update inputs_3d * fix nan
2021-08-05BinaryCollision: use more general particle data structure (#2137)Gravatar Neïl Zaim 3-35/+31
2021-07-19added error message for invalid cross-section files in MCC setup (#2105)Gravatar Roelof Groenewald 1-0/+3
2021-07-14Fix a bug in Update Monte Carlo Collisions (#2085) (#2086)Gravatar Weiqun Zhang 1-0/+1
Forgot to reset the pointer in MCCProcess::Executor to device pointer. The incorrect code could still run because we use pinned memory for the host version. But it would have performance issues.
2021-07-13Update Monte Carlo Collisions (#2085)Gravatar Weiqun Zhang 6-122/+164
* Update Monte Carlo Collisions This addresses a number of issues in the Monte Carlo collision code. * `MCCProcess` is not trivially copyable because it contains `ManagedVector`. Therefore, it cannot be captured by GPU device lambda. * The use of managed memory may have performance issues. * There are memory leaks because some raw pointers allocated by `new` are not `delete`d. * `BackgroundMCCCollision` derives from a virtual base class, but the compiler generated destructor is not automatically virtual. * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Apply the suggestion from @PhilMiller to get rid of unique_ptr Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-07-13Feature - Monte Carlo Collisions with static background neutrals (#1857)Gravatar Roelof Groenewald 8-0/+1022
* Update copyright notices * allow specification of boundary potentials at runtime when using Dirichlet boundary conditions in the electrostatic solver (labframe) * added parsing to boundary potentials specified at runtime to allow time dependence through a mathematical expression with t (time) * updated to picmistandard 0.0.14 in order to set the electrostatic solver convergence threshold * update docs * various changes requested during PR review * fixed issue causing old tests to break and added a new test for time varying boundary potentials * possibly a fix for the failed time varying boundary condition test * changed permission on the analysis file for the time varying BCs test * switched to using yt for data analysis since h5py is not available * made changes compatible with PR#1730; changed potential boundary setting routine to use the ParallelFor construct and set all boundaries in a single call * fixed typo in computePhiRZ * updated docs and fixed other minor typos * fixed bug in returning from loop over dimensions when setting boundary potentials rather than continuing * changed to setting potentials on domain boundaries rather than tilebox boundaries and changed picmi.py to accept boundary potentials * now using domain.surroundingNodes() to get the proper boundary cells for the physical domain * fixed typo in variable name specifying z-boundary potential * Initial commit of MCC development. Collision type background_mcc handles collisions with a neutral background species * added back scattering and started expanding the multiple scattering processes functionality some * added charge exchange collision handling * added CrossSectionHandler class to install collision process cross-section calculators * added file reading for cross-section data * added input parameter for energy lost during inelastic collisions and changed how secondary species are passed for ionization events * added ionization - requires work to add to the amrex::ParallelForRNG loop * switched the MCC ionization handling to use the same workflow as other particle creation processes i.e. using the FilterCopyTransform functionality * updated the docs with the input parameters needed to include MCC in a run * added test for MCC and a function to ensure that cross-section data is provided with equal energy steps * fixed issue with build failing when USE_OMP=TRUE and some of the naming issues in Examples/Physics_applications/capacitive_discharge but I am not sure what to do about the other files in that directory * Improve file name construction to be strictly C++ compliant * WIP GPU Support * Fix QED Build (CUDA 10.0) Replace capture of a host-side array with unnamed members for E & B field transport with a nicely named struct that transports the Array4's as members. This is harder to mix up and thus more self-documenting and solves an issue with NVCC 10.0 of the form: ``` nvcc_internal_extended_lambda_implementation: In instantiation of '__nv_dl_wrapper_t<Tag, F1, F2, F3, F4, F5>::__nv_dl_wrapper_t(F1, F2, F3, F4, F5) [with Tag = __nv_dl_tag<int (*)(amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&, amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&, amrex::Box, const amrex::Array4<const double> (&)[6], int, int, const SchwingerFilterFunc&, const SmartCreate&, const SmartCreate&, const SchwingerTransformFunc&), filterCreateTransformFromFAB<1, amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>, amrex::Array4<const double> [6], int, const SchwingerFilterFunc&, const SmartCreate&, const SmartCreate&, const SchwingerTransformFunc&>, 1>; F1 = amrex::Array4<double>; F2 = const SchwingerFilterFunc; F3 = const amrex::Array4<const double> [6]; F4 = const amrex::Box; F5 = int*]': /home/ubuntu/repos/WarpX/Source/Particles/ParticleCreation/FilterCreateTransformFromFAB.H:174:28: required from 'Index filterCreateTransformFromFAB(DstTile&, DstTile&, amrex::Box, const FABs&, Index, Index, FilterFunc&&, CreateFunc1&&, CreateFunc2&&, TransFunc&&) [with int N = 1; DstTile = amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>; FABs = amrex::Array4<const double> [6]; Index = int; FilterFunc = const SchwingerFilterFunc&; CreateFunc1 = const SmartCreate&; CreateFunc2 = const SmartCreate&; TransFunc = const SchwingerTransformFunc&]' /home/ubuntu/repos/WarpX/Source/Particles/MultiParticleContainer.cpp:1169:167: required from here nvcc_internal_extended_lambda_implementation:70:103: error: invalid initializer for array member 'const amrex::Array4<const double> __nv_dl_wrapper_t<__nv_dl_tag<int (*)(amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&, amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&, amrex::Box, const amrex::Array4<const double> (&)[6], int, int, const SchwingerFilterFunc&, const SmartCreate&, const SmartCreate&, const SchwingerTransformFunc&), filterCreateTransformFromFAB<1, amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>, amrex::Array4<const double> [6], int, const SchwingerFilterFunc&, const SmartCreate&, const SmartCreate&, const SchwingerTransformFunc&>, 1>, amrex::Array4<double>, const SchwingerFilterFunc, const amrex::Array4<const double> [6], const amrex::Box, int*>::f3 [6]' ``` * CUDA: Quiet numerous warnings about unused-variable-warning suppressions being unreachable statements * Compiles on GPU; may even run as intended * Delete overwrought attempt at polymorphic implementation * Fix compilation error from nvcc being stupid * fixed improper input file for MCC test and updated reference results - a statistical test of the MCC routine would be better so that reference results should not change with changes in the RNG * Runs on CPU and GPU now * Clean up GPU-related memory/allocation management and function usage * Try inlining MCCProcess::getCrossSection to appease HIP and SYCL compilers * Fix up style/formatting issues * Typedef to make stuff cleaner and simpler * MCC: Make helper functions static * MCC: Pull parsing out to a helper * MCC: Name member variables according to convention * MCC: Pull out part of constructor * MCC: Add constructor that will take any iterable source for energies/cross sections * MCC: Overload operator new/delete to allocate in managed memory, to make later use more straightforward * MCC: Add process type for ionization * MCC: Expose a method for adding processes programmatically * MCC: Follow convention of all types being 'class', which keeps grep easy * MCC: Fix a formatting silliness * added a check that the collision cross-section is zero at the energy penalty for the collision to ensure that no collision will happen with a particle with insufficient energy to pay the energy cost * updated MCC input files to new standard inputs * reverted incorrect changes that was messed up during various upstream and branch merges * moved the MCC benchmark results to the Examples section in the documentation, which allows us to meet the style requirements - the tests are ongoing and the results will be provided in a following commit * Add GPU synchronization after collisions * added benchmark results and updated test results with the refined cross-sections needed to accurately calculate the benchmark cases * removed example input files for benchmarks since the style requirement prohibits input files not included in an automated test; also updated the reference results for the MCC test which changed slightly after merging upstream development and updated amrex * CLean up indentation and bit of commented out code * Inline addProcess method and refactor * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * switched MCC files copyright to Modern Electron * Remove sync calls, which are unnecessary on support modern hardware * removed He collision cross-sections and instead the new warpx-data repository to access those files; also added a call in run_test.sh to clone the new repository during tests * Apply suggestions from code review Co-authored-by: David Grote <dpgrote@lbl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * cleaned up the MCC documentation a bit * added include statements now needed by the MCC (after recent PR merges) and updated the MCC test reference values which changed slightly due to changing the value of Boltzmann's constant * added plot results for 3rd benchmark case from literature and changed documentation to reference uploaded image rather than local image in repo * updated MCC test file to match earlier execution which changed due to the new warpx use_filter default value being 1 * Apply suggestions from code review Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * added warp-data repository clone command to docs * fix breaking change from earlier commit Co-authored-by: Peter Scherpelz <peter.scherpelz@modernelectron.com> Co-authored-by: Phil Miller <phil@intensecomputing.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Phil Miller <phil.miller@intensecomputing.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-31-245.us-east-2.compute.internal> Co-authored-by: David Grote <dpgrote@lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-07-08Refactor collisions: replace PairWiseCoulombCollision class with ↵Gravatar Neïl Zaim 9-366/+434
BinaryCollision class (#2057) * Refactor collisions: replace PairWiseCoulombCollision class with BinaryCollision class * Make BinaryCollision a templated class with the functor type as parameter * Update README.md
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 8-11/+56
* 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-03-18Use Clear Naming Standard for ParmParse Variables (#1809)Gravatar Edoardo Zoni 2-5/+5
2021-03-16Add timers in routines that depend on cell-related work (#1692)Gravatar Michael E Rowan 3-3/+17
* Add timers * eol * AtomicAdd * lev argument for getCosts * style * style * wip * eol * .ipynb * passing down lev * eol * passing lev * eol * Update Source/Particles/Collision/PairWiseCoulombCollision.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Add for QED and ionization routines * eol * remove unneeded * mfi-->pti * move cost * eol Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-03-12fix unused variables (#1786)Gravatar Luca Fedeli 1-2/+2
2021-03-10Minor cleanup of RZ in collisions (#1774)Gravatar Remi Lehe 1-44/+34
* Minor cleanup of RZ in collisions * Clean-up indentation * Fix white space * Further cleanup of warnings
2021-01-21Define: _OPENMP -> AMREX_USE_OMP (#1520)Gravatar Axel Huebl 1-1/+1
* 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-12Fix some other warnings (#1618)Gravatar Luca Fedeli 1-8/+13
* fix warnings * fixed bug
2021-01-03Reconfigured the collision classes to allow for generalization (#1583)Gravatar David Grote 10-113/+289
* 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-1/+2
2020-10-07RZ + single precision fix (#1417)Gravatar Michael E Rowan 1-2/+2
* RZ_SP fix * RZ SP fix * Fix cufft for single precision RZ. Co-authored-by: Weiqun Zhang <weiqunzhang@lbl.gov>
2020-10-05Add option to do collisions every # time steps (#1251)Gravatar Yinjian Zhao 2-6/+11
* 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-09-25Use amrex::ParallelForRNG for random number generation (#1373)Gravatar Weiqun Zhang 4-19/+25
* 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-14Implement leveling thinning algorithm (#1283)Gravatar NeilZaim 1-37/+3
* Initial commit (not working) * First working version * Cleaning and adding Doxygen comments * Apply suggestions from code review * Move findParticlesInEachCell to Utils/ParticleUtils Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-08-24Fix some warnings (#1239)Gravatar Luca Fedeli 4-9/+13
This PR fixes the source of several compilation warnings. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-08-13Make collision module doable for RZ (#1135)Gravatar Yinjian Zhao 1-6/+26
* Make RZ doable for collision * Make RZ doable for collision * Make RZ doable for collision * Make RZ doable for collision * change nr to nz Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2020-06-12Add CMake Scripts (#759)Gravatar Axel Huebl 1-0/+4
* [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-22Dpcpp (#1045)Gravatar WeiqunZhang 1-4/+9
* Make changes to be able to compile with DPC++. Parser is disabled for DPC++ because it does not work. amrex::Math::abs instead of std::abs is used in device functions. * std::isnan not supported on device with DPC++
2020-04-28Style change to match the standard (#957)Gravatar Michael E Rowan 1-8/+8
2020-04-26minor code changes to remove warnings when compiling with gcc DEBUG=TRUE (#950)Gravatar MaxThevenet 1-3/+4
2020-04-02Includes: Only From `Source/` (#873)Gravatar Axel Huebl 1-1/+0
* Includes: Only From `Source/` Avoid adding all directories to include paths: - automatically structure includes more clearly, e.g. a util include with a short name is clearly seen as such - should have some small positive impact on compile time, since the compiler has to search less directories for an include file * Includes: Fix Non-Local Paths Add missing prefix relative to `Source/` for WarpX-local includes.
2020-03-31Make Build System: No Public Includes (#870)Gravatar Axel Huebl 1-6/+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-30Remove compiler warnings (#843)Gravatar Edoardo Zoni 1-1/+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 4-4/+9
- 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-01-29Format change.Gravatar Yinjian Zhao 6-82/+82