aboutsummaryrefslogtreecommitdiff
path: root/Source (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-07-06fix unused variables (#2054)Gravatar Luca Fedeli 3-4/+3
2021-07-02Use queryWithParser for more real input values (#2042)Gravatar David Grote 2-2/+2
2021-07-01Filter Always ON by Default (#2031)Gravatar Edoardo Zoni 2-7/+32
* Filter Always ON by Default * Fix CI Tests * Update Docs * Fix CI Test dirichletbc * Default WarpX::use_filter = 0 with RZ FDTD, Add Warnings * Set WarpX::use_kspace_filter = true by Default, too * RZ: Fix Bug with PSATD Binary and FDTD Runtime Solver * Default use_kspace_filter = true, Fix Runtime Issue with Rho Functor
2021-07-01RZ spectral solver header to be called within PSATD ifdefs (#2044)Gravatar Revathi Jambunathan 3-11/+13
* RZ spectral solver header to be called within PSATD ifdefs * include spectralsolver.H if not RZ
2021-06-30Add OpenMP for FFTW (#2040)Gravatar Axel Huebl 2-1/+15
* 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-28Check verbose parameter before printing out step info (#2033)Gravatar Michael Kieburtz 1-6/+9
* Check verbose parameter before printing out step info * moved walltime outside of verbose check * renamed wall_time to evolve_time
2021-06-28Multi-J scheme (#1828)Gravatar Remi Lehe 18-221/+1118
* Introduce new option skip_deposition * Properly implement the option to skip deposition * Skip deposition for electrostatic solver * Correct typo * Add Index Enumerator and Equations for F/G Without Averaging * Define new functions for current deposition and charge deposition * Disable interpolation between levels * Correct compilation error in RZ mode * Add argument for relative time * Add Index Enumerator and Equations for F/G With Averaging * [skip ci] Add new OneStep function * Fix compilation errors * Correct more compilation errors * [skip ci] Fix compilation * Split the PSATD push into separate functions * Add guards for rho field * [skip ci] Use new functions in OneStep * [skip ci] Separate the inverse transform of E_avg, B_avg * Add deposition of rho * [skip ci] Prevent deposition of rho if unallocated * Fix error in deposition function * Add subcycling of current deposition * [skip ci] Add inverse transform of averaged fields * [skip ci] Move component of rho * Add function to copy J * Temporarily deactivate contribution from F * [skip ci] Implement call to linear in J * Add psatd time averaging for multiJ * [skip ci] Fix implementation of averaging * [skip ci] Implement divE cleaning * Fix Bug for RZ Builds * Fix Bug for RZ Builds * Fix Bug in Init of PML Spectral Solvers * Cleaning * Cleaning * Add div(B) Cleaning (G Equation) * Multi-J Not Implemented with Galilean PSATD or PMLs * Add 2D CI Test Using Multi-J Scheme * Add More Inline Comments * Add More Inline Comments & Doxygen * Add Doxygen for Constructor of SpectralSolver * More Doxygen in Class SpectralSolver * Add Doxygen for New Functions in WarpXPushFieldsEM.cpp * Add Doxygen for New Functions in WarpX/MultiParticleContainer * do_dive/b_cleaning Must Be True With linear_in_J Option * Cast multij_n_depose to Real in Divisions * New Input Syntax * Add const where Possible, Fix Warnings * Docs for New Input Syntax, Fix Abort Messages * Consistent Use of Idx, IdxAvg, IdxLin * Improve Documentation of psatd.J_linear_in_time * Use const Type Qualifier whenever Possible * Simplify Initialization of Pointer ion_lev * Improve Doxygen * Update documentation * Add Note on NCI to Docs * Make warpx.do_multi_J_n_depositions Not Optional * Simplify Logic in getRequiredNumberOfFields * Use More const Type Qualifiers Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2021-06-25Evolve: Avoid Resetting Walltime (#2032)Gravatar nruof 1-7/+7
* Moved walltime to WarpX.H so that it doesn't reset for each sim.step() call * Move Real walltime to static instance in WarpXEvolve.cpp and rename all instances of walltime to evolve_time
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 278-727/+3156
* 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-06-23DepositCurrent: Const Arguments (#2025)Gravatar Axel Huebl 4-46/+46
2021-06-21Laser: warnin antenna of a box; Allow zero amplitude (#1989)Gravatar Luca Fedeli 2-8/+19
* add check of laser antenna position * implement axel suggestions * disable laser if antenna is out the box * fix bug * Update Source/Particles/LaserParticleContainer.cpp * implement neil's solution * remove unnecessary include * fix initial status of m_enabled * adding back a check * add back check * add back check * removed unnecessary comment Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>
2021-06-21Add option to not dump first and last timestep (#1530)Gravatar Neïl Zaim 7-3/+22
* Add option to not dump first and last timestep * Add new function MultiDiagnostics::FilterComputePackFlushLastTimestep
2021-06-21Make FieldReduction more robust with respect to multiline parser inputs (#2008)Gravatar Neïl Zaim 1-0/+6
* Add multi-line example * Replace newlines and following whitespaces by single whitespaces * Update Source/Diagnostics/ReducedDiags/FieldReduction.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-06-17Avoid calling `AddPlasma` when using `AddPlasmaFlux` (#2014)Gravatar David Grote 1-1/+4
2021-06-16Silver-Mueller: Avoid Managed Memory (#2019)Gravatar Axel Huebl 3-24/+26
Avoid relying on managed memory usage in Silver-Mueller boundary conditions. Previously, we initialized the coefficients on the host, copied them to device and then accidentially used the device memory on the host again, as we calculated some constants. This now keeps the initial host-memory around so we can use it for host-only operations.
2021-06-16don't use RealVector in laser particle initialization. (#2018)Gravatar Andrew Myers 1-4/+4
2021-06-11Fix Offset: PushPX -> evolve_opt (#2011)Gravatar Axel Huebl 3-23/+23
* Fix Offset: PushPX -> evolve_opt Comparing to the `doParticlePush()` above, the `ux`/`uy`/`uz` SoA attributes seem to lack the particle offset in `PushPX`. Also simplifies the offset calculation to reside off-kernel, which saves 8 bytes cmem and some index indirection logic for the compiler. * RigidInjected Particle: Fix Offset Looks like this is missing here, too?
2021-06-09ion_map_ids: static & const access (#2010)Gravatar Axel Huebl 3-6/+9
This fixes the `ion_map_ids` atom-to-number object: - declare static, so the file can be included in multiple translation units - use `.at()`: - missing entries do not cause an insertion - missing entries will throw - access is `const`, so we can declare the whole object `static const` as well.
2021-06-09Add Total Particle & Field Momentum to Reduced Diagnostics (#1908)Gravatar Edoardo Zoni 9-83/+646
* Add Field Momentum To Reduced Diagnostics * Add Particle Momentum To Reduced Diagnostics * Cover Particle/Field Momentum in CI Test reduced_diags * Clean Up Implementation of Photons Case * Fix Bug in Field Momentum and Improve Analysis of CI Test * Fix 'includes' Following @ax3l's Suggestions * Interpolate On The Fly, Do Not Allocate Cell-Centered MultiFabs * Update/Improve Docs * Fix include, Remove Unused Variable * Write Total Momentum Divided by Sum of Weights, Test Output * Write Total Energy Divided by Sum of Weights, Test Output * Divide by Wtot Only if Not Zero * Use New Tuple-Level Reductions Available in AMReX * Use Tuple-level Reduction for Field Momentum
2021-06-08Fix kernel timer: use after free (#2006)Gravatar Axel Huebl 3-22/+67
* KernelTimer: Fix Cost Use-After-Free AMReX' ParallelFor is async, the free of the cost function occurs too early can can lead to use-after-free's from the kernel. * CMake: WarpX_GPUCLOCK on CUDA/HIP Make conditional on supported backends. * Add addition to global cost array As we abstracted this from the original research prototypes (https://doi.org/10.5281/zenodo.4708449) to merge this to mainline in 1406, we forgot to add the addition to `*costs` at this point. Measurements were done with the code linked in the zenodo archive. * Cleaning: Move m_cost assignment more in Not too important, but with a default nullptr now possible. * synchronize -> streamSynchronize Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov>
2021-06-07Call function ReadBCParams() during python execution (#1972)Gravatar roelof-groenewald 2-0/+7
* added ReadBCParams() function call to python execution and added a test of the electrostatic solver executing from python * added separate specification of particle boundary conditions in picmi setup and adjusted the inputs for existing tests to follow the new practice * updated input for rz PICMI test and renamed the electrostatic test to follow standard practice * added arguments for particle boundary conditions to Langmuir RZ test * added dictionary to picmi.py to map from picmistandard field boundary condition specifications to that of WarpX * fixes for failing unit tests; added key, pair 'none' to picmi dictionary of field BCs * also using 'none' for upper boundary condition for RZ test Python_Langmuir_rz_multimode
2021-06-07Added injection of a thermal flux from a plane (#1892)Gravatar David Grote 11-3/+623
* Added injection of a thermal flux from the domain surface * Major fixes to NFluxPerCell injection * Small fixes and clean up * Fixed 'if WARPX_DIMS_RZ' to use ifdef * Small fix to flux_normal_axis error message * Fix typo Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-06-07add m_u (#2003)Gravatar Luca Fedeli 2-0/+4
2021-06-04Disable Separable Compilation (GPU) (#1999)Gravatar Axel Huebl 1-0/+3
* Disable Separable Compilation (GPU) Disable relocatable device code (RDC) aka "separable compilation". We do not need it unless we use in situ vis. This addresses issues with CUDA 11.3.0 on Perlmutter, reduces build complexity and can potentially create more efficient code. * Update AMReX Update to eb2fb8eb11d4df88d5b6c04a68f2971a6c3b97f0, so we include https://github.com/AMReX-Codes/amrex/pull/2083
2021-06-03Spectral: Missing Include (#2001)Gravatar Axel Huebl 1-0/+2
Fix a build error with the latest AMReX version due to a missing include.
2021-06-03remove superfluous semicolon (#2000)Gravatar Luca Fedeli 1-1/+1
2021-06-02 CMake 3.20+ and CUDA: Modernized AMReX (#1998)Gravatar Axel Huebl 1-0/+1
* CMake 3.20+ and CUDA: Modernized AMReX Use modernized AMReX logic for CUDA builds with CMake 3.20+ as supported by the latest AMReX updates. * Resampling Trigger: Missing Include AMReX update triggered missing include: ``` Source/Particles/Resampling/ResamplingTrigger.H(42): error: namespace "amrex" has no member "Real" ``` * Update AMReX Update AMReX to f7fd082bc8ab099d42784f69d6fe49dea3d388a7
2021-06-01openPMD: Expose ADIOS2 Operators (Compressors) (#1983)Gravatar Axel Huebl 3-7/+90
* openPMD: Expose ADIOS2 Operators (Compressors) Expose ADIOS2 Operators (at the moment: one operator max) in WarpX inputs. This allows the user to select ZFP or Blosc compression without changing the input file. We can later on define short-hand notions for this. For now we give the parameters control out for the expert user and document good examples. * Rename: adios2_operator (openPMD) In that scheme, this only works with ADIOS2 atm.
2021-06-01[mini-PR] improve error message in case of wrong type of a reduced diag (#1986)Gravatar Luca Fedeli 1-1/+1
* improve error msg * eliminate final dot
2021-06-01CoarsenIO: Replace Copy with ParallelCopy (#1992)Gravatar Axel Huebl 1-1/+1
Fix a warning from AMReX by migrating to the newer, recommended interface.
2021-06-01Use Python Indexing in Reduced Diags Headers (#1990)Gravatar Edoardo Zoni 13-208/+124
* Use Python Indexing in Reduced Diags Headers * Use Automatic Counter For Column Numbers
2021-05-28Added new option <diag>.openpmd_encoding (#1979)Gravatar guj 3-18/+77
* Added new option <diag>.openpmd_encoding, which can be either file/group/variable With the encoding being group/variable, there will be one file generated for all iterations. * fixed tab * fixed style * backward compatibility for openpmd-api versions < 0.14 * eol * Update Docs/source/usage/parameters.rst Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * used inline instead of lamba, encoding decision is moved up at FlushFormatOpenPMD * making file based the default so scripts can work as is * Update Docs/source/usage/parameters.rst Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Unify defaults of variables Co-authored-by: Junmin Gu <junmin@login1.summit.olcf.ornl.gov> Co-authored-by: Junmin Gu <junmin@login3.summit.olcf.ornl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-05-27replaced query with get for a parameter which should be always explicit (#1985)Gravatar Luca Fedeli 1-1/+1
2021-05-27Removed the call to zero out phi data before electrostatic (labframe) field ↵Gravatar roelof-groenewald 2-2/+1
solve, so that the potential of the previous step is used as a starting guess for the solution of the Poisson equation. (#1968)
2021-05-26Parser: Fix Operator Issues; Field Energy: Cleanups (#1987)Gravatar Edoardo Zoni 2-13/+5
* Follow up on PR #1944 * Fix Bug, Use Better Parser Syntax
2021-05-24using amrex::Math::abs (#1982)Gravatar Revathi Jambunathan 1-1/+2
2021-05-24Add generic field reduction reduced diag (#1944)Gravatar Neïl Zaim 20-74/+439
* Add generic field reduction reduced diag * Make ComputeFieldReduction public * Apply suggestions from code review * Apply suggestions from Luca and Edoardo * Fix syntax error * Fix typo in example input file Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it>
2021-05-24EB initialization with Parser (#1980)Gravatar Weiqun Zhang 2-5/+53
If `warpx.eb_implicit_function = ...` is present in input parameters, Parser will be used to initialize EB. For example, ``` warpx.eb_implicit_function = "max(max(max(x-0.5,-0.5-x), max(y-0.5,-0.5-y)), max(z-0.5,-0.5-z))" ``` specifies a box with boundaries at x=+-0.5, y=+-0.5 and z=+-0.5 and regular domain inside the box. ``` warpx.eb_implicit_function = "-(x**2+y**2+z**2-0.2**2)" ``` specifies a solid sphere at (0,0,0) with a radius of 0.2.
2021-05-24Call FillBoundary before momentum half-push at last timestep (#1954)Gravatar Neïl Zaim 1-0/+7
* Call FillBoundary before momentum half-push at last timestep * Call FillBoundary before momentum half-push at last timestep * Update benchmarks * Update benchmarks again
2021-05-24Add ComputeMaxStep() function in WarpXInitData (#1712)Gravatar Neïl Zaim 3-52/+75
* Add ComputeMaxStep() function in WarpXInitData * Avoid overflow in the static_cast * Change overflow handling and update stop_time constistently with max_step
2021-05-21Boundary Condition : PEC (#1767)Gravatar Revathi Jambunathan 11-8/+542
* Read boundary and set periodicity, enumerate BC types, added support for periodic * separate particle and field boudnary structs * PEC Etangential Bnormal and setting default pml=0 * eol * add PEC and FieldBoundary routines * eol * remove duplicate struct * update guard cells for PEC * host device functions * remove duplicate function * fix compilation error by adding ; * temporary logic to set PEC boundary * eol * add documentation for PEC and abort if PEC is used for RZ * documentation for PEC functions * remove print statements * Adding field CI test for PEC for 3D with and without MR * fix eol * Apply suggestions from code review * Update Docs/source/usage/parameters.rst * Update Source/BoundaryConditions/WarpX_PEC.cpp * particle PEC CI test * rename analysis scripts for PEC * use iside == 0 as condition * ParallelFor over guard cells. Set field values on boundary and guard in the kernel * ijk_guard not needed anymore * remove unnecessary nbody generated by yt * pi and clight are built-in * cleanup * eol * fix bug in computing ig and ijk_valid * bug fix in guard-cell update in PEC changes benchmark for particles * fix bug in the ig compute * reset particle PEC benchmark * fix logic to set PEC with current interface * adding a none type for RZ * reset benchmarks for 2dLaserInjection, 2dgalilean_hybrid and 2dcomoving CI tests due to differences in PEC reflection * ensure noz shape factor is used for RZ and k=0 for RZ * fix XZ/RZ logic for Ey,Etheta,By,Btheta. Add ncomponent for RZ, generically. * fix the field update for corner cases and mixed boundaries. rename ijk_valid to ijk_mirror since ijk_mirror need not be in valid region * set GuardCell and Boundary cell flags * fix compilation bug * suppress unused variable warning * eol whitespace * fix doc * Apply suggestions from code review Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> * RZ abort message * reset benchmark after fixing guard-cell updates * fix typo * RZ doc * Update Source/Utils/WarpXUtil.cpp * Update Examples/Tests/PEC/inputs_particle_PEC_3d * changes suggested from code-review * set Enormal and Btangential in guard cell across PEC boundary * add more info about guard cell update in the docs * fix typo * ijk mirror only if ig>0 * update benchmarks * ignore unused k * temporarily revert guardcell damping for Cartesian * fix typo * dont set Etangential and Bnormal to zero if field is not nodal on boundary * set bindary int as boolean * fix high to hi * set default nox to 1 * particle shape for PEC test * update benchmarks for 2D comoving and galilean * reset benchmark for RZ test-cases * Add in benchmarks generated by @EZoni * Changing transverse boundaries to periodic for psatd galilean cases * resetting benchmark for comoving_hybrid_2d and galilean_hybrid_2d * at-least one guard cell must be filled for PEC * abort if PEC is used for PSATD * use new boundary interface to set none for rmin and rmax, since pec does not work for psatd * Update Source/WarpX.cpp * add doc mentioning PEC does not work for PSATD * missing semicolon * Update Source/BoundaryConditions/WarpX_PEC.H Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/BoundaryConditions/WarpX_PEC.H * lengthy comment for normal and tangential components at domain boundaries * eol fix * grammar * field_hi * reset benchmarks Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-05-21openPMD: Fix Weighting Attributes (#1975)Gravatar Axel Huebl 1-5/+8
The weighting attributes of the particle "weighting" record are fixed by the standard. This fixes their values.
2021-05-20New Parser capability: `if` (#1976)Gravatar Weiqun Zhang 8-213/+375
* New Parser capability: `if` Add a new Parser capability, `if`. It takes three arguments and returns the value of either the second or the third argumen depending on the first argument. For example if(abs(x) < 10, exp(-x), 0) returns exp(-x) if abs(x) < 10, otherwise 0. Note that in case the condition (i.e., the first arguemnt) is false, the second argument is not evaluated. * Fix a minor bug in computing the depth of ast
2021-05-20openPMD: Support for mesh refinement (#1842)Gravatar guj 3-99/+163
* Added support for mesh refinement * openPMD MR: Cleanup * Fix BTD Move un-related streaming API changes out of this PR. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-05-19Set guard cells for allocation using field solver stencil and particle shape ↵Gravatar Revathi Jambunathan 5-10/+68
factor (#1969)
2021-05-19replace copy with FabArray::ParallelCopy() (#1970)Gravatar Revathi Jambunathan 2-3/+3
2021-05-17MultiReduceDiags.cpp : use a map to replace a long list of "if else" to ↵Gravatar Luca Fedeli 1-69/+32
choose a reduced diag (#1946) * replace a long list of if else with a map * fixed bug * enforce const correctness * add missing includes * Update Source/Diagnostics/ReducedDiags/MultiReducedDiags.cpp Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>
2021-05-17`algo.particle_shape` Required Only with Particles or Lasers (#1962)Gravatar Revathi Jambunathan 1-19/+31
2021-05-13CUDA: Quiet numerous warnings about unused-variable-warning suppressions ↵Gravatar Phil Miller 2-5/+4
being unreachable statements (#1957)
2021-05-13Implemented query and getArrWithParser (#1936)Gravatar David Grote 11-37/+114
* Implemented query and getArrWithParser * Updated parameters.rst regarding expressions for multiple floats