aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-01-07Particle Buffer for Backtransformed Diagnostics (#1898)Gravatar Revathi Jambunathan 5-4/+69
* move BTD call before Redistribute * define particle buffer, BTD particle functor, particle filter * select particles on the slice * add particle functors * add Lorentz Transform * fix conflict * add call to loretnz operator * storing Particles in buffer * This is WIP. Added particle buffers, filled them, sent them for flush with number already flushed. Does not work for multiple flushes. Crashes for OpenPMD. * trailing endif after rebase * adding print statements and not flushing particles in OPENPMD if numpart is 0 * last timestep flush is ensured at the end of evolve loop * fix bug in declaring uy uy new and computing uzp * set particle Geom, BA, and DMAP for particle flush with plotfile * set Particle BA Geom DMAP for particle buffer and no BTD transform for force flush * separate compute and pack from flush * Fix Typo: resizeable -> resizable Fixes HDF5 BTD particle output. * new class for plotfile particles for BTD * copy particle_H and DATA and Header. some WIP print statements * Merge plotfile * clean print statements * fix warning message * struct declaration in header, fix warning * doxygen comments and copyright * clean print statements * fix eol and override function warning * tile data * fix output species array size bug * fix access for particle buffer size * clean and move time-update * add cur_time update back * remove cur time update which was called twice * dont access particles flushed already for full diagnostics * cur time must be updated for RigidInjection BTD CI test to pass * temporarily move call to BTD * updating time and calling BTD before movewindow * cleanup * reset benchmarks and analysis script * clean and add comments * fix particle box array, geom, dmap * reset benchmarks for multi_J rz and ElectrostaticSphereEB_mixedBC * wip commit * wip commit * add SI conversion * abort for openpmd bp backend if species is selected. Also write particle output for BTD only if write_species is 1 * add documentation for aborting if adios is used with openpmd and add other BTD input parameters * Apply suggestions from code review commit Axel's suggestions from review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * use bool instead of int * fix doxygen format * using h5 as backend in example test to ensure consistency with abort for particle output. * fix doxygen comment * reset benchmark again for comoving_2d_psatd galilean_2d_psatd multi_J_rz_psatd * reset benchmark for background_mcc * self-review suggestions * reset benchmarks. Update with last snapshot full info * Axel's PR suggestions Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Axel's doxygen fix Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * add comments * fix eol * improved exception handling for stringsteam * PR suggestions * Axels' suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Axel's suggestions :) Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * simplify logic * suggestions from review (Axel/Reva) Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * variable name change for clarity * if num particles in tmp array is 0, return * Use new BTD inputs to set up BTD for particles in the corresponding particle container * unused var * fix logic error * speciesID undefined * separate particle and field buffer calls and initialization for BTD. Data common to both are initialized separately * rename variable so it does not ghost existing varname * add more comments * Assert that fields are on * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * redundant function definition * unused variable * unused variable zp * 1D 2D 3D definition * fix else * Apply suggestions from code review Add Prabhat's suggestion Co-authored-by: Prabhat Kumar <89051199+prkkumar@users.noreply.github.com> * missing semicolon and ignore xp yp for 1D * resetting benchmarks for boosted sims and mcc sim * temporarily changing tolerance since the relative difference for momentum_z is 3.68e-3 and the current tolerance is 2.5e-3 Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Prabhat Kumar <89051199+prkkumar@users.noreply.github.com>
2022-01-04Add Coulomb collision and nuclear fusion subfolders (#2389)Gravatar Neïl Zaim 11-7/+8
2021-12-23Test particle scraping for EB in RZ. (#2691)Gravatar Yinjian Zhao 1-10/+17
* Modify WarpXFaceExtensions.cpp and WarpXInitEB.cpp. * Remove an assertion. * Update particle scraping for RZ * Apply suggestions from code review * Add automated test. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix CI issues * Change permissions Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-20AMREX_ALWAYS_ASSERT -> AMREX_ASSERT for deposition bounds checks (#2688)Gravatar Andrew Myers 1-2/+2
* AMREX_ALWAYS_ASSERT -> AMREX_ASSERT for deposition bounds checks * fix unused * Apply suggestions from code review * Apply suggestions from code review * Simpler ignore + comment Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-12-16Doxygen: Fix Diags, FieldSolver, Parallelization & Particles (#2662)Gravatar Axel Huebl 11-12/+46
* 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-15ABLASTR: Cleanups & Particle Moments (#2675)Gravatar Axel Huebl 1-2/+2
* ABLASTR: Cleanups - lowercase dir - nested directories - nested namespaces - functions: lowercase and snake_case - templates: prefix with `T_` - profiler: doc strings * Add: Particle Moments Co-authored-by: Remi Lehe <rlehe@lbl.gov> Co-authored-by: Remi Lehe <rlehe@lbl.gov>
2021-12-14Refactor DepositCharge so it can be called from ImpactX. (#2652)Gravatar Andrew Myers 2-140/+58
* Refactor DepositCharge so it can be called from ImpactX. * change thread_num * Fix namespace * remove all static WarpX:: members and methods from DepositChargeDoIt. * fix unused * Don't access ref_ratio unless lev != depos_lev * more unused * remove function to its own file / namespace * don't need a CMakeLists.txt for this * lower case namespace, rename file * Refactor: Profiler Wrapper Explicit control for synchronization instead of global state. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
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-11C++17: if constexpr for templates in ShapeFactors (#2659)Gravatar Luca Fedeli 1-150/+84
* use if constexpr to replace template specialization * Rmove Interface Annotations * Replace static_assert with amrex::Abort * Add includes & authors Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-12-07Transform the external fields into the boosted frame (#2610)Gravatar David Grote 14-211/+188
They should be specified in the lab frame
2021-12-06AMREX_SPACEDIM : Initialization and Particles (#2628)Gravatar Prabhat Kumar 13-175/+175
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * AMREX_SPACEDIM : Initialization * Fix Typo * space * AMREX_SPACEDIM : Particles
2021-12-06Redistribute particles in ContinuousFluxInjection (#2611)Gravatar Remi Lehe 2-18/+42
* Redistribute particles in ContinuousFluxInjection * Fix runtime issues * Avoid overwriting previous particles * Extract tiles by reference * Add loop over levels * Correct number of levels * Replace serialize_ics * Fix compilation for GPU Fix compilation bug Fix GPU compilation bug * make sure we define all tiles in the tmp_pc before touching them in a threaded region. Co-authored-by: Andrew Myers <atmyers2@gmail.com>
2021-12-06Define WARPX_ZINDEX to denote the index for the Z dimension regardless of ↵Gravatar Phil Miller 5-10/+8
the build's dimensionality (#2622) * Define WARPX_ZINDEX to denote the index for the Z dimension regardless of the build's dimensionality * Add WARPX_ZINDEX macro definition to Makefile as well
2021-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-30Added parallel pragma to ApplyBoundaryConditions (#2612)Gravatar David Grote 1-0/+3
2021-11-24C++17: Work-Around NVCC gatherParticles (#2596)Gravatar Axel Huebl 1-1/+2
The `noexcept` lambda does not compile in C++17 mode due to an NVCC compiler bug, at least in NVCC 11.3.109. Compiles in C++14 mode with the same compiler.
2021-11-23Fix Init of Vector Members (#2595)Gravatar Axel Huebl 1-1/+1
Fix default init of `Vector` member variables. The old construct is not valid C++. https://stackoverflow.com/a/11491003/2719194
2021-11-22Python: Start 1D Support (#2582)Gravatar Axel Huebl 3-5/+10
* Python: Start 1D Support Start supporting 1D builds in Python. * Fix 1D: PML FillZero unused ... since PMLs are not yet supported in 1D. * BeamRelevant: Fix unused p_pos0 * FromTXYEFileLaserProfile: Not Impl in 1D * QED Schwinger: 1D not Implemented Fix unused warnings, add aborts. * 1D RealVect/IntVect: Initialization Use explicit scalar constructors, no braces. Fix warning in clang 10. * 1D NCI Filter: Fix unused members & Init Unimplemented, but throws warnings. * PSATD: 1D not Implemented - remove compile warnings - start porting some parts * NCIGodfreyFilter: Clean up 2D & Else
2021-11-22Proton-boron fusion: compute initial momentum of produced alphas (#2330)Gravatar Neïl Zaim 7-32/+249
* 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 14-48/+365
* 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-18Bug fixes and cleanup in load balancing (#2563)Gravatar Roelof Groenewald 2-0/+15
* added helper function to rebuild MultiFabs and iMultiFabs during load balancing and included rebuilding of EB multifabs * added redistribute call for the particle boundary buffer during load balancing * consistently use DistribtionMap rather than dmap in ElectrostaticSolver.cpp * applied suggested changes from code review by Phil Miller * removed default argument for redistribute in RemakeMultiFab * removed RemakeMultiFab() as a member of WarpX * Only remake EB multifabs if they are used Co-authored-by: Lorenzo Giacomel <47607756+lgiacome@users.noreply.github.com> * adapted existing particle scraping test (PICMI version) to also cover the redistribution of particle buffers from load balancing * added redeclaring of m_borrowing * Move redeclaring of m_borrow inside if statement for ECT solver algorihtm Co-authored-by: Lorenzo Giacomel <47607756+lgiacome@users.noreply.github.com> * added calls to MarkCells and ComputeFaceExtensions * fixed issue causing CI test to fail and copied conditionals from WarpXInitData.cpp to recompute EB quantities * Guard cells communication for EB data when re-gridding (#105) * Add 2D circle EB test (#2538) * Added embedded_circle test * Add embedded_circle test files * Removed diag files * removed PICMI input file * Update to use default regression analysis * Added line breaks for spacing * Added description * Fixed benchmark file * Added load balancing to test * Commented out load_balancing portion of test. This will be added back in once load balancing is fixed. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Added guard cells communication for EB data in regridding Co-authored-by: Kevin Z. Zhu <86268612+KZhu-ME@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * moved all EB grid data calculations to a new function InitializeEBGridData() which is now called by both WarpX::InitLevelData and WarpX::RemakeLevel * Fix typo in doc string. Co-authored-by: Phil Miller <unmobile+gh@gmail.com> Co-authored-by: Lorenzo Giacomel <47607756+lgiacome@users.noreply.github.com> Co-authored-by: Kevin Z. Zhu <86268612+KZhu-ME@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Phil Miller <unmobile+gh@gmail.com>
2021-11-12Add Ar and Xe to pre-defined particle types. (#2549)Gravatar Kevin Z. Zhu 1-1/+17
* Added Ar and Xe to pre-defined particle types * Added Boltzmann's constant to warpx parser * Updated documentation
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-09Fix #2522: Gaussian beam positions do not change with warpx.random_seed (#2523)Gravatar Remi Lehe 1-10/+5
* Draw Gaussian beam position with amrex random engine * Update benchmarks * Update tolerance in space-charge tests * Update benchmark for space charge initialization test * Update benchmarks * Update benchmark * Clean-up code * Update benchmarks
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-11-03Change the way in which the laser particle weight is calculated. (#2417)Gravatar Remi Lehe 1-15/+14
* Minor fixes to the laser particles * Update calculation of the weights for laser antenna particles * Correct name of the constant epsilon_0 * Correct unused variables * Update 2D benchmarks * Update 3D benchmarks * Update RZ tests * Update benchmark for pml_x_psatd * Update energy value
2021-10-29Add option to specificy absolute tolerance for the MLMG solver (#2410)Gravatar Roelof Groenewald 2-2/+3
* added option to specify absolute tolerance for the MLMG solver used in the electrostatic field solve * added absolute tolerance argument to the documentation * fixed bug introduced during copy and paste * expanded documentation for MLMG solver absolute tolerance (added unit) and added a link to the AMReX documentation describing the MLMG solver parameters * possibly more robust handling of the MLMG convergence * switched from std::max to amrex::max to hopefully fix compiler complaints * updated checksum values for MCC test (background_mcc); the values changed only slightly, presumably due to a difference in the initial field solve which would now have the absolute tolerance value included, but since the Python version of this same test (which uses the direct solver) still passes the change is assumed to be inconsequential * another try to fix the compile issues * print a message to notify user if the max norm of rho is zero * Apply suggestions from code review Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * switched print statements to the new warning logger Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-10-27Fix Doxygen: Particles (#2486)Gravatar Axel Huebl 15-152/+146
* 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-20⚠️ Add warning logger (#2113)Gravatar Luca Fedeli 4-19/+50
* improve error msg * eliminate final dot * initial layout of the main classes * progress * progress with warnings * print local errors * progress with warning logger * improved MsgLogger * added file to test warnings * added method to read debug warnings from inputfile * progress towards collective gather of warnings * add missing blank line in warning message * move misplaced file * refactoring * fixed bugs * progress * fixed bugs * fixed some bugs * it finally works! * add comments in WarpX.H * add missing comment * added comments to WarpX.cpp * add profiler to WarpX.cpp * expose option to enable 'warn immediately' feature in cmake * Add comment to main.cpp * add missing comment in WarpX.cpp * add copyright and include guards to WarnManager_fwd.H * cleaning and added comments to WarnManager.H * updated test * added fwd file for MsgLogger * cleaning * Added copyright in WarnManager.cpp * Cleaning * cleaning * Add missing copyright * cleaning * clean and add comments to MsgLoggerSerialization.H * cleaning MsgLogger_fwd.H * cleaning * continue cleaning MsgLogger * added comments & bugfixing * removed test file * fixed bugs * Update Source/Utils/MsgLogger/MsgLogger.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/WarpX.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/MsgLogger/MsgLogger.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/MsgLogger/MsgLogger.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/MsgLogger/MsgLogger.cpp Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/MsgLogger/MsgLoggerSerialization.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/MsgLogger/MsgLoggerSerialization.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/MsgLogger/MsgLoggerSerialization.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/MsgLogger/MsgLoggerSerialization.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/MsgLogger/MsgLoggerSerialization.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/WarnManager.cpp Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/WarnManager.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/WarnManager.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Update Source/Utils/WarnManager.cpp Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * fixed bugs * Update Source/Utils/MsgLogger/MsgLogger.cpp Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Added comment to explain rotation * use last value computed by partial_sum * fix bug * now use error stream * using anonymous namespace for helper functions * print on both stderr and stdout * now using runtime parameter to always print warnings * added documentation * using long int for counter * sort affected warnings list * add doc entry * removed doc * added documentation * fixed bug * fixed bug * removing unnecessary text * reformatting * reformatting * fixed bug * fixed bug * correction * add warning_logger.rst to toctree in developers.rst Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>
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-19Simplify Esirkepov formula even more (#2374)Gravatar Remi Lehe 1-8/+14
* Simplify formulas for Esirkepov deposition * Simplify Esirkepov formulas even more * Update Source/Particles/Deposition/CurrentDeposition.H
2021-10-18Option to do single precision mesh communication. (#2294)Gravatar Andrew Myers 2-8/+16
* option to use single precision guard cell exhanges * add missing files * fix namespace issue * change precision of comms to float * ParmParse the single_precision_comms flag * set back to real * test * make sure dst is filled * nGrow -> nGrowVect * restore float * don't override valid cells * single precision mesh * whitespace * wrap SumBoundary * Wrap additional uses of FillBoundary. * catch missing copies of ParallelCopy * missing OverrideSyncs * add wrapper for iMultifab * fix typo * moar typos * typo * strip single_precision_mesh option * fix original copy * update fusible syntax Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * Fix: Single Precision Builds Should not copy around data for `do_single_precision_comms` * Docs: warpx.do_single_precision_comms * initialize this tmp multifab to 0.0 * fix tiny profile label * remove orig copies, they are only correct for FillBoundary * loosen tolerance for space charge tests for single precision * missing some setVal * another missing setVal * missing setVal * add wrapper for new version of sumboundary * add explicit cast to silence compiler warning * add a test for single precision comms * revert change to test precision * add benchmark for single precision comms test * restore tolerance I removed by mistake * tolerance * copyright headers * drop tolerance for single precision tests in default analysis script * missing python module * bump tol again * fix bad merge * 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> Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov>
2021-10-18move kinetic energy calculation into Particles/Algorithms (#2441)Gravatar Luca Fedeli 4-0/+84
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 12-28/+31
* 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-11Remove unused pusher_algo parameter (#2388)Gravatar Neïl Zaim 2-2/+0
2021-10-08Fix checkpoint with runtime components through the Python interface. (#2332)Gravatar Andrew Myers 1-6/+16
* add component names to checkpoint * read in particle components and add the missing ones on restart * do not add components if one by the name already exists * sign error * Better warning messages * Update Source/Diagnostics/ParticleIO.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * add CI test for restarting particles with runtime-added attributes * remove unused module Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
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-06Simplify formulas for Esirkepov deposition (#2373)Gravatar Remi Lehe 1-12/+11
2021-10-04Add structure for proton-boron fusion module (#2217)Gravatar Neïl Zaim 21-59/+448
* 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-10-04Implement Checkpoint / Restart for Laser Particles (#2360)Gravatar Andrew Myers 5-4/+21
* Initialize lasers when restarting + recalculate z position at each iteration * Fix restart for rigid-injected particles * Fix laser injection box at restart * Use correct positions for the moving window of the BTD * implement restart for laser particles * add CI test for laser acceleration restarting * writespace * Revert "Fix restart for rigid-injected particles" This reverts commit 33bf3a60126539b9566ead3115ff2bcdf4b80516. * don't add lasers to all full diags, only checkpoints * fix unused parameter warning * move the call to reset the m_laser_injection_box into PostRestart * bugfix for non-boosted frame simulations * Read the mean velocity of the injected species * Remove unused line * Revert "Initialize lasers when restarting + recalculate z position at each iteration" This reverts commit 322634c35aa996649d0e8fff9fb683d04f2ee121. * Add new ReadHeader / WriteHeader functions * Add WriteHeader/ReadHeader for laser particles * Revert "add CI test for laser acceleration restarting" This reverts commit 6ba0fb3c121027eecf8b5845f55080e5b187375d. * Fix merge commit * Correct reading of updated position * Add laser in restart test * Remove unused parameters * Update regression tests * Add benchmark files * Update boundary conditions for restart_psatd Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-09-30Remove array of ints `done_injecting` (#2365)Gravatar Remi Lehe 2-4/+1
2021-09-30Rigid injected species: Remove unused function and variables (#2350)Gravatar Remi Lehe 2-104/+0
* Remove unused function * Remove `focused` and `projected` for rigid particles
2021-09-24Stochastic particle reflection from absorbing domain boundaries (#2281)Gravatar Roelof Groenewald 8-59/+158
* added tunable particle reflection from absorbing domain boundaries * extended picmi.py to allow setting boundary reflection coefficients and added a CI test for the reflection implementation * allow R(E) to be specified, except for embedded boundaries * changed approach for particle reflection, now the ParticleBoundaries object will hold the reflection coefficient; reflection from EBs not implemented * added functionality to reflect from EB; still needs to be tested for accuracy * added support for energy dependent reflection models for domain boundaries * fixed at least one issue causing CI fails - building reflection model parsers for not physical particle containers * switched reflection coefficients to be functions of the velocity component perpendicular to the boundary rather than energy * reverted initial work on reflecting from EBs * changed naming convention for new CI test for particle reflection * switched useMPI back to 1 in test * breaking changes while trying to sort out GPU issue * fixed issue with CUDA compilation - hopefully :) * various code improvements from PR review suggestions * fix of major issues * no need to parse the reflection models at every step * skip particles that are already flagged for removal in ApplyBoundaryConditions
2021-09-24Fix nvcc compilation bug (#2333)Gravatar Remi Lehe 1-1/+1
2021-09-22Move RandomizeVelocity to ParticleUtils (#2326)Gravatar Neïl Zaim 2-47/+7
2021-09-20Rename WarpXWrappers.(h->H) (#2261)Gravatar Axel Huebl 1-1/+0
* Rename WarpXWrappers.(h->H) All our other header files use `.H`, so renaming this one for consistency. * Remove unused includes of WarpXWrappers.H
2021-09-17Move QEDEvents() before OneStep functions (#2289)Gravatar Neïl Zaim 1-2/+6
* Move QEDEvents() before OneStep functions * Update BW and QS automated tests * Fix a couple of bugs * Update benchmarks * Forgot to update one benchmark value