aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-09-20PSATD: More Options for Time Dependency of J, Rho (#3242)Gravatar Edoardo Zoni 1-2/+8
* Rename PsatdAlgorithm as PsatdAlgorithmJConstantInTime * Add New Inputs: psatd.J_in_time, psatd.rho_in_time * Update PSATD Classes * Fix Bug for FDTD Build * Fix Warning for RZ PSATD Build * Fix Multi-J Loop w/ J Constant in Time * Clean up * Fix Error Message * Fix Time of Charge Deposition for Rho Linear * Add 3D Langmuir CI Tests w/ Multi-J Algo * Fix Checksums of New CI Tests * Remove Extra CI Tests (added in #3363) * Fix CI Tests w/ Multi-J PSATD * Add Docs for New Input Parameters * Galilean/Comoving PSATD Not Compatible w/ J Linear
2022-08-12Fill Guard Cells of Fields and Currents Independently (#3302)Gravatar Edoardo Zoni 1-2/+2
* Fill Guard Cells of Fields and Currents Independently * Fill Guard Cells of Averaged Fields as Regular Fields
2022-03-22Vay Deposition: Separate Arrays, Correct Index Types w/ FFTs (#2965)Gravatar Edoardo Zoni 1-6/+6
* Refactoring * Separate Arrays (Fine Patch) * Add Aborts w/ Current Centering, MR * Cleaning * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci 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>
2022-01-20Implement PML for the outer RZ boundary with PSATD (#2211)Gravatar David Grote 1-1/+9
* Initial version of RZ PSATD PML BCs * Cleaned up some bugs * Add support of do_pml_in_domain option * Cleaned up stuff for building * Fix PMLPsatdAlgorithm macro * Removed unneeded variable from SpectralSolverRZ * Change length 3 arrays to length 2 (for 2D) * Cleanup around DampPML * Added more checks of pml[lev] * Added CI test for RZ PML * Added code to update the corner guard cells * Further updates * Added CI test * Fixed EOL space * Updated CI benchmarks, removing round off fields * Changes to CI missed on previous commit * Various fixes for clean up * More fixes for clean up * Further cleanup * Updated benchmark * Fixed benchmarks file * Minor cleanup * Added round off benchmark values * Fixed testname in analysis_pml_psatd_rz.py * Update comment in analysis file * Put pml_rz code in RZ and PSATD macro blocks * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add geometry.dims input to CI test input file, inputs_rz * Cleanup to match recent changes 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>
2022-01-12Don't attempt to use costs when working on PML grids. (#2737)Gravatar Andrew Myers 1-7/+11
2022-01-09Multi-J: J Always Linear in Time (#2679)Gravatar Edoardo Zoni 1-3/+5
* Remove WarpX::J_linear_in_time * Fix Bug * Implement Deposition of Rho at Half Time * Implement New Equations for E * Fix New Equations for E * Cleaning * Fix Limits of X2, X3, X7 * Implement New Equations for F * Implement New Equations for F * Revert E Equations to Avoid Roundoff Changes * Remove Quadratic Equations * Remove Deposition of Rho at Half Time Step
2021-12-08Replace AMREX_SPACEDIM: Evolve & FieldSolver (#2642)Gravatar Prabhat Kumar 1-24/+24
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * AMREX_SPACEDIM : Initialization * Fix Typo * space * AMREX_SPACEDIM : Particles * AMREX_SPACEDIM : Evolve and FieldSolver
2021-12-02div(E,B) Cleaning Options for PSATD (#2403)Gravatar Edoardo Zoni 1-10/+4
* Implement div(E)/div(B) Cleaning with Standard PSATD * Cleaning * Update Benchmark * Add Nodal Synchronization of F,G * OneStep_multiJ: Nodal Syncs, Damp PML * OneStep_multiJ: Push PSATD Fields in PML * div Cleaning Defaults (Domain v. PML) * Include Fix of #2429 until Merged * Reset Benchmark of Langmuir_multi_psatd_div_cleaning * Multi-J: Remove PML Support * Include Fix of #2474 Until Merged * Exchange All Guard Cells for F,G * Fix Defaults * Update Test, Reset Benchmark * Fix Defaults * Cleaning * Default update_with_rho=1 if do_dive_cleaning=1 * Update CI Test pml_psatd_dive_divb_cleaning * Replace Warning with Abort
2021-11-22Python: Start 1D Support (#2582)Gravatar Axel Huebl 1-5/+39
* 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-07-21Multi-J Algo: Make div(E)/div(B) Cleaning Optional (#2116)Gravatar Edoardo Zoni 1-2/+9
* Multi-J Algo: Make div(E)/div(B) Cleaning Optional * Remove Unnecessary Newlines
2021-07-15Spectral Index: Replace `struct`s of `enum` with Class (#2062)Gravatar Edoardo Zoni 1-0/+60
* Add New Spectral Index Class * Cleaning * Use New Spectral Index Class in PML * Cleaning * Reuse Available Data for divE * Allocate Rho Data Only when Necessary * Cleaning * Fix Bug in RZ Geometry * Revert Commits for Allocation of Rho Data * Cleaning * Update Forward Declaration Header * Do Not Include Unnecessary Header Files * Doxygen * Do Not Use Separate div() Cleaning Flags * SpectralFieldIndex: Add Missing param to Doxygen * Remove Unused getRequiredNumberOfFields
2021-07-08Do Not Fill Guard Cells with Inverse FFTs, Unless for Field Damping (#2045)Gravatar Edoardo Zoni 1-3/+17
* Do Not Always Fill Guard Cells with Inverse FFTs * Query psatd.fill_guards from Inputs * Clean Up and Reduce Style Changes * Fix Bug for Periodic Single Box * Clean Up and Reduce Style Changes * Fix Bug for RZ PSATD * Remove Input Parameter, Default 0 Unless Damping * Fix CI Tests (2D) * Fix CI Tests (3D)
2021-07-06Fix readability-container-size-empty warning raised by clang-tidy (#2055)Gravatar Luca Fedeli 1-1/+1
* fix readability-container-size-empty warning raised by clang-tidy * fix bug
2021-06-30Add OpenMP for FFTW (#2040)Gravatar Axel Huebl 1-0/+4
* CMake: Find out if FFTW supports OpenMP Add a heuristics that also works with PkgConfig to query OpenMP support in FFTW. Enable by default if we build with the OpenMP compute backend unless explicitly disabled. Add a macro to control the source-code, since FFTW does not offer a public define for this. * FFTW: Initialize Threads Co-authored-by: Severin Diederichs <severin.diederichs@desy.de> Co-authored-by: Severin Diederichs <severin.diederichs@desy.de>
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 1-1/+19
* 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-05-10Guard Cells with PSATD: Fill With Inverse FFT, Damp Fields (#1867)Gravatar Edoardo Zoni 1-38/+45
* Loop Over Full Box in Inverse FFTs * Enable Fields Damping in Cartesian Geometry * Minimize Style Changes * Fields Damping: Fix Tileboxes For General Case * Clean Up * Assume Periodicity For Last Nodal Point in Inverse FFTs * Update Benchmark of averaged_galilean_2d_psatd * Update Benchmark of averaged_galilean_3d_psatd * Update Benchmark of averaged_galilean_2d_psatd * Update Benchmarks * Update Benchmark of pml_psatd_dive_divb_cleaning * Clean Up: Use More Descriptive Names
2021-03-16Add timers in routines that depend on cell-related work (#1692)Gravatar Michael E Rowan 1-4/+51
* Add timers * eol * AtomicAdd * lev argument for getCosts * style * style * wip * eol * .ipynb * passing down lev * eol * passing lev * eol * Update Source/Particles/Collision/PairWiseCoulombCollision.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Add for QED and ionization routines * eol * remove unneeded * mfi-->pti * move cost * eol Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-07-20Vay current deposition (#1051)Gravatar Edoardo Zoni 1-7/+6
* 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-05-29Encapsulate FFTs (#1055)Gravatar MaxThevenet 1-204/+14
* wrap fft libraries * implementation in cpp to avoid duplicate symbole * delete some fftw code * further cleaning * typo * pass fft plans by reference * fix bug due to typo. Dammit, macros sometimes make it hard * FFT wrapper also support cuFFT (not tested yet) * eol * further cleaning * fix cuFFT, tested on Summit * clean WarpX Complex checks * pass directly the IntVect instead of the components (what were you thinking?) * add some amrex prefix * add a few const * Should not need an FFT library to compile FDTD * gather all FFT header files into one. * eol * minor changes in code comments. * let dimension be chosen at runtime instead of at compile-time * fix compilation on GPU * add description to the wrapper namespace
2020-05-08Fix bug for PSATD momentum-conserving runs (#965)Gravatar Remi Lehe 1-2/+2
* Relax PSATD check on boxes, so that PSATD momentum-conserving can be used * Increase tolerance of test * Add automated tests for momentum-conserving PSATD
2020-04-03Avoid i%1 in a lambda, gives compiler segfault (#892)Gravatar MaxThevenet 1-6/+11
* avoid i%1 in a lambda, gives compiler segfault * add 1 comment * Update Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp * explicit capture by value * Update Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-04-02Periodic, single-box FFT (#881)Gravatar Remi Lehe 1-7/+34
* Implement periodic-single box option for spectral * Fix out-of-bound in the periodic, single-box case * Add documentation for periodic_single_box_fft
2020-03-13PSATD Single precision (#805)Gravatar MaxThevenet 1-29/+99
* 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-1/+5
- 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-02-19[mini-PR] when a cufft error occurs, print a meaningful error message (#728)Gravatar Luca Fedeli 1-6/+43
* added method to translate cufft errors * fixed style * bug fixing
2020-01-27Automatically add copyright header with update_copyright.shGravatar Tools 1-0/+7
2019-12-15Doxygen: add amrex:: prefix for function arguments in cpp filesGravatar MaxThevenet 1-4/+4
2019-07-22Merge branch 'dev' into psatd_pmlGravatar Remi Lehe 1-7/+66
2019-06-24Only copy FFT data to the valid boxGravatar Remi Lehe 1-21/+22
2019-06-06 Included revisions as suggested in the PRGravatar Revathi Jambunathan 1-7/+9
2019-06-06 adding 2D cufft plansGravatar Revathi Jambunathan 1-8/+13
2019-06-06cleaning code for spectral cufft for 3DGravatar Revathi Jambunathan 1-31/+19
2019-05-14 changed made after merging with lastest dev versionGravatar Revathi Jambunathan 1-8/+10
2019-05-08temporary print files for debuggingGravatar Revathi Jambunathan 1-34/+18
2019-05-06Added cuFFT kernels -- debugging error in rho values before forward transformGravatar Revathi Jambunathan 1-1/+78
2019-05-02Start implementation of spectral PMLGravatar Remi Lehe 1-3/+3
2019-05-01Fix FFT sizeGravatar Remi Lehe 1-5/+8
2019-05-01Fix normalizationGravatar Remi Lehe 1-6/+8
2019-05-01Implement Real-to-complex FFTGravatar Remi Lehe 1-12/+12
2019-04-29Merge branch 'dev' into fix_spectralGravatar Remi Lehe 1-42/+11
2019-04-29Update structure for storing spectral fieldsGravatar Remi Lehe 1-41/+11
2019-04-28Fix more 2D bugsGravatar Remi Lehe 1-2/+7
2019-04-24Correct out-of-bounds with real-space boxGravatar Remi Lehe 1-4/+2
2019-04-23Add comments ; copy only to valid boxGravatar Remi Lehe 1-27/+27
2019-04-23Switch and rename the shift factorsGravatar Remi Lehe 1-26/+41
2019-04-23Remove bug in Fourier transformGravatar Remi Lehe 1-1/+1
2019-04-23Fix a few bugGravatar Remi Lehe 1-7/+32
2019-04-23Apply shift factorsGravatar Remi Lehe 1-9/+36
2019-04-23Add break statementsGravatar Remi Lehe 1-12/+12
2019-04-23Added shift functionGravatar Remi Lehe 1-0/+8