aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
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-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 1-139/+56
* 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-06AMREX_SPACEDIM : Initialization and Particles (#2628)Gravatar Prabhat Kumar 1-8/+8
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * AMREX_SPACEDIM : Initialization * Fix Typo * space * AMREX_SPACEDIM : Particles
2021-12-06Define WARPX_ZINDEX to denote the index for the Z dimension regardless of ↵Gravatar Phil Miller 1-2/+2
the build's dimensionality (#2622) * Define WARPX_ZINDEX to denote the index for the Z dimension regardless of the build's dimensionality * Add WARPX_ZINDEX macro definition to Makefile as well
2021-11-30Added parallel pragma to ApplyBoundaryConditions (#2612)Gravatar David Grote 1-0/+3
2021-11-191D3V Cartesian Support (#2307)Gravatar Prabhat Kumar 1-4/+20
* 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-10-27Fix Doxygen: Particles (#2486)Gravatar Axel Huebl 1-2/+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-10-18Option to do single precision mesh communication. (#2294)Gravatar Andrew Myers 1-7/+14
* 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-09-24Stochastic particle reflection from absorbing domain boundaries (#2281)Gravatar Roelof Groenewald 1-6/+25
* 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-08-31Add profiling for charge deposition (#2253)Gravatar Phil Miller 1-0/+2
2021-08-07More cleanup of particle boundaries (#2171)Gravatar David Grote 1-5/+6
* Moved some routines to .cpp file * Moved more stuff to a header file
2021-08-02Allow extra particle attributes (besides ux, uy, uz and w) to be set at ↵Gravatar Roelof Groenewald 1-14/+20
particle creation in AddNParticles() (#2115) * exposes AddRealComp to Python to allow extra particle attributes to be added at runtime; also includes a new function to grab a particle data array from the name of the component rather than the index * added functionality to AddNParticles() to allow extra particle attributes to also be set during particle creation * added function to get index of a particle component given the PID name * changed new get component index and get_particle_arrays_from_comp_name functions to take species name as argument rather than species id * changed warpx_addRealComp to accept a species name as input and only add the new component for that species * added a test of the pywarpx bridge to get particle data and add new particle attributes at runtime * changed all particle interacting functions in libwarpx to use the species name rather than id, also changed the functions to get particle array data to use the component name rather than index * updated test according to PR #2119 changes * removed unneeded BL_ASSERT(nattr == 1) statement * fixed bug in add_particles to correctly determine the number of extra attributes * fixed bug in AddNParticles if fewer attribute values are passed than the number of extra arrays for the species * use isinstance(attr, ndarray) rather than type(attr) is np.ndarray * generalize_runtime_comps_io * fix OpenPMD * fix OpenPMD * fix plot flags in WritePlotFile * fix offset and comment * changed extra pid test to not use an underscore in the pid name * switched _libwarpx.py::add_particles to use kwargs to accept the weight and extra attribute arrays * License update in test file Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * fix typo * added a test with unique_particles=False * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * updated docstring and comments Co-authored-by: atmyers <atmyers2@gmail.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-07-06Reflective particle boundary condition (#1728)Gravatar David Grote 1-9/+25
* Added ParticleBoundaries and reflecting boundary conditions * Added ParticleBoundaries::AllNone * Allowed different particle boundary conditions on each side of the domain * Updated the documentation for particle boundaries * Fix end of line space in Docs/source/running_cpp/parameters.rst * Updated the reflecting BC to use boundary input group * Fixes to reflective boundary conditions * Bug fix in AsStored * Added particle boundaries regression test particle_boundaries_3d * Fixed particle_boundaries_3d.json * Minor updates * Added algo.particle_shape to test case * Remove do_pml from test case Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> * Need to explicitly turn off pml in CI test * Re-add include * Fixed includes Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-07-06changed default behavior of AddNParticles to not overwrite current particles ↵Gravatar Roelof Groenewald 1-2/+6
(#2046)
2021-06-28Multi-J scheme (#1828)Gravatar Remi Lehe 1-28/+74
* Introduce new option skip_deposition * Properly implement the option to skip deposition * Skip deposition for electrostatic solver * Correct typo * Add Index Enumerator and Equations for F/G Without Averaging * Define new functions for current deposition and charge deposition * Disable interpolation between levels * Correct compilation error in RZ mode * Add argument for relative time * Add Index Enumerator and Equations for F/G With Averaging * [skip ci] Add new OneStep function * Fix compilation errors * Correct more compilation errors * [skip ci] Fix compilation * Split the PSATD push into separate functions * Add guards for rho field * [skip ci] Use new functions in OneStep * [skip ci] Separate the inverse transform of E_avg, B_avg * Add deposition of rho * [skip ci] Prevent deposition of rho if unallocated * Fix error in deposition function * Add subcycling of current deposition * [skip ci] Add inverse transform of averaged fields * [skip ci] Move component of rho * Add function to copy J * Temporarily deactivate contribution from F * [skip ci] Implement call to linear in J * Add psatd time averaging for multiJ * [skip ci] Fix implementation of averaging * [skip ci] Implement divE cleaning * Fix Bug for RZ Builds * Fix Bug for RZ Builds * Fix Bug in Init of PML Spectral Solvers * Cleaning * Cleaning * Add div(B) Cleaning (G Equation) * Multi-J Not Implemented with Galilean PSATD or PMLs * Add 2D CI Test Using Multi-J Scheme * Add More Inline Comments * Add More Inline Comments & Doxygen * Add Doxygen for Constructor of SpectralSolver * More Doxygen in Class SpectralSolver * Add Doxygen for New Functions in WarpXPushFieldsEM.cpp * Add Doxygen for New Functions in WarpX/MultiParticleContainer * do_dive/b_cleaning Must Be True With linear_in_J Option * Cast multij_n_depose to Real in Divisions * New Input Syntax * Add const where Possible, Fix Warnings * Docs for New Input Syntax, Fix Abort Messages * Consistent Use of Idx, IdxAvg, IdxLin * Improve Documentation of psatd.J_linear_in_time * Use const Type Qualifier whenever Possible * Simplify Initialization of Pointer ion_lev * Improve Doxygen * Update documentation * Add Note on NCI to Docs * Make warpx.do_multi_J_n_depositions Not Optional * Simplify Logic in getRequiredNumberOfFields * Use More const Type Qualifiers Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 1-9/+47
* initial tests with IWYU * added a couple of forward declarations * used iwyu on more files * progress * used iwyu on more files * progress with iwyu * progress with iwyu * fixed bug * progress with iwyu * progress with IWYU * progress with IWYU * fixed bug * fixed bug * progress with IWYU * progress with IWYU + use forward declarations in WarpX.H * first try with .def files * fix bugs * progress with IWYU * progress with IWYU * progress with iwyu * correct copyright * fixed bug * fixed bugs * fix missing include * fixed bug * fix bug * fix bug introduced during last bugfix * use iwyu on newly added files * add space * fix bug * fix missing include * fix missing include * fix missing include * fixed bugs * fixed bug * attempt at fixing issue with math functions * added missing include * fixed missing include * using _fwd.H * fixed bug * progress with iwyu * update AMReX branch * enforce alphabetic order * progress with iwyu * use right version of amrex * use right version of amrex for tests * fixed bug * fix another bug * fix missing include * fix missing include * fix missing include * updated amrex * initial work to document new include strategy * updated documentation * Fix rst & private includes * Remove accidentially added files * Fix rst code blocks * one more rst block Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-06-23DepositCurrent: Const Arguments (#2025)Gravatar Axel Huebl 1-11/+11
2021-03-18Add option to deposit current at arbitrary time (#1810)Gravatar Remi Lehe 1-4/+17
* Introduce relative_time for deposition * Deposit current at arbitrary time * Update documentation * Combine parameters in DepositCurrent * Explicitly show the time at which the current is deposited
2021-03-18Use Clear Naming Standard for ParmParse Variables (#1809)Gravatar Edoardo Zoni 1-2/+2
2021-03-17Replaced almost all nGrow with nGrowVect (#1801)Gravatar David Grote 1-1/+1
2021-03-02GPU clock timer for measuring load balance costs (#1406)Gravatar Michael E Rowan 1-16/+34
* merge * wip * namespace * eol * cost * eol * fix * eol
2021-01-27Take time step into account to compute guard cells for J and rho (#1607)Gravatar Edoardo Zoni 1-37/+50
* Use IntVect for ng_J and ng_rho * Compute guard cells for J and rho based on dt * Reset some CI benchmarks * Fix rebase commit * Add back +1 cell for rho: fix remaining out-of-bound accesses * Simplify ASSERTS using new interface of amrex::numParticlesOutOfRange
2021-01-21Define: _OPENMP -> AMREX_USE_OMP (#1520)Gravatar Axel Huebl 1-13/+13
* 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-08Avoid stringent assert statement on GPU (#1597)Gravatar Remi Lehe 1-2/+22
* Avoid stringent assert statement on GPU * Fix Pointer Member Access * fix nGrow with Vector * Update Source/Particles/WarpXParticleContainer.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2020-12-11Do not rely on managed memory in AddNParticles. (#1567)Gravatar Andrew Myers 1-9/+17
2020-12-11PSATD Runtime Control (#1300)Gravatar Axel Huebl 1-2/+7
* Docs: PSATD Runtime Option * Tests: PSATD Runtime Option Add new runtime option to PSATD regression test matrix. * PICMI: PSATD runtime option * Source: PSATD Runtime Option
2020-11-22CI: Windows (#1521)Gravatar Axel Huebl 1-1/+1
* CI: Windows Add an MSVC build to CI. * Windows: _USE_MATH_DEFINES Fix: ``` error C2065: 'M_PI': undeclared identifier ``` * Windows: no unistd.h fix: ``` fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory ``` * Injector: Trivially Copyable only GPU Only strictly required when we memcopy to accelerator devices. * Flex: never-interactive We don't use the interactive mode, so we can save some performance and address: ``` Parser\wp_parser.lex.cpp(1503,40): error C3861: 'isatty': identifier not found ``` Alternatively, we can include `<io.h>` on Windows. * MSVC: Vector<Long> != Vector<long> Fix return and assignment issues with `amrex::Long` != `long` in `amrex::Vector`. ``` Particles\MultiParticleContainer.cpp(438,13): error C2440: 'return': cannot convert from 'const amrex::Vector<amrex::Long,std::allocator<__int64>>' to 'amrex::Vector<long,std::allocator<long>>' Particles\MultiParticleContainer.cpp(452,94): error C2440: 'initializing': cannot convert from 'amrex::Vector<amrex::Long,std::allocator<__int64>>' to 'amrex::Vector<long,std::allocator<long>>' Particles\MultiParticleContainer.cpp(459,60): error C2665: 'amrex::ParallelDescriptor::ReduceLongSum': none of the 6 overloads could convert all the argument types Particles\WarpXParticleContainer.cpp(782,51): error C2665: 'amrex::ParallelDescriptor::ReduceLongSum': none of the 6 overloads could convert all the argument types ``` * Windows CI: Parallel Build
2020-10-23Fix Warning for SigmaBox FabFactory (#1466)Gravatar Weiqun Zhang 1-0/+6
2020-10-19Replace wherever possible '.reset(new' with '= make_unique' (#1429)Gravatar Luca Fedeli 1-1/+1
* replace wherever possible .reset(new with = make_unique * fixed bug * fixed bug * revert WarpXOpenPMD.cpp to the original version * removed another .reset(new
2020-10-02Fix some warnings for PSATD builds (#1401)Gravatar Edoardo Zoni 1-1/+5
* Fix warnings for 2D/3D PSATD builds * Fix warnings for RZ PSATD builds * Update FIXME comment: no known bug * Fix remaining warning for RZ PSATD builds
2020-09-30Use fewer guard cells for deposition (#1368)Gravatar Edoardo Zoni 1-32/+56
* Use fewer guard cells for deposition * Update some CI benchmarks * Revert "Update some CI benchmarks" This reverts commit 2f40062557d75e3f6b2d3ba284332b8a92a0d404. * Check if shapes and guard cells are compatible only for rho * Do not allocate one extra guard cell for J * Add more relaxed check on shapes and guard cells for J
2020-09-23Option to have absorbing BC for particles, regardless of field BC (#1334)Gravatar MaxThevenet 1-0/+42
* option to have absorbing BC for particles, regarless of field BC * document input parameter particles.absorbing_bc * minor, just add a small comment * clarify doc and use better input parameter * clarify documentation
2020-09-17Fix few compilation warnings (shift) (#1310)Gravatar Luca Fedeli 1-4/+13
* fix << declaration of galilean_shift shadows a member of WarpX >> * fix << unused mu_stag >> * fix << unused uxp, uyp, uzp >> * renamed galilean_shift (member variable of WarpX class) into m_galilean_shift * renamed v_galilean to m_v_galilean when appropriate * fixed bug introduced in latest commit * fix <<comparison of integer expressions of different signedness>> * Update Source/FieldSolver/FiniteDifferenceSolver/MacroscopicEvolveE.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-09-14Clean up profiling labels (#1320)Gravatar Edoardo Zoni 1-6/+5
2020-09-01In AddNParticles, id should be changed to Long (#1280)Gravatar Andrew Myers 1-1/+1
Resolves #1279.
2020-09-01 Fix 🩹(almost) all warnings ⚠️ with default configuration in 2D ↵Gravatar Luca Fedeli 1-0/+1
(DIM=2, openMP+MPI, double precision, no advanced solvers, no QED, native output) (#1264) Depends on #1263
2020-08-31Fix 🩹 (almost) all warnings ⚠️ with default configuration (DIM=3, ↵Gravatar Luca Fedeli 1-0/+3
openMP+MPI, double precision, no advanced solvers, no QED, native output) (#1263) This PR should fix almost all the compilation warnings in the default configuration (DIM=3, openMP+MPI, double precision, no advanced solvers, no QED, native output...). Or at least it does that on my system (my compiler is `g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0` ). I have just two residual warnings: ### 1 ``` [ 89%] Building CXX object CMakeFiles/WarpX.dir/Source/Parser/wp_parser.lex.cpp.o wp_parser.lex.c:1356:17: warning: ‘void yyunput(int, char*)’ defined but not used [-Wunused-function] ``` I don't know if `yyunput(int, char*)` is there for a reason, even if it is not used. So I didn't do anything. ### 2 ``` [ 96%] Building CXX object CMakeFiles/WarpX.dir/Source/Utils/CoarsenIO.cpp.o /home/luca/Projects/warpx_dir/WarpX/Source/Particles/WarpXParticleContainer.cpp: In member function ‘void WarpXParticleContainer::AddNParticles(int, int, const ParticleReal*, const ParticleReal*, const ParticleReal*, const ParticleReal*, const ParticleReal*, const ParticleReal*, int, const ParticleReal*, int, int)’: /home/luca/Projects/warpx_dir/WarpX/Source/Particles/WarpXParticleContainer.cpp:102:44: warning: unused parameter ‘nattr’ [-Wunused-parameter] 102 | int nattr, const ParticleReal* attr, int uniqueparticles, int id) ``` The first line of `AddNParticles` is `BL_ASSERT(nattr == 1); //! @fixme nattr is unused below: false sense of safety` . So I thought that there might be something to fix here and I didn't do anything.
2020-08-31Only tag particles for splitting when we change levels if splitting is on. ↵Gravatar Andrew Myers 1-0/+2
(#1276)
2020-08-06RZ PSATD: rho diags must be cell-centered (#1240)Gravatar Edoardo Zoni 1-0/+2
2020-07-24do not directly access the particle id and cpu in favor of going through the ↵Gravatar Andrew Myers 1-3/+3
getter / setter methods. These members are implemented using an anonymous struct that will be going away soon in amrex, so this type of access is deprecated. (#1208)
2020-07-20Vay current deposition (#1051)Gravatar Edoardo Zoni 1-0/+20
* Added stub for current correction in RZ spectral solver * Start implementation of Vay deposition * Continue implementation of Vay deposition * Correct deposition of D * Add phase shift for staggered currents * Small clean-up * Fix units in deposition of D * Implement average of cumulative sum (needs bug fix) * Start fixing bug in average of cumulative sum * Still debugging * Cumulative sums should be correct now * Subtract averages of cumulative sums: - current implementation: cumulative sums, inverse Fourier transform, subtraction of averages - needs to be tested (including units of D after Vay deposition) - needs to be shortened (too many loops over boxes and ParallelFors) * [skip CI] Clean up and fix units * Still fixing units * [skip CI] Remove temporarily averages of cumulative sums * [skip CI] Remove distinction between staggered and nodal * Vay and Esirkepov similar results on periodic single box: TODO: - debug (charge not conserved); - try using compute_shifted_shape_factor as in Esirkepov deposition; - clean up; - try on multiple boxes and with correction of mode at 0 frequency. * [skip CI] Clean up * Fix bug in 3D deposition * [skip CI] Clean up * Fix 2D and 3D implementation: - simulation results agree between direct and Vay deposition in both 2D and 3D - Travis CI tests should pass except for check of charge conservation (debug) * Small clean-up * Fix bug when compiling in RZ geometry * Add benchmark json files (will be reset later) * Do not set zero current at zero frequency * [skip CI] Revert last commit and clean up * Fix small bug after reverting commit * Set nodal test first on Travis * Fix benchmark for nodal test in 3D * Fix particle output for nodal test in 3D * Fix bugs due to staggering * Rename current nodal Travis tests * Add Travis tests staggered in 2D and 3D * Further clean-up after bug fix * Abort when using Vay deposition with domain decomposition * Add optional argument of index type to forward FFT * Fourier shifts can be private members as before * Small clean-up * Clean up and improve Doxygen documentation * Fix small bug in analysis script for 2D tests * Fix tests (remove E and B fields from particle diags) * Add option to fill guard cells and docs * Fix value of last guard cell by enforcing periodicity * Revert changes merged from #1121 * Clean up style * Improve docs * Fix forgotten alignment * Improve docs * Make base class functions VayDeposition pure Co-authored-by: Dave Grote <dpgrote@lbl.gov>
2020-07-09Fix bug and test with LaserAccelerationRZ (#1150)Gravatar Edoardo Zoni 1-1/+1
2020-06-22Remove persistent E+B (#1050)Gravatar Andrew Myers 1-10/+8
* add functor for doing the tmp particles copy for the back-transformed diagnosti * merge the particle push options into one kernel * EOL * fix assertion * add a FieldGatherandPushPX method to PhysicalParticleContainer * handle offset in copyAttribs * allow this functor to be constructed even it we aren't doing the back transformed diagnostics * EOL * update the overloads of PushPX for the Photon and RigidInjected ParticleContainers * function for dispatching the right field gather * init this val to 0.0 * fix some typos * handle scaling the fields for rigid injection * EOL * don't need to get pointers to E and B arrays in PushPX any more. * actually I can't remove these yet * EOL * variable order bug * move the QED stuff to the proper place * EOL * make sure we don't build these functors unless the runtime options are toggled * EOL * perform the field gather prior to the photon particle push * remove E and B components and FieldGather methods. Reimplement PushP for rigid injected and physical particles * update ionization to do field gather inline * remove E and B from the particle diagnostics * don't write E or B in these tests for particles * add missing files * remove EB from the Regtest ini file too * no need to do this twice * important typo * also do the gather inline for the QED processes that need to * move these sources inside ifdef for QED * fix bug in RZ * remove some fields from the Python tests. * remove all particle E and B comps from json benchmarks * don't assert that Ey is the langmuir output * remove uy from this output * update test * restore the mesh fields I turned off by mistake * turn off field IO for a few python tests I missed * fix typo * reset Langmuir_multi benchmark * update Langmuir_multi_nodal benchmark * update single precision langmuir bench * update psatd single precision languir one too * also do ionization_lab * finally, ionizaiton_boost * update benchmarks_json/Langmuir_multi_psatd.json * update benchmarks_json/Langmuir_multi_psatd_current_correction.json * update benchmarks_json/Langmuir_multi_psatd_momentum_conserving.json * update benchmarks_json/Langmuir_multi_psatd_nodal.json * remove the particle E and B from the choices in the docs * fix offset bug * also add the Gather subdirectory * Update Source/WarpX.H Co-authored-by: MaxThevenet <mthevenet@lbl.gov> * add docstring for LowerCornerWithGalilean * add new source files to CMakeLists.txt * also need to update the GPU regression tests * update the name of the output file for this python test * remove field gather call from FieldDiagnostics * fix typo in docstring * init fields to 0 * add docstring to the CopyParticleAttribs constructor * some explicit amrex::namepace Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-05-11Generalize coarsening for MR (#945)Gravatar Edoardo Zoni 1-2/+2
* Move interpolation functions for MR to new folder * Preparatory clean-up of old namespace Average for future MR functions * Add interpolation for MR in new namespace Coarsen * Change file names Average.H/.cpp to Coarsen.H/.cpp * Remove Source/Parallelization/WarpXComm.H (not necessary anymore) * Coarsening for IO and MR in separate files * Clean up IO and MR Coarsen namespaces * Remove old interpolation functions (charge and current) * Void commit: trigger Travis CI build * Fix GPU build * Void commit: trigger Travis CI build * Add Python script to test interpolation points/weights in 1D * Move using-directives inside namespaces * Add Doxygen documentation and comments * Minor style changes * Improve new Python script
2020-05-05Switch costs to LayoutData (#970)Gravatar Michael E Rowan 1-1/+1
Cleanup Cleanup
2020-05-01Do not rely on nodal flags (#931)Gravatar Edoardo Zoni 1-4/+4
* Start removing nodal flags where possible * Remove additional nodal flags * Clean up getFieldNodalFlagData in Python wrappers * Remove nodal flags from PML files * Revert "Remove nodal flags from PML files" This reverts commit 1d58519f9cee2e64df811f76f3d8a0aead1aa4ef. * Fix issue when removing nodal flags from PML files * Remove nodal flags from (OLD) slice diagnostics * Nodal flags are now local variables in WarpX::AllocLevelMFs * Trigger Travis CI build after AMReX bug fix * Void commit: trigger Travis CI build
2020-04-28Style change to match the standard (#957)Gravatar Michael E Rowan 1-5/+5
2020-04-24Prevent the use of Esirkepov with the nodal algorithm (#948)Gravatar Remi Lehe 1-0/+3
2020-03-30Port rigid injection to the gpu (#862)Gravatar Andrew Myers 1-15/+52
* port rigid injection to the gpu * eol * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * define csqi Co-authored-by: MaxThevenet <mthevenet@lbl.gov>