aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2020-07-24CMake: RelWithDebInfo -O3 (#1203)Gravatar Axel Huebl 1-16/+27
Replace the historic default in `RelWithDebInfo` build types of `-O2` (if present) with `-O3`.
2020-07-24Do PSATD+RZ in the RZ_NO_MPI travis instance (#1202)Gravatar Remi Lehe 2-2/+3
* Do PSATD+RZ in the RZ_NO_MPI travis instance * Fix missing dependency
2020-07-24fix bug which prevented evolution of optical depth (#1205)Gravatar Luca Fedeli 1-1/+1
2020-07-23Workaround for 2D Galilean tests (#1200)Gravatar Edoardo Zoni 3-24/+34
2020-07-23Add Travis regression test for RZ spectral solver (#1175)Gravatar David Grote 6-8/+69
* Added PSATD RZ regression test case * Add Regression/Checksum/benchmarks_json/Langmuir_multi_rz_psatd.json * Fixed particle_ids in Langmuir_multi_rz_psatd.json * cmake-easyinstall: new options Just cosmetic updates to make the usage more compact :) * Moved RZ PSATD tests into the PSATD tests * Updated RZ PSATD checksum after merge of PR1072 Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-07-22Cleaner calculation of the simulation timestep (#1031)Gravatar Remi Lehe 13-91/+193
* Cleaner calculation of the simulation timestep * Fix compilation errors * Remove specification of CKC solver in PSATD test * Correct calculation of dt * Fix compilation error * Cleaner calculation of the simulation timestep * Fix compilation errors * Remove specification of CKC solver in PSATD test * Correct calculation of dt * Fix compilation error * Cleanup for cylindrical * Change input of automated tests to preserve previous results * Fix import statement for cylindrical * Preserve dt for PML test * Move function documentation to WarpX.H * Update CMakeList * Update CFL in some tests * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Fix compilation errors * Revert "Fix compilation errors" This reverts commit 56ef67f228269b266876629f49789d3afdbbc00b. * Fix compilation error * Add cmath headers Add directly used header files. * Fix Include Order Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-07-22make the docs and assertions around the particle shape factors reflect the ↵Gravatar Andrew Myers 2-3/+3
current behavior of the code. (#1199)
2020-07-22Fix Gatherv (#1197)Gravatar WeiqunZhang 1-2/+2
The long int version of amrex::ParallelDesciptor::Gatherv has been removed due to its poor performance. LoadBalance now uses ints for counts and offsets in gatherv.
2020-07-21openPMD: Fix NOMPI Particle Output (#1196)Gravatar Axel Huebl 1-12/+16
`amrex::ParallelGather::Gather` is implemented as a no-OP instead of a copy without MPI, so we need to branch in user-code.
2020-07-21[tiny] Explained print when NaN in LibEnsemble (#1190)Gravatar L. Diana Amorim 1-2/+2
* Add explanation to NaN test in warpx_simf.py * Fix suggested by reviewer
2020-07-21define compute_shape_factor for VayDepos (#1192)Gravatar Revathi Jambunathan 1-55/+83
* define compute_shape_factor for VayDepos * cast to double to avoid bug in SP * recasting double to amrex Real before calling atomics * Apply suggestions from code review Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-07-20Fix Evolution: Current Depos. and Shapes (#1082)Gravatar Michael E Rowan 7-210/+269
* single precision fixes * compute_shape_factor functors * _rt to compute_shape_factor argument * SP comment * SP benchmarks
2020-07-20Average slice emittance - libEnsemble example (#1157)Gravatar L. Diana Amorim 3-36/+73
* Added option of slice emittance * Removed previous emittance calculation to avoid confusion * Fixed electron rest mass * Fix extra y emittance not needed for 2D runs * Fixed extra range in emittance * Fixed typo * Fixed multiple errors * Fixed extra beta * Added option of NAN that does not interfere with analsys * Fixed emittance calculation function * Added NAN option to runs with negligible charge * Fix to EOL error * Remove repeated assignment * Added comment to explain if * Fixed typo * em_libE * Fixed energy spread * Excluding runs that did not finish * Fixed typo * Fixed typo 2 * Fix typo * No need to change this line * This way NAN values won't influence results * Also max needed fix for NANs
2020-07-20GitHub Action CI: CUDA (#1176)Gravatar Axel Huebl 1-0/+35
* GitHub Action CI: CUDA Add a single-precision, Nvidia NVCC CUDA build to CI. * CI: CUDA 11.0.2 * CUDA CI: with OpenMPI Just more complete and realistic.
2020-07-20Overwrite AMReX Defaults: Python (#1177)Gravatar Axel Huebl 3-8/+14
Forgot to also overwrite the initialization defines for Python with my last PR.
2020-07-20replace quotes in AMReX includes (#1186)Gravatar MaxThevenet 6-11/+16
2020-07-20instrument FlushFormatPlotfile::WriteToFile and use it in automated perf ↵Gravatar MaxThevenet 2-1/+2
tests (#1185)
2020-07-20Vay current deposition (#1051)Gravatar Edoardo Zoni 32-54/+916
* 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-20Evolve: Remove Unused Variables (#1184)Gravatar Axel Huebl 1-3/+0
Fix warnings after some recent refactoring.
2020-07-17respect AMREX_MPI_THREAD_MULTIPLE (#1182)Gravatar Andrew Myers 1-5/+11
2020-07-17LWFA: Diag add Charge Density (#1048)Gravatar Axel Huebl 7-5/+14
* LWFA: Diag add Charge Density Dump the charge density in the LWFA example by default. This is a common quantity to visualize when getting started, so we adjust this to be generated by default. * reset benchmark: LaserAcceleration (add rho) Co-authored-by: Tools <warpx@lbl.gov>
2020-07-17Fixing compiler warnings (#1178)Gravatar Olga Shapoval 2-16/+5
* Removed unused variables and made 'vy=v_galilean[1]' declaration conditional on 3D case (this fixes compiler warnings) * Avoid unnecessary conversion from 'double' to 'int' (this fixes compiler warnings)
2020-07-17[mini] Fix automated performance tests on Cori (#1181)Gravatar MaxThevenet 1-1/+3
* need to load PrgEnv intel for tests * 1 step for IO tests on Cori too
2020-07-17fix documentation for external E B with constant values (#1180)Gravatar Revathi Jambunathan 1-3/+3
2020-07-17For RZ, fix the deposition near the axis (#1072)Gravatar David Grote 2-39/+38
* For RZ, fix the deposition near the axis * Updated LaserAccelerationRZ checksum The change was expected since the code changes modified the charge and current density near the axis. * Updated LaserAccelerationRZ checksum The change was expected since the code changes modified the charge and current density near the axis. * Update benchmark Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2020-07-16Travis: Work-Around yt/matplotlib (#1179)Gravatar Axel Huebl 1-1/+1
Matplotlib 3.3.0 removed a private member module which yt relies on. We downgrade matplotlib to keep going.
2020-07-16Combine analysis scripts for Galilean and averaged PSATD automated tests in ↵Gravatar Olga Shapoval 5-120/+53
one (#1174) * Combined analysis scripts for Galilean and averaged tests in one script * Deleted files 'analysis_avg_2d.py' and 'analysis_avg_3d.py' * Cleanup: removed empty lines
2020-07-16Default: abort_on_out_of_gpu_memory = 1 (#1164)Gravatar Axel Huebl 6-6/+79
* Default: abort_on_out_of_gpu_memory = 1 Change the default input parameter from AMReX `amrex.abort_on_out_of_gpu_memory` from false (`0`) to true (`1`). We set this by default to avoid that users experience super-slow GPU runs when exceeding GPU memory. In such a case, users should explicitly set this to option. In my optinion, this is only an intermediate solution since what we actually want on out-of-GPU memory events should be: - finish current simulation step and cause a load balance or - trigger a checkpoint and shut down cleanly - then the user can manually restart with more resources We want to address the opposite case, user under-utilizes a GPU, with a warning for now. Ref.: - https://amrex-codes.github.io/amrex/docs_html/GPU.html#inputs-parameters * abort_on_out_of_gpu_memory: review Add review comments. Co-authored-by: L. Diana Amorim <LDianaAmorim@lbl.gov> Co-authored-by: L. Diana Amorim <LDianaAmorim@lbl.gov>
2020-07-16Add doc for performance tests (#1161)Gravatar MaxThevenet 2-0/+109
* add doc for performance tests * eol * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * eol * Apply suggestions from code review Co-authored-by: L. Diana Amorim <LDianaAmorim@lbl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: L. Diana Amorim <LDianaAmorim@lbl.gov>
2020-07-16fix automated performance tests on Summit (#1160)Gravatar MaxThevenet 12-20/+14
* update IO syntax for performance CI * update performance tests dir * minor fixes in the IO perf test
2020-07-15Add support for infinite-order PSATD (#1169)Gravatar danielbelkin 3-52/+98
* Set k_modified = k for inf order * Add support for nox = inf in input file * Added infinite-order to documentation * Add back in accidentally-removed line * End-of-line whitespaces? * End-of-line whitespaces. * Remove vspace Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Remove vspace Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Add whitespace Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Remove unnecessary line Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Whitespace Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Remove whitespace * Clarify error message Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * ...whitespace Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2020-07-14Update automated galilean tests (#1173)Gravatar Olga Shapoval 4-29/+31
* Fixed typo: use 'dim=3' instead of 'dim=2' for 'galilean_3d_psatd' test * Updated reference energy values for 2D and 3D galilean tests. * Updated benchmark for galilean_3d_psatd.json
2020-07-14Fix bug in RZ PSATD rho terms (#1172)Gravatar David Grote 1-2/+2
2020-07-14make fft_do_time_averaging a member of class WarpX (#1165)Gravatar MaxThevenet 6-21/+16
2020-07-13Added the electrostatic sphere test (#907)Gravatar dbizzozero 4-41/+147
* Create inputs * fixed stuff * Make smaller test * Re-use EvolveEM for ES calculation * Use correct variable const_dt * Avoid out of bound and modify computation of electrostatic field * Update test file * Remove tab * Minor refactoring of space-charge calculation * Fix electrostatic test * Particle tests for estatic Added single particle test, 2 partcile test (1 fixed), and a plotting script for the 2 particle test output * Update yt_2_particle_test.py * electrostatic sphere test inputs Input script for electrostatic sphere test * Updates to electrostatic sphere test * Create analysis_electrostatic_sphere.py * Added analysis scripts * Update PhysicalParticleContainer.cpp * Update inputs_3d * Update analysis_electrostatic_sphere.py * Update analysis_electrostatic_sphere.py * Update WarpX-tests.ini * Removed whitespace This whitespace parser is PICKY! * Update yt_2_particle_test.py * Removed EOL whitespace * Deleted unnecessary files * Removed unused import statements * Electrostatic sphere test fixes Fixed several style and performance related issues in analysis_electrostatic_sphere. Removed unnecessary bounding box from initial particles in inputs_3d. Removed 2 particle test in WarpX-tests.ini. Removed 2 particle test entirely from PR. Removed electrostatic sphere plotting tool from PR since it isn't used by anything and needs to be adjusted for more general use. * Remove untested file * Remove obsolete input parameter * Fix issues with electrostatic automated test Co-authored-by: dbizzozero <dbizzozero@users.noreply.github.com> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2020-07-13Added laser shifts to input for each libE config (#1141)Gravatar L. Diana Amorim 2-10/+28
* Added laser shifts to input for each libE config * Position is 3D * Fix spaces - phrase must match * Laser pulse duration was off by x10 * Update Tools/LibEnsemble/write_sim_input.py Co-authored-by: MaxThevenet <mthevenet@lbl.gov> * Changed spaces * Shift added to mirrors position as well * Fixed tab * Fixed spaces for consistency * Added space to be consistent Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-07-13Fix Profile: Parabolic Ch. Single Prec. (#1084)Gravatar Michael E Rowan 5-9/+110
* InjectorDensity single precision fix * Tests * tests * Plasma profile regression test * EOL * Parabolic channel regression test * amrex math sqrt * input diags file prefix * diag --> diag1 * Update WarpX-tests.ini
2020-07-10Summit Power9 CPUs documentation (#1162)Gravatar Michael E Rowan 2-1/+58
* Power9 CPU docs * Update Tools/BatchScripts/batch_summit_power9.sh Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Subsection convention Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-07-10Fix compilation of AvgGalilean for GPU (#1159)Gravatar Remi Lehe 2-2/+18
2020-07-09Fix bug and test with LaserAccelerationRZ (#1150)Gravatar Edoardo Zoni 3-2/+4
2020-07-08openPMD: Directory Cleanup, 6 Digits (#1149)Gravatar Axel Huebl 1-2/+2
This reorders the naming of diagnostics to be a bit more readable. Currently it was: ```bash $ ls Bin/diags/ diag1bp/<N>.bp diag1h5/<N>.h5 ... diag100000 diag100100 <N> ... ``` Now it proposes for openPMD output ```bash $ ls Bin/diags/ diag1/openpmd_<N>.bp diag1/openpmd_<N>.h5 ``` This is also a bit easier for some tooling (i.e. yt and openPMD-viewer that expect full consistent dirs atm.) and keeps things nicely together. Also bumps the zero-padding to use consistently 6 digits for iterations in output files (<1M iterations), since sims (ions) with >100k steps are not uncommon. This does not yet change plot files, since this is still requiring to make the regression testing scripts more flexible.
2020-07-08Averaged Galilean PSATD (#869)Gravatar Olga Shapoval 34-28/+1097
* Read Galilean velocity * Prepare structures for Galilean solver * Started implementing Galilean equations * Analytical limits for X1, X2, X3, X4 coefficients added * Slight changes added * Added Galilean position pusher * Scale galilean velocity * Remove unneeded Abort * Fix Galilean pusher * Allocate Theta2 array * Fix definition of coefficients * Increase guard cells for Galilean * Add guard cell in particle exchange * Added modifications for PICSAR galilean branch * Averaged coefficients added * Type corrected * v_gal added to warpx_current_deposition * v_gal added to WarpXParticleContainer.H * Bug fixed - update particle x-position over one time step * Fix issues with merge from dev * Averaged fileds allocated on fine patch (Ex) * Preparation for merging dev into galilean. * remove TABs by hand * Removed a tab. * Redeclared v_galilean as a vector & related changed * Added an automated test * Moved v_galilean inside WarpX constructor * Added analysis script for the automated test * Changed name of the automated test to galilean_psatd * Added InitializeSpectralCoefficients method * Removed temporary comments * Averaged fields added to FiledGather * Added infinite order k[i] * Setting kx_mod( kz_mod) = 0 for index = nx/2(-nz/2) * Adding galilean shift * Implemented galilean shift * Changed method's name from GalileanShift to ShiftGalileanBoundary * Added doxygen string for ShiftGalileanBoundary * Removed never used method LowerCornerWithCentering * Removed temporary comments * Removed dt as a variable from DepositCharge method and its dependencies * Changing type of v_galilean from amrex::Vector to amrex::Array * Changed back ng_fft to be equal nox_fft * Changed v_galilean's type from amrex::vector to amrex::array * Removed type * Removed temporary comments * Added flag 'do_time_averaging' to swith from unaveraged to averaged Galilean PSATD * Updated doxygen * Small fix on using 'do_time_averaging' flag * Remove some commented Print statements * [skip ci] Further cleanup * Fix compilation * Guard cells update of the averaged E,B fields * Corrected included header file accordingly * Removed EOL * Removed EOL * Corrected path of the included header file * Updated choice of the spectral solver. * Cleanup. * use amrex::exp instead of std::exp * no backward FFT for avg fields if avg is off * Need to shift avg fields in MoveWindow * Further cleaning * Added 2D automated test for averaged PSATD * Added automated 2D and 3D tests for averaged PSATD * Removed comments * Added specifications for averaged Galilean PSATD tests. * Bug fixed - do FillBoundary of the averaged fields only if averaged is activated * Do shiftMF of the averaged fields only if fft_do_time_averaging=true * Add checksum json benchmarks for averaged Galilean PSATD * Add missing indentation * Add missing indentation * Updated automated analysis script * Updated diags period * Fixed bug: no backtransform of the averaged fields when WARPX_DIM_RZ is set * Fixed an uninitialized variable * Clean-up * Changed permissions for analysis_avg_*d.py * Compactified variables initialization via conditional assignment * Initialized averaged E_avg, B_avg fields * Updated automated test for 2D averaged galilean PSATD * Updated benchmark for 2D averaged galilean PSATD * Updated automated 2D averaged PSATD test & benchmark * Updated automated 3D averaged PSATD test & benchmark * Fixed typo * Updated benchmark averaged_galilean_3d_psatd * Initialize the averaged fields only if the averaged Galilean PSATD algorithm is enabled * Encreased time step for automated 3D averaged Galilean PSATD (to be equal c*dt=dz while dz/dx=3) * Updated 3D automated test: specified standard deviations `.ux_th, .uy_th, .uz_th` along each direction * Typo from the previous commit: enabled the averaged algorithm * Trying out another input parameters for 3D averaged automated test with v_gal = v_plasma * Update benchmark for previously added 3D averaged automated test * Update 2D averaged automated test and corresponding benchmark * Revert "Updated diags period" This reverts commit 7334729b05e96589e020c981efdb430ca095991d. * Cleanup: removed unwanted comment. * Added descriptions of the 2D and 3D automated tests for the averaged Galilean PSATD. * Updated value calculated via standard Galilean PSATD. * Encreased relative error tolerance for 3D automated test for the averaged Galilean PSATD. * Removed to avoid duplication since it already specified in the corresponding 2D/3D input scripts. * Removed unwanted empty lines * Added spaces after function's names * Removed unwanted empty line * Removed * Fixed indentation * Cleanup: removed #include <math.h> * Cleanup: removed empty lines and fixed indentation * Added 'AvgGalileanAlgorithm.cpp' to 'CMakeLists.txt' Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-07-07Raise the stack limit when running with cuda (#1154)Gravatar Andrew Myers 1-0/+5
* raise the stack limit when running with cuda * fix comment + only do this in debug mode
2020-07-07step is -1 for diags->ComputeAndFlush at initialization (#1148)Gravatar Revathi Jambunathan 1-1/+1
2020-07-06PSATD: add option to update E without using rho (#1128)Gravatar Edoardo Zoni 15-154/+229
* Introduce option to update E with/without rho * Clean up * Include equations in docs * Fix EOL whitespaces error * Small clean-up * Clean up
2020-07-06Docs: OMP new CMake default (#1145)Gravatar Axel Huebl 1-1/+1
Update the CMake documentation to reflect that OpenMP is enabled by default (as in GNUmake).
2020-07-03assert the particles are positive to check for overflow (#1142)Gravatar Andrew Myers 1-0/+3
2020-07-03CMake: Guard CMake 3.17 Feature (#1143)Gravatar Axel Huebl 1-5/+7
Add a feature guard for a CMake 3.17+ feature (CUDA C++ std).
2020-07-02Moved ShiftGalileanBoundary() call to precede back transformed diagnostics ↵Gravatar Olga Shapoval 1-2/+2
(#1126)
2020-07-02PSATD: current correction works only with global FFTs (#1131)Gravatar Edoardo Zoni 12-51/+159
* Clean up implementation of current correction: - abort when current correction runs with psatd.periodic_single_box_fft=0 - rename input parameter from psatd.do_current_correction to psatd.current_correction - add nodal tests in 2D and 3D (using direct current deposition) - change 2D test: use Esirkepov deposition, instead of direct, as in 3D test - add/update relevant checksum benchmarks * Small clean-up