aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>
2020-09-23[mini-PR] Fix a couple of warnings (#1372)Gravatar Luca Fedeli 1-4/+4
* removed extra ; * fixed unused variable * changed variable name to avoid shadowing * fixed bug
2020-09-23Implemented fft_periodic_single_box for RZ spectral (#1301)Gravatar Remi Lehe 6-97/+97
* Implemented fft_periodic_single_box for RZ spectral For RZ psatd, simplified copy for forward transform * Apply review's suggestions and clean up * Add few comments, fix warnings, apply style conventions Co-authored-by: Dave Grote <dpgrote@lbl.gov> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2020-09-22Initial version of use_damp_fields_in_z_guard option (#1304)Gravatar David Grote 1-0/+88
* Initial version of use_damp_in_z_guard option * Fix typo in WarpX.H Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Changed use_damp_in_z_guard to use_damp_fields_in_z_guard * Added documentatin for use_damp_fields_in_z_guard * Clean up for use_damp_fields_in_z_guard * Added use_damp_fields_in_z_guard to picmi interface, and moved it to the psatd input group * For RZ spectral, damping of the fields is on by default when not periodic * Updated documentation for use_damp_fields_in_z_guard Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2020-09-18fix warnings in RZ (#1349)Gravatar Luca Fedeli 10-16/+38
2020-09-17Fix few compilation warnings (shift) (#1310)Gravatar Luca Fedeli 1-1/+0
* 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-14Remove The_Managed_Arena (#1313)Gravatar WeiqunZhang 2-6/+6
* Remove the base class of InjectorPoisition, InjectorDensity and InjectorMomentum so that they no longer live in managed memory. * Have both host and device copies of Injector*. * Modify Parser classes so that they can work without unified memory. Add HostDeviceParser that is non-owning and therefore suitable for being value captured by device lambda.
2020-09-14Clean up profiling labels (#1320)Gravatar Edoardo Zoni 1-2/+2
2020-09-10SpectralSolverRZ.H: Move Implementations to Source File (#1290)Gravatar Remi Lehe 2-38/+74
* Moved routines from SpectralSolverRZ.H to .cpp * Correct missing Vay deposition routine * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Dave Grote <dpgrote@lbl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2020-09-09Variation of macroscopic properties for E-update (#1016)Gravatar Revathi Jambunathan 8-85/+461
* Adding macro-E Push and new file * Add macroEvolveE, call it, and include algo selection in utils * fix eol * Fixing bug in macroE for sigma method 1 * changing MacroEvolveE to MacroscopicEvolveE * add class for macroscopicproperties and an object in WarpX class * fix eol * adding templated ckc call with comment that EvolveE is same for yee and ckc * add header file pointing to ckc algorithm * adding obejct m_macroscopic_properties to access sigma,eps,mu * some cleaning * Adding comments * adding documentation * spelling wandroff to wendroff * fixing eol * eol * const in the right place. Thanks bot! * profiler for macroscopic evolveE * MultiFab macroproperties with constant init, templated macroEvolveE, * call macroparameter init * eol fix * add parser for macroscopic properties * fix eol * adding input file * __device__ lambda cannot be private in class * fix grown tilebox declaration for init data * [skip ci] some more merge conflicts * some comments * removing redundant calls to Macroscopic EvolveE * [skip ci] fix growntilebox for initializing macro mf * clean and fix BackwardEuler call for ckc * commenting out old alpha and beta implementations * temporarily commiting local changes with calls in Interp. * fixing a typo * clean and add documentation * remove the test input file * fix typo * eol fix * Update Docs/source/running_cpp/parameters.rst Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> * PR suggestions * Update Source/FieldSolver/WarpXPushFieldsEM.cpp Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> * removing unnecessary includes * adding 2D initialization for stag arrays * removing init_style input parameter for material properties * eol fix * Adding dE/dt eq curl of (B/mu) * PhysConst ep0 and mu0 * Add functor for field access for macro and vacuum (B/mu) * fix eol * Update Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/FieldAccessorFunctors.H Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Apply suggestions from code review Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Apply suggestions from code review Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * fixing compilation errors and removing Gpu ManagedVector Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2020-09-03Fix some warnings in RZ spectral solver (#1286)Gravatar Remi Lehe 2-13/+13
* Fix some warnings in RZ spectral solver * enum: re-add ; Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-09-03Remove ManagedVector from finite-difference solver (#1269)Gravatar WeiqunZhang 6-21/+51
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 8-104/+131
2020-09-01 Fix 🩹(almost) all warnings ⚠️ with default configuration in 2D ↵Gravatar Luca Fedeli 1-0/+3
(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 2-1/+6
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-31Add copyright headers when missing (#1262)Gravatar MaxThevenet 3-0/+21
This PR adds a copyright header when missing in some files.
2020-08-24Fix some warnings (#1239)Gravatar Luca Fedeli 12-36/+76
This PR fixes the source of several compilation warnings. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-08-17Bug fix for RZ PSATD backwards transform for GPU (#1247)Gravatar David Grote 1-1/+1
2020-08-13Fix RZ PSATD backward transform for icomp > 0 (#1246)Gravatar David Grote 1-4/+3
2020-08-06Galilean PSATD: current correction and rho-free formulation (#1151)Gravatar Edoardo Zoni 14-164/+458
* Introduce option to update E with/without rho * Clean up * Implement current correction for Galilean PSATD (needs bug fix) * Include equations in docs * Fix EOL whitespaces error * Small clean-up * Implement Galilean PSATD update without rho * Clean up * Fix bug in current correction * Fix EOL whitespaces * Clean up * Fix unused import * Remove unused variable * [skip CI] Improve docs * Clean up style * Fix EOL whitespaces * Fix EOL whitespaces * Clean up style * Revert analysis script to old status * [skip CI] Clean up style * Make equations more human-readable and improve comments * 2D test with current correction works * Temporary build fix as in #1197 * 3D test with current correction works * Rename th and th_star as theta and theta_star * Fix a couple of wrong comments * Add vertical spaces to improve readability * Improve documentation * Function CurrentCorrection is now pure * 2D benchmark fields data are now correct * Add limits of coefficients for nu=-1 * Change default of update_with_rho for Galilean PSATD
2020-08-03Fix bug in imaginary part of divE (#1233)Gravatar Edoardo Zoni 1-1/+1
2020-07-27Added k-space filter for RZ spectral solver (#1006)Gravatar David Grote 11-5/+217
* Added k-space filter for RZ spectral solver * Added SpectralBinomialFilter files for RZ spectral solver * Added RZspectral binomial filter to CMakeLists.txt * Update Docs/source/running_cpp/parameters.rst Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Docs/source/running_cpp/parameters.rst Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/FieldSolver/SpectralSolver/SpectralBinomialFilter.H Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/FieldSolver/SpectralSolver/SpectralBinomialFilter.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.H Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Fixed literals in SpectralBinomialFilter.cpp * For RZ spectral, apply filter to rho old and new * Added SpectralBinomialFilter::InitFilterArray * For SpectralBinomialFilter, combine R and Z into one routine Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * For SpectralBinomialFilter, combine R and Z into one routine, part 2 Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * For SpectralBinomialFilter, combine R and Z into one routine, part 3 Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>