aboutsummaryrefslogtreecommitdiff
path: root/Source (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-05-05QED module: use PICSAR function to calculate gamma for photons (#1928)Gravatar Luca Fedeli 1-2/+9
2021-05-05fix uninitialized arrays (#1933)Gravatar Luca Fedeli 1-6/+6
2021-05-03Implement div(B) Cleaning With FDTD (#1829)Gravatar Edoardo Zoni 15-14/+330
* Implement div(B) Cleaning With FDTD * Add CI Test * Clean Up
2021-04-29Pass skip_deposition to pc->Evolve (#1925)Gravatar David Grote 1-1/+1
2021-04-29Fix indentation when evolving QSR optical depth (#1922)Gravatar Neïl Zaim 1-5/+5
2021-04-28Fix Two Warnings for Builds Without EB (#1920)Gravatar Edoardo Zoni 2-0/+8
2021-04-27Ensure the geometry.coord_sys == 1 for RZ (#1918)Gravatar David Grote 1-0/+7
* Ensure the geometry.coord_sys == 1 for RZ * Fixed Examples/Tests/ElectrostaticSphere/inputs_rz
2021-04-27Staircased embedded boundaries in the YEE solver (#1881)Gravatar Lorenzo Giacomel 9-14/+247
* 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-21Fix LoadBalance + MR: Rebuild Particle Masks (#1904)Gravatar Axel Huebl 1-2/+6
In MR simulations, particle masks are used to determine if a fine-patch particle is in the field gather and/or current deposition buffer regions near the coarse/fine boundaries. This is needed because some particles deposit to / gather from the coarse level, since they are near the level boundaries. On regriding during load-balancing, we can avoid to communicate the `MultiFab`s for those masks (gather and deposit) if we locally re-build the mask in the new distribution mapping. We forgot to trigger the rebuild, which caused illegal memory accesses in the particle evolve (partition) down the road.
2021-04-20Fix logic error when load balancing with more than 1 level. (#1903)Gravatar Andrew Myers 1-2/+6
* Fix logic error when load balancing with more than 1 level. * 0 -> false
2021-04-19Remove outdated abort and add LB PSATD regression test (#1897)Gravatar Michael E Rowan 1-2/+0
* LB PSATD regression * reset benchmark for <test name> because ... Co-authored-by: Tools <warpx@lbl.gov>
2021-04-19Divergence cleaning for PSATD in PML (#1600)Gravatar Edoardo Zoni 13-180/+619
* 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-15fix bug in handling additional real components, such as optical depths (#1894)Gravatar Luca Fedeli 1-1/+2
2021-04-15Hybrid Galilean: Same Guard Cells in z as Nodal (#1887)Gravatar Edoardo Zoni 1-11/+25
* Galilean Staggered: Same Guard Cells in z as Nodal * Update Benchmarks of Hybrid Tests
2021-04-15Boundary Condition : Interface with existing PML (#1768)Gravatar Revathi Jambunathan 6-41/+106
* Read boundary and set periodicity, enumerate BC types, added support for periodic * separate particle and field boudnary structs * Update comment for particle struct * default pml is 0, and reset lo, hi, and do_pml to 1 * turn on pml for MR * eol * remove duplication * resolving commit conflict * explicitly setting pml_HI_MR * default pml lo and hi to 0, and set MR pml lo and hi to the domain values if fine patch coincides with domain boundary * set lo and hi flag for pml when do pml = 1 and domain is non-periodic * remove commented line * add doc * Update Source/Utils/WarpXUtil.cpp remove empty line * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Docs/source/usage/parameters.rst lower case for input * add do_pml flags for IonAcc2d and PlasmaMirror * add pml = true in PICMI for gaussian beam and plasma acceleration * pml is the default field BC * adding temporary defaults for field and particle BC using periodicity * fix temp initialization * set default to pec if input sets pml to 0 * fix typo * logic for both old and new pml interface * fix eol * change examples to original pml input with default values * Update Docs/source/usage/parameters.rst Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * fix comments Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Docs: fix .rst list Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-04-13Add an option to skip deposition in the `Evolve` function ; use it for ↵Gravatar Remi Lehe 13-108/+116
electrostatic (#1807) * Introduce new option skip_deposition * Properly implement the option to skip deposition * Skip deposition for electrostatic solver * Correct typo
2021-04-12Add a delay to laser profile read from "txye" file (#1816)Gravatar Luca Fedeli 2-0/+11
* add delay to txye laser * add delay in test * fix bug * fixed bug * Update Docs/source/running_cpp/parameters.rst Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Docs/source/running_cpp/parameters.rst Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-04-12Add nodal synchronization of E and B fields in the main grid (#1817)Gravatar Neïl Zaim 3-0/+106
* Add nodal synchronization of E and B fields in the main grid * Update benchmarks * Update value in pml analysis file and put synchronization between PSATD push and FillBoundary * Update PML benchmarks and put the synchronization back in its original position * Bogus change in benchmark to trigger CI again * Update benchmarks
2021-04-12Fix QED Build (CUDA 10.0) (#1888)Gravatar Axel Huebl 3-20/+23
Replace capture of a host-side array with unnamed members for E & B field transport with a nicely named struct that transports the Array4's as members. This is harder to mix up and thus more self-documenting and solves an issue with NVCC 10.0 of the form: ``` nvcc_internal_extended_lambda_implementation: In instantiation of '__nv_dl_wrapper_t<Tag, F1, F2, F3, F4, F5>::__nv_dl_wrapper_t(F1, F2, F3, F4, F5) [with Tag = __nv_dl_tag<int (*)(amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&, amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&, amrex::Box, const amrex::Array4<const double> (&)[6], int, int, const SchwingerFilterFunc&, const SmartCreate&, const SmartCreate&, const SchwingerTransformFunc&), filterCreateTransformFromFAB<1, amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>, amrex::Array4<const double> [6], int, const SchwingerFilterFunc&, const SmartCreate&, const SmartCreate&, const SchwingerTransformFunc&>, 1>; F1 = amrex::Array4<double>; F2 = const SchwingerFilterFunc; F3 = const amrex::Array4<const double> [6]; F4 = const amrex::Box; F5 = int*]': /home/ubuntu/repos/WarpX/Source/Particles/ParticleCreation/FilterCreateTransformFromFAB.H:174:28: required from 'Index filterCreateTransformFromFAB(DstTile&, DstTile&, amrex::Box, const FABs&, Index, Index, FilterFunc&&, CreateFunc1&&, CreateFunc2&&, TransFunc&&) [with int N = 1; DstTile = amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>; FABs = amrex::Array4<const double> [6]; Index = int; FilterFunc = const SchwingerFilterFunc&; CreateFunc1 = const SmartCreate&; CreateFunc2 = const SmartCreate&; TransFunc = const SchwingerTransformFunc&]' /home/ubuntu/repos/WarpX/Source/Particles/MultiParticleContainer.cpp:1169:167: required from here nvcc_internal_extended_lambda_implementation:70:103: error: invalid initializer for array member 'const amrex::Array4<const double> __nv_dl_wrapper_t<__nv_dl_tag<int (*)(amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&, amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>&, amrex::Box, const amrex::Array4<const double> (&)[6], int, int, const SchwingerFilterFunc&, const SmartCreate&, const SmartCreate&, const SchwingerTransformFunc&), filterCreateTransformFromFAB<1, amrex::ParticleTile<0, 0, 4, 0, amrex::ArenaAllocator>, amrex::Array4<const double> [6], int, const SchwingerFilterFunc&, const SmartCreate&, const SmartCreate&, const SchwingerTransformFunc&>, 1>, amrex::Array4<double>, const SchwingerFilterFunc, const amrex::Array4<const double> [6], const amrex::Box, int*>::f3 [6]' ```
2021-04-08Fix printf format in Parser (#1886)Gravatar Weiqun Zhang 1-1/+1
It should be `%s` instead of `%d`.
2021-04-08Fix Out-Of-Bound Access In Some Interpolation Functions (#1885)Gravatar Edoardo Zoni 1-12/+48
2021-04-07Parser: Abort on NaN/Inf Results (#1872)Gravatar Axel Huebl 1-0/+23
* Parser: Abort on NaN/Inf Results If individual terms in an expression passed to the parser result in Inf or NaN, this invalidates the whole expression result (as in usual C). Since this happens often in user-proveided piecewise constructed functons, we throw an error now instead of working with the invalid results. * Update AMReX * SYCL: isfinite from AMReX We now added the wrapper in AMReX.
2021-04-07Abort If More Guard Cells Than Valid Cells (#1873)Gravatar Edoardo Zoni 2-0/+94
* Abort If More Guard Cells Than Valid Cells * Extend Check To All Available MultiFabs
2021-04-07Jn: first arg int (#1876)Gravatar Axel Huebl 1-2/+2
Cast the first argument of the call to `jn(f)` to `int` in the parser.
2021-04-07Remove Unused Variable in ComovingPsatdAlgorithm (#1879)Gravatar Luca Fedeli 2-3/+3
2021-04-07Regenerate parser with option "noinput" (#1880)Gravatar Luca Fedeli 4-495/+232
The only real change in this PR is the addition of `%option noinput` in `wp_parser.l` . This should prevent the compilation of an unused function, which caused `clang` to emit the warning message: ``` /home/luca/Projects/warpx_directory/WarpX/Source/Parser/wp_parser.lex.cpp:1558:16: warning: function 'yyinput' is not needed and will not be emitted [-Wunneeded-internal-declaration] static int yyinput (void) ``` To regenerate the parser I simply used `make` in the parser folder, with the following versions of the tools: `bison 3.7.5` and `flex 2.6.4`.
2021-04-06Allow expressions for my_constants (#1874)Gravatar David Grote 1-1/+13
* Allow expressions for my_constants * Update documentation for my_constants * Updates Langmuir input files with nice expressions * Used better example for my_constants * WarpXUtil: Add Includes Add includes for new STL classes used in this file. * Reset Benchmarks: Input Change * Docs: small rewording (no order implied) Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-04-05Parser: Bessel Function (J_n) (#1854)Gravatar Axel Huebl 4-104/+128
* Parser: Bessel Function (J_n) Add the Bessel Function of the First Kind (J_n) to the parser. * Parser: regenerate * Parser: No jn for DPC++ (yet) * Parser: no jnf for Apple At least on AppleClang and also seen in flang source-code, we just call the double variant of `jn` instead of using a specialized call to `jnf`. This might be less efficient than needed with Intel on Apple, but I don't have a system to test this on at the moment and this is thus a save bet for compile stability. Co-authored-by: Tools <warpx@lbl.gov>
2021-04-05Compile-time option to use `algo.load_balance_costs_update = gpuclock` (#1838)Gravatar Michael E Rowan 3-12/+31
* compile time option for gpuclock eol move directives eol spaces assert fix GPU clock: CMake option * GPUCLOCK: ON by default Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-04-05Fix No-MPI Build Warning (#1870)Gravatar Axel Huebl 1-1/+4
Fix unused variable warnings in no-MPI builds.
2021-04-01PSATD: use number of guard cells from input file in PMLs (#1451)Gravatar Neïl Zaim 1-13/+14
2021-04-01set default value for BTD buffer to 0 (#1862)Gravatar Revathi Jambunathan 1-0/+1
2021-04-01add buffer as input parameter (#1858)Gravatar Revathi Jambunathan 6-14/+36
max box size in virtual function define max box size add max box size as argument Update Source/Diagnostics/BTDiagnostics.cpp add buffer size to old BTD set max box size to buffer size only if it is small define buffer size and max box size correctly fix compilation error
2021-03-31paraview.pmd: write on close (#1860)Gravatar Axel Huebl 2-15/+29
Initially we wrote those on open. The problem was that writing this file depends on an existing directory structure, which is first created on earlierst on the first `flush()` and in case of extensive ADIOS buffering actually latest on `close()`. Since in backtransformed diagnostics (BTD) this flush happens very late. The directory did not exist and thus the creation of the helper file early on did fail (silently).
2021-03-31FlushFormatOpenPMD: Cleanup (#1861)Gravatar Axel Huebl 2-15/+14
2021-03-31Add Time-Averaged Fields To Raw Fields Output (#1859)Gravatar Edoardo Zoni 2-0/+26
2021-03-31Move KernelTimer to Parallelization (#1856)Gravatar Michael E Rowan 2-1/+1
2021-03-31fix bx used in amrexPArallelFor (#1855)Gravatar Revathi Jambunathan 2-12/+2
2021-03-30Remove the avg_aux fields (#1849)Gravatar Remi Lehe 16-87/+25
* Remove the avg_aux fields * Update 3D benchmark * Update benchmark in 2D * Initialize Bfield_avg_cp * Fix two whitespaces left out * Fix two more whitespaces left out Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-03-30we dont need warpx do_back_transformed_daig for field =1 (#1848)Gravatar Revathi Jambunathan 1-2/+0
2021-03-29openPMD: QED Attributes as scalars (#1777)Gravatar Axel Huebl 1-8/+8
Avoid writing QED particle attributes as scalars. Needs testing.
2021-03-29Regrid spectral solver during load balance (#1815)Gravatar Michael E Rowan 3-37/+210
* add PSATD support when remaking level * eol * update_with_rho * Update WarpXRegrid.cpp * Upate WarpXRegrid.cpp * Update WarpXRegrid.cpp * WIP * Cleanup * Remove * Add function to allocate spectral solver * EOL * spaces * Remove comment * Update documentation * eol * Remove function arguments * fix * Move lines into function * eol * amrex::Real * args
2021-03-29Add option for finite-order centering of currents (nodal to staggered) (#1763)Gravatar Edoardo Zoni 6-158/+407
* Start adding centering of current * Implement arbitrary order centering and split inputs * No need to define a brand new interpolation function * Update input file of hybrid CI tests * Clean up * Clean up more * Fix bug and clean up * Use current centering in two existing CI tests * Update documentation * Move Calls To UpdateCurrentNodalToStag Into SyncCurrent * Add Doxygen For New Function UpdateCurrentNodalToStag * Add Doxygen For New Functions Used For Stencil Coefficients * Finite-Order Centering of Currents Not Implemented With MR
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-23Disable charge deposition for photons (#1825)Gravatar Remi Lehe 1-0/+12
2021-03-22CMake: Print Version (#1820)Gravatar Axel Huebl 3-6/+6
Print the WarpX and PICSAR version to the terminal. Fetched from `git` as usual. Will use a proper tag-prefixed description as soon as we add tags in the git history.
2021-03-22Applied boost to single and multiple particle input (#1800)Gravatar David Grote 2-24/+43