aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-05-03Implement div(B) Cleaning With FDTD (#1829)Gravatar Edoardo Zoni 6-9/+187
* Implement div(B) Cleaning With FDTD * Add CI Test * Clean Up
2021-04-28Fix Two Warnings for Builds Without EB (#1920)Gravatar Edoardo Zoni 2-0/+8
2021-04-27Staircased embedded boundaries in the YEE solver (#1881)Gravatar Lorenzo Giacomel 4-12/+58
* Added staircased embedded boundaris to the YEE solver * adding spherical resonating cavity test * adding functions for fields initialization * style adjustments * fixing tabs * fixed name of analysis script * fixed name of analysis script * fixed a few wrong preprocessor directives * workaround for missing boost * Revert "workaround for missing boost" This reverts commit 601f9eb2ec6f8c2100304379b2bea1c6cf9d1851. * another workaround for missing boost * getting rid of boost by depending on c++17 * Removed a few unused variables * adding USE_EB to addToCompileString for EB testing * removed tabs * fixing the inputs name for EB sphere test * shortened the test * zero padding the names of the images * adjusted two for loops * removed some unused variables * improving the fields initialization * removed the sphere test and implemented the cube test * fixed edges lengths computation and added comments * Fixed the case of all_regular geometries * fixing a bug that was breaking some tests * adding test folder * fixed the default values for the EB cube test * simplified the analysis script * fixed cubic resonator default results * inputting the plot file name from command line * fixing the diag name * Fixed a bug in edges initialization Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Adding comments to the staircased yee solver (thanks Remi) Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * fixed the cube resonator test * removed an unused import Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-04-21Fix Silver-Mueller boundary: cell ratio (#1907)Gravatar Remi Lehe 1-2/+2
* Fix typo in the Silver-Mueller boundary conditions * Reset checksum for silver-mueller
2021-04-21Add Silver-Mueller boundaries along z, for the RZ version of the code (#1906)Gravatar Remi Lehe 1-1/+33
* Implement Silver-Mueller boundary conditions in z for RZ * Add automated test and benchmark
2021-04-19Divergence cleaning for PSATD in PML (#1600)Gravatar Edoardo Zoni 5-77/+246
* Add div(E)/div(B) cleaning options for PSATD in PMLs * Pass missing flags to spectral solver in PML * Duplicate MPI exchange and communication functions for G * Use separate parameters for div cleaning in PMLs * Add asserts for features that are not implemented * Do not need to duplicate MPI exchange functions for G * Add short documentation for new input parameters * Set new parameters true by default with PSATD solver * Add CI test for PML div cleaning with PSATD * Use new syntax <diag_name>.intervals in new input file * Reset benchmark of new CI test * Always synchronize nodal points of G MultiFab * Fix few warnings in 2D build * Update Benchmark of pml_psatd_dive_divb_cleaning * Improve Documentation of warpx.do_pml_dive_cleaning Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Improve Documentation of warpx.do_pml_divb_cleaning Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Improve Abort Message * Clean Up Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>
2021-04-07Remove Unused Variable in ComovingPsatdAlgorithm (#1879)Gravatar Luca Fedeli 2-3/+3
2021-03-29Silver Mueller in RZ (#1804)Gravatar Lígia Diana Amorim 1-4/+81
* Added RZ Er, Et, Ez and Br, Bt and Bz * Answered my own question * Making Yee and cells domain check for RZ too * Added relevant coefficients * Derivative in z requires coefsz and n_coefsz * Bt computed with UpwardDz * UpwardDz might require CylindricalYeeAlgorithm.H * Added mode 0 Bz * Added higher-order modes for Bt * Added higher-order modes for Bz * Fix to EOLs * Fix typo * Added cylindrical specific parameters * Fix error of #endif * rmin also needed in RZ parameters * T_Algo needed for RZ -> different initialization in .H * Fix private / public function * Replacing T_Algo by CylindricalYeeAlgorithm * Fix typo * ParallelFor for Br, Bt and Bz separated * Compiled after removing unecessary Br * Changes suggested by reviewer * No need to compute r before if() * Corrected real and imaginary parts of Bz * Remove vscode file Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-03-29Class `PsatdAlgorithm`: Simplify Initialization of Coefficients (#1819)Gravatar Edoardo Zoni 2-616/+432
* Split Initialization Functions of Spectral Coefficients * Simplify Initialization of Coefficients Without Averaging * Do Not Store Coefficients C1,S1,C3,S3 With Averaging * Simplify Initialization of Coefficients With Averaging * Add amrex:: Prefix Following WarpX Style Guidelines * Match Names Of Coefficients With/Without Averaging * 'pow' Cannot Be Used in a Constant Expression * Update Doxygen Documentation
2021-03-19Warnings: PSATD+RZ & More (#1814)Gravatar Axel Huebl 7-8/+14
* PSATD+RZ: Fix Warnings Fix a couple of warnings in PSATD + RZ. * BesselRoots: Missing Include & using * Kernel & Util: Unused Code & Var
2021-03-18Use Clear Naming Standard for ParmParse Variables (#1809)Gravatar Edoardo Zoni 1-10/+10
2021-03-16Implement Silver Mueller boundary conditions (#1766)Gravatar Remi Lehe 5-0/+170
* Add function definitions for Silver-Mueller boundary condition * Add test file * Implement Silver-Mueller equations * Add equations for Bz * Add equation in the z direction * Add equation for Bx * Add 3D implementation * Add documentation, automated tests, and warnings * Include second automated test and evaluate benchmark * Fix unused variable warning * Fix minor bugs * Update benchmark * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Incorporate review comments * Incorporate more suggestions Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-03-16Add timers in routines that depend on cell-related work (#1692)Gravatar Michael E Rowan 26-186/+348
* 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>
2021-03-10Spectral Solver: Remove Unused Header Files (#1778)Gravatar Edoardo Zoni 2-138/+0
2021-03-04Implement averaged algo on staggered grids & merge spectral classes (#1544)Gravatar Edoardo Zoni 7-1173/+922
* Refactor and clean up some spectral classes * Abort when current correction or Vay deposition are not implemented * Implement general equations for averaged Galilean * Allocate averaged MultiFabs also when aux_is_nodal=1 and do_nodal=0 * Allocate +ngextra guard cells also for averaged MultiFabs * Make alias MultiFabs for averaged aux data * With averaging, interpolate from avg_fp (not fp) to aux * Fix some limits of the coefficients * Fix bug causing NaNs in spectral coefficients * Add 2D CI test with same analysis as nodal test * Add 3D CI test with same analysis as nodal test * Add limit that was not covered (knorm=0 && knorm_c!=0 && nu=0) * Allocate T2_coef only if Galilean algorithm is used * Allocate X4_coef only if Galilean algorithm is used * Remove extra ghost cell from 'avg_fp' MultiFabs
2021-03-01RZ Poisson solver (#1744)Gravatar David Grote 1-5/+167
* Added RZ Poison solver * Added test case for RZ Poisson solver * Fixed intervals in RZ Poisson test case * Added RZ Poisson test to regression tests * Split ComputePhi into two routines, RZ and Cartesian * Add declaration of new functions Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-02-12CMake: Search rocFFT (#1703)Gravatar Axel Huebl 1-8/+4
2021-02-11Spectral solver: remove extra semicolons (#1709)Gravatar Luca Fedeli 3-3/+3
2021-02-01remove semicolons (#1662)Gravatar Luca Fedeli 1-5/+5
2021-01-27Updates for electrostatic solver (#1604)Gravatar David Grote 1-0/+5
* Fix electrostatic solver with momentum conservation * Fix electrostatic, adding call to FillBoundaryAux * For electrostatic, removed unneeded extra calls to UpdateAux and FillBoundary * For electrostatic, calculate fields at the end of the time step * Updated ElectrostaticSphere analysis script to use fields from end of time step
2021-01-27Take time step into account to compute guard cells for J and rho (#1607)Gravatar Edoardo Zoni 1-2/+2
* 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 10-15/+15
* 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-11Fix some warnings (#1612)Gravatar Luca Fedeli 5-34/+37
* fixed some warnings * add missing files * fixed bug * fix several other warnings * add missing include * fixed bug * fixed bug * fixed bug * fixed bug
2021-01-07Implemented update without rho in RZ spectral solver (#1569)Gravatar David Grote 6-19/+66
* Implemented update without rho in RZ spectral solver * Updated documentation for update_with_rho for RZ * Tiny fix in GalileanPsatdAlgorithmRZ reordering declarations * In Langmuir_multi_rz_psatd, set update_with_rho = 1
2021-01-07fix some unused variables (#1606)Gravatar Luca Fedeli 1-0/+3
2020-12-23Use PML diagonal components only with div cleaning (#1592)Gravatar Edoardo Zoni 3-18/+52
* Use PML diagonal components only with div cleaning * Apply @RemiLehe's suggestions and simplify allocations
2020-12-16CMake: Update GPU Backend Vars (#1577)Gravatar Axel Huebl 1-1/+1
* CMake: Update GPU Backend Vars Adopt to changes in AMReX modernizing GPU control. Note: `WarpX_COMPUTE` for DPCPP is now called SYCL for consistency. * GH Action: SYCL/DPC++ w/o MPI for now does not build yet
2020-12-14Made sure that n_rz_azimuthal_modes is declared int everywhere (#1571)Gravatar David Grote 2-2/+2
2020-12-11PSATD Runtime Control (#1300)Gravatar Axel Huebl 10-13/+30
* 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-12-09Use new parser for more real input parameters (#1564)Gravatar NeilZaim 1-4/+6
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-12-07material properties are cell-centered. not nodal (#1551)Gravatar Revathi Jambunathan 1-3/+3
2020-12-07fix 2D out of bounds for macroproperty init (#1552)Gravatar Revathi Jambunathan 1-3/+6
2020-12-07AnyFFT: `AMReX_Config.H` (#1553)Gravatar Axel Huebl 1-0/+2
We reduce the number of command line arguments passed in the AMReX build systems by placing defines in an `AMReX_Config.H` file that is configured at AMReX build time. Files like `AMReX.H` will pull it in as well. In the case of `AnyFFT.H`, we need to make sure this is included before we check the preprocessor defines.
2020-12-02Improve spectral solver on staggered grids (#1468)Gravatar Edoardo Zoni 8-80/+801
* Implement Galilean PSATD equations on staggered grids * Implement high-order interpolation in 2D/3D * Include missing header file and small clean-up * Fix bug for FDTD build * Small clean-up * Modify current correction for staggered grids * Implement comoving PSATD scheme (formulation with rho) * Fix single-precision builds * Do not implement rho-free formulation for comoving PSATD yet * Invert sign of comoving velocity to match Galilean convention * Fix two bugs in comoving PSATD algorithm * Update benchmark of CI test momentum-conserving-gather * Update benchmark of CI test PlasmaAccelerationMR * Update documentation * Clean up comoving PSATD class * Clean up comoving PSATD class (more) * Clean up comoving PSATD class (more) * Implement changes requested in PR review * Add 2D regression test for staggered Galilean PSATD * Add 2D regression test for staggered comoving PSATD * Unify input files for new CI tests to avoid duplication * Fully rebase benchmarks changes on development * Update benchmark of Galilean hybrid test after #1536
2020-11-30Electrostatic lab frame (#1531)Gravatar David Grote 1-5/+58
* Implemented lab frame electrostatic model * Small clean up of ComputeSpaceChargeField * Added ElectrostaticSphereLabFrame regression test
2020-11-17CMake: Fix PSATD on CUDA (#1517)Gravatar Axel Huebl 1-1/+1
Regression build/linker error from an outdated CMake variable.
2020-11-16Fix PSATD equations used with PML (#1513)Gravatar Edoardo Zoni 2-60/+130
* Implement new PML PSATD equations * Update CI test and benchmark * Compute coefficients C1,...,C22 on the fly * Add check on initial energy from diagnostics
2020-11-13Simplify Python Callback (#1511)Gravatar Axel Huebl 2-7/+0
There is no need to modify the evolve routines depending on the python build. By default, the callbacks are stored as shared globals, which are validly initialized to nothing. This simplifies the binary variants of WarpX.
2020-10-26PSATD: only deposit charge if needed (#1428)Gravatar NeilZaim 1-2/+5
* PSATD: only deposit charge if needed * Update Source/FieldSolver/WarpXPushFieldsEM.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2020-10-26Explicit choice of `max_iters` for MLMG solver (#1471)Gravatar Igor Andriyash 1-2/+4
* added an option to set explicitely `max_iters` for MLMG solver * fix EOL white spaces * fix EOL white spaces 2
2020-10-19RZ PSATD, in forward transforms, initialize the copies to zero if needed (#1445)Gravatar David Grote 1-0/+11
2020-10-19Replace wherever possible '.reset(new' with '= make_unique' (#1429)Gravatar Luca Fedeli 5-24/+31
* 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-07RZ + single precision fix (#1417)Gravatar Michael E Rowan 1-5/+18
* RZ_SP fix * RZ SP fix * Fix cufft for single precision RZ. Co-authored-by: Weiqun Zhang <weiqunzhang@lbl.gov>
2020-10-07rocFFT support (#1410)Gravatar Weiqun Zhang 6-23/+250
* rocFFT support * rocfft in 2d rz PSATD solver
2020-10-07Do not store first Fornberg coefficient (#1419)Gravatar Edoardo Zoni 2-31/+36
2020-10-02Fix some warnings for PSATD builds (#1401)Gravatar Edoardo Zoni 10-49/+31
* 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-10-01RZ spectral: add default value of i_comp in scalar transforms (#1404)Gravatar David Grote 1-2/+2
2020-09-30Use fewer guard cells for deposition (#1368)Gravatar Edoardo Zoni 1-2/+3
* 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-24RZ spectral current correction and Galilean (#1216)Gravatar David Grote 11-37/+574
* Added stub for current correction in RZ spectral solver * Fixed comments in RZ spectral for current correction stub * Modified automated test for Galilean PSATD (#1033) * Impemented current correction in RZ spectral * Implementation Galilean version of RZ spectral solver * For RZ spectral, do forward and backward transform with current correction * Big fix in DivEFunctor.cpp for RZ spectral * Added RZ rho diagnostic for saving the modes * Implemented fft_periodic_single_box for RZ spectral * Moved routines from SpectralSolverRZ.H to .cpp * Added hook for VayDeposition in GalileanPsatdAlgorithmRZ * Bug fix in DivEFunctor * Fixes and cleanup for GalileanPsatdAlgorithmRZ * Fix line spacing in SpectralSolverRZ.H * Fix factor 1/2 in update of Ep_m * Fix factor 1/2 in update of Em_m * Fix sign error in current correction in GalileanPsatdAlgorithmRZ.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Add Langmuir RZ PSATD test with current correction * Add Galilean tests with/without current correction * For RZ psatd, simplified copy for forward transform * Added GalileanPsatdAlgorithmRZ.cpp to CMakeLists * Minor cleanup in RZ spectral solver * In GalileanPsatdAlgorithmRZ.cpp use member initialization for m_v_galilean Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Added some _rt to GalileanPsatdAlgorithmRZ.cpp Co-authored-by: Olga Shapoval <30510597+oshapoval@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>