aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 1-1/+15
* 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>
2020-12-07Remove `using namespace Gpu` (#1555)Gravatar Weiqun Zhang 1-9/+8
Using namespace amrex::Gpu` is not safe because of the conflict between `amrex::Gpu::memcpy` and `::memcpy`.
2020-10-07Do not store first Fornberg coefficient (#1419)Gravatar Edoardo Zoni 1-30/+26
2020-10-02Fix some warnings for PSATD builds (#1401)Gravatar Edoardo Zoni 1-1/+1
* 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-03fix implicit capture of this in lambda function (#1282)Gravatar Luca Fedeli 1-1/+2
2020-09-01Remove ManagedVector from spectral solver (#1270)Gravatar WeiqunZhang 1-66/+81
2020-08-24Fix some warnings (#1239)Gravatar Luca Fedeli 1-4/+10
This PR fixes the source of several compilation warnings. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-07-15Add support for infinite-order PSATD (#1169)Gravatar danielbelkin 1-49/+65
* 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-08Averaged Galilean PSATD (#869)Gravatar Olga Shapoval 1-3/+2
* 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-05-29Set particular modified wavenumbers to 0 for spectral (nodal). (#1030)Gravatar Olga Shapoval 1-0/+18
* Set particular modified wavenumbers to 0 for spectral (nodal). * Add comments Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2020-04-17Remove code for hybrid PSATD, as well as remaining Fortran interface file (#927)Gravatar Remi Lehe 1-2/+0
* Clean-up hybrid code * Remove Fortran interface
2020-03-13PSATD Single precision (#805)Gravatar MaxThevenet 1-1/+1
* fix compilation for single precision PSATD with USE_GPU * compiles and tested on CPU also * add sentence to doc: FFTW needs to be compiled with single precision option * add test, better pre-proc directives indent, clearer ifdef * use using whenever possible * indent * fix TravisCI matrix, and improve matrix test * need to compile with same precision for fields and particles
2020-02-25Includes: Clean Up (#743)Gravatar Axel Huebl 1-2/+4
- 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-27Automatically add copyright header with update_copyright.shGravatar Tools 1-0/+7
2020-01-16No thrust (#629)Gravatar Andrew Myers 1-6/+1
* remove thrust from warpx * add in header for std::complex
2019-09-11Source & Tools: No EOL WhitespacesGravatar Tools 1-1/+1
End-of-line (EOL) whitespaces are verbose and increase diffs and merge conflicts over time. Cleaned them up for the `Source/`, `Examples/` and `Tools/` directory with the following bash one-liner: ```bash find . -type f -not -path './.git*' \ -exec sed -i 's/[[:blank:]]*$//' {} \; ``` Committed as generic user so git does not credit the many lines to me: ```bash GIT_AUTHOR_NAME="Tools" GIT_AUTHOR_EMAIL="warpx@lbl.gov" \ git commit ```
2019-06-06cleaning code for spectral cufft for 3DGravatar Revathi Jambunathan 1-0/+1
2019-05-06Added cuFFT kernels -- debugging error in rho values before forward transformGravatar Revathi Jambunathan 1-1/+5
2019-05-01Correct error in calculation of k vectorGravatar Remi Lehe 1-6/+8
2019-05-01Implement Real-to-complex FFTGravatar Remi Lehe 1-16/+40
2019-04-28Fix error in calculation of modified k vectorsGravatar Remi Lehe 1-2/+3
2019-04-26Cosmetic changesGravatar Remi Lehe 1-3/+3
2019-04-26Correct naming of `dx` ; use initializer listGravatar Remi Lehe 1-3/+2
2019-04-25Correct shiftGravatar Remi Lehe 1-2/+2
2019-04-23Add comments ; copy only to valid boxGravatar Remi Lehe 1-9/+42
2019-04-23Add comments, switch value of kGravatar Remi Lehe 1-7/+27
2019-04-23Switch and rename the shift factorsGravatar Remi Lehe 1-27/+31
2019-04-23Use Fonberg coefficients to calculate the modified kGravatar Remi Lehe 1-5/+16
2019-04-23Add calculation of Fonberg coefficientsGravatar Remi Lehe 1-22/+54
2019-04-23Apply shift factorsGravatar Remi Lehe 1-4/+4
2019-04-23Add break statementsGravatar Remi Lehe 1-1/+1
2019-04-23Added shift functionGravatar Remi Lehe 1-13/+42
2019-04-23Change type nameGravatar Remi Lehe 1-4/+4
2019-04-23Change function interfaceGravatar Remi Lehe 1-52/+54
2019-04-23Implement spectral solver in 2DGravatar Remi Lehe 1-2/+8
2019-04-23Fix NaN issueGravatar Remi Lehe 1-4/+4
2019-04-23Link spectral solver to the rest of the codeGravatar Remi Lehe 1-2/+3
2019-04-23Do not import namespace in .H fileGravatar Remi Lehe 1-0/+3
2019-04-23Added modified k vectorGravatar Remi Lehe 1-0/+16
2019-04-23Add Spectral K spaceGravatar Remi Lehe 1-0/+62