Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12: Refactor out Distutils #4392

Merged

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Oct 27, 2023

@ax3l ax3l changed the title [Draft] Python 3.12: Refactor out Distutils Python 3.12: Refactor out Distutils Oct 27, 2023
@ax3l ax3l marked this pull request as ready for review October 27, 2023 16:10
@ax3l ax3l requested review from dpgrote and RemiLehe October 27, 2023 16:18
@ax3l ax3l force-pushed the install-setuptools-py3.12-nodistutils branch from 3af6c3b to 1e3522b Compare October 27, 2023 17:29
setup.py Fixed Show resolved Hide resolved
@ax3l ax3l force-pushed the install-setuptools-py3.12-nodistutils branch from 1e3522b to befc78c Compare October 27, 2023 17:39
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
python-version: '3.x'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unconstrain the upper Python version that gets installed. I constrained it in ed13486 to unbreak CI by avoiding Python 3.12 for a few days.

I want it unconstrained again, so I see if there are breaking changes once new Python versions are released.

Ref.: https://github.com/actions/setup-python#setup-python

@ax3l ax3l force-pushed the install-setuptools-py3.12-nodistutils branch from de3307a to 2f92f83 Compare October 30, 2023 22:19
@ax3l ax3l force-pushed the install-setuptools-py3.12-nodistutils branch from 2f92f83 to 03fe4f6 Compare October 30, 2023 22:20
Copy link
Member

@roelof-groenewald roelof-groenewald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just one minor comment.

Tools/machines/lassen-llnl/install_v100_ml.sh Outdated Show resolved Hide resolved
@ax3l ax3l merged commit 5b4dfdc into ECP-WarpX:development Nov 3, 2023
24 of 33 checks passed
@ax3l ax3l deleted the install-setuptools-py3.12-nodistutils branch November 3, 2023 02:17
dbizzoze pushed a commit to dbizzoze/WarpX that referenced this pull request Jan 5, 2024
Document & automate how to install `cupy` on Perlmutter.

Revert PR4266 - lower and uppers bounds (#4294)

The lower and upper bounds are already present within PICMI.

Add flag to set GPU-aware MPI from PICMI (#4298)

Clang tidy CI test: add misc-definitions-in-headers check (#4253)

* Clang-tidy: add misc-definitions-in-headers check

* address issues found with clang-tidy

* remove std::cout added for debug purposes

* add back newline

Created "solenoid" lattice element

Adjusted ifdef line

Added solenoid components to .cpp file

Conda: `make` (#4292)

Useful on very fresh Ubuntu/WSL/Docker environments where
not even `built-essential` was installed. Also available
on all operating systems now, so no downside to list:
  https://anaconda.org/conda-forge/make/

Doc: Conda CUDA Development (#4290)

Document how to install the CUDA Toolkit with Conda for development.

AMReX: Weekly Update (#4309)

Prevent NaNs in Coulomb collision module (#4304)

* Prevent NaNs in collisions between particles

* Avoid another division by 0
 t# Please enter the commit message for your changes. Lines starting

Fix check of PML + Silver-Mueller compatibility (#4297)

* fix check of PML + Silver Mueller compatibility

* complete check

* refactoring

* fix logic bug

Lassen (LLNL): Sources & Builds Off-Home (#4311)

Moving the source directories and build instructions for WarpX
itself from `$HOME` to the per-user NFS directory
`/usr/workspace/${USER}/lassen/src`, which has a larger default
quota.

Implement Galilean PML (#733)

* Implement Galilean PML

* Activate the PML

* Add automated test

* Fix compilation error

* Fix more compilation errors

* Fix more compilation error

* Fix more compilation bugs

* Fix more compilation bugs

* Clean up code, debug CI

* Fix CI

* Use both collocated and staggered k vectors

* Reset CI benchmark

* Update test

* Add Doxygen, clean up methods signature

* Improve abort messages

* Implement correct analytical equations

* Remove class PsatdAlgorithmGalileanPml

* Add Doxygen strings for class `PsatdAlgorithmPml`

* Update clang tidy

---------

Co-authored-by: Edoardo Zoni <[email protected]>

Clang tidy CI test: add almost all misc-* checks (#4268)

Use cupy when available with the particle container wrapper (#4203)

* Use cupy when available

* cupy helper & copy-to-host helper

* cupy helper & copy-to-host helper

* Fix get_species_charge_sum (revert)

* Import Updates

* Pass copy_to_host through the particle gather routines

* Add documentation for the Python particle gather routines

* Fix fetch of particle theta, passing copy_to_host, and use numpy when copy to host

* Avoid cupy for copy_to_host

- explicit copy in AMReX possible
- this way, we can support AoS data copies

* Add cupy struct reference

---------

Co-authored-by: Axel Huebl <[email protected]>

 fix distribution map initialization for particle buffers in BTD (#4318)

Doc: Perlmutter (NERSC) E4S 23.05 Boost & CCache (#4302)

Update the Boost and CCache modules to use the latest
E4S (23.05) GCC/11.2.0 stack on Perlmutter.

Add `get_charge_density` to python `WarpXParticleContainer`  (#4300)

* added `get_charge_density` to pybind `WarpXParticleContainer` and exposed useful fields.py functionality directly for a mf

* reduce code duplication in `_WarpXMultiFABWrapper`; changed arguments to strings from f-strings

* add `mf_name` argument option to `_MultiFABWrapper` instead of creating a child class

* add back deleted docstring

AMReX: Weekly Update (#4322)

Particle fields diagnostic support for PICMI (#4262)

* added particle field interface in picmi FieldDiagnostic

* added documentation to doc string.

* undo line deletion

* catch unexpected keywords

* simplified logic

* fixed bug and removed unnecessary error check

* passing in particle field diagnostic information using a class defined in picmi rather than a dictionary

* Added ParticleFieldDiagnostic class to be used in FieldDiagnostics

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* error checking on repeat name required if not using a dictionary

* fixed docstring, changed var name to be more explicit, removed error check by using default list, bug fixes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Add particle sorting parameters to pywarpx (#4323)

Added parameters:
- warpx.sort_intervals
- warpx.sort_particles_for_deposition
- warpx.sort_idx_type
- warpx.sort_bin_size

Glossary: CEX, SEE (#4325)

* Glossary: CEX, SEE

Add new terms to our glossary for charge-exchange collisions
and secondary electron emission.

* plural collisions

Co-authored-by: Revathi  Jambunathan <[email protected]>

---------

Co-authored-by: Revathi  Jambunathan <[email protected]>

Add fluids in WarpX (#3991)

* Added: new fluid-langmuir test

* Implemented MultiFluidContainer

* Implement WarpXFluidContainter

* Fix compilation errors

* Call AllocData in WarpX.cpp

* Fix allocation of fluid MultiFabs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix example

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix compilation error for Evolve

* Cleanup include statements

* Fix compilation in 2D

* Add fluid initialization

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fill guard cells

* Make the code work for any dimension

* Fix compilation error

* Add call to fluids' evolve/deposition

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added fluid contribution to the current deposition

* Fix calls to `FillBoundary`

* Fixed calculation of J to properly handle nodal versus CC values

* Used different boxes for jx jy jz

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed intial index

* Minor Indentation Fixes

* Split `DepositCurrent` into 2 separate MFIter loops

* Additional comments and cleanup

* Prevent double counting of J at the boundaries

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Prepare gather and push

* Filled out GatherAndPush function for fluids; currently not working

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed bug with fluid source

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Corrected speed of light factor in the momentum

* Added analysis script for 3d langmuir fluid test

* Fixed typo

* Added docstrings, cleanedup files

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added in MUSCL-Handcock Fluid Advection Evolution, currently nan's due to issue in the x-plane update

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleaup WarpXFluidContainer.h

* Currected flux jacobian to SI units and added fillboundary commands

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Bug Fix: incorrect velocity being used

* Added Fluid Rho Deposition

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add separate .H file for helper functions

* Extended the langmuir fluid test case to examine J and rho aswell

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Allocate multi-component arrays

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update Regression/WarpX-tests.ini

Co-authored-by: Remi Lehe <[email protected]>

* Update Source/Fluids/MultiFluidContainer.cpp

Co-authored-by: Remi Lehe <[email protected]>

* Update Source/Fluids/MultiFluidContainer.H

Co-authored-by: Remi Lehe <[email protected]>

* Update Source/Fluids/MultiFluidContainer.H

Co-authored-by: Remi Lehe <[email protected]>

* Update Source/Fluids/MultiFluidContainer_fwd.H

Co-authored-by: Remi Lehe <[email protected]>

* Update Source/Fluids/WarpXFluidContainer.cpp

Co-authored-by: Remi Lehe <[email protected]>

* Update Source/Fluids/WarpXFluidContainer_fwd.H

Co-authored-by: Remi Lehe <[email protected]>

* Simplify calculation in MUSCL-Handcock, Undo removing DTtype inlcude

* Changed Q_midpoint staggering to be correctly placed

* Updated the checksum test with a new json file

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Updated functions which changed due to pull from main

* Updated the fluid test to have the proper J time centering

* Rewrote MusclHandcock to avoid MPI comms and temp variable creation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add instrument fluid code with profiling annotations

* Reverted to faster Musclhandcock with comms

* Eliminate unnessessary communications in MUSCL Handcock scheme

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Some variable name cleanup, optimizing A(muscl)-array calc

* Removed unused variables, hopefully fixed Azure pipeline for the Langmuir_fluid_multi

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Bugfixes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Bugfixes

* Bugfixes for 3D langmuir fluid test on azure

* Added 2D (XZ) fluids

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added 1D (z) to fluids

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added RZ to fluids

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Uses correct velocities in the fluxes

* Fixed bug for selecting the coordinates with V_calc() in fluids

* Formatting

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed json after bugfix

* Fixed 1D json from azure pipeline data

* Bugfix: Correctly limits domains for RZ fluids(), still a bug in RZ implementation for Jz(r=0, t=0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Bugfix: fixed small error in fluid-RZ SA/Volume at the outermost cell

* Attempted patch for RZ

* Minor Cleanup

* Bugfix: Fixed volume element selection

* Added: RZ centrifugal force term

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Ad-hoc fix to RZ, and print diangostics

* Moved ad-hoc fix onto the temp variables, corrected mangitude

* Bug fix: RZ volume applied at the wrong place, removed ad-hoc fix

* Removed last of the ad-hoc code

* Fixed for new plasmainjector

* Minor Cleanup

* FIX: Corrected CI crash for Langmuir_fluid_Xd tests by passing geom to WarpXFluidContainer

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added RZ checksum, removed commented code

* Bugfix for RZ, at the origin, also changed rho output to be called simular to current density

* Updated RZ checksum

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Bugfix/improvement: RZ test now correctly outputs and tests rho, J in addition to the electric field

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Appleclang compiler config, shows warnings when compiling with appleclang

* Updated fluid-1d test to also check for rho, Jz

* Updated fluid-2d test to also check for rho, Jz

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Updated Checksum with Azure Pipeline data

* clang-tidy cleanup

* Cleanup

* Cleanup Flux-Jacobian Calculation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add moving window code for fluids

* Fixed issues introduced by changing InitData() signerature

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Simplified Communications in WarpXFluidContainer

* Minor cleanup of unused variables

* Minor bug fis in Moving window, Added: non-periodic copy-BC to fluids

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Minor cosmetic changes

* Fix compilation issue with single-precision particles

* Template Higuera-Cary pusher on the type of variables

* Use simple function to convert to nodal box

* Simplify injection of plasma

* Positivity and monotonicity preserving limiter added

* Changed the default average routine to minmod, which is more diffusive but still second order TVD, this significantly reduced numerical oscillations for a0 ~ 15 1D fluid WFA sims

* Added alternative options to take averages for MUSCL-Handcock

* Added a working fluid-envelope model

* Added boosted frame capabilities for the fluid

* Minor Cleanup

* Minor Cleanup on 1D positivity limiter

* Major cleanup for 2D, RZ, and 3D MUSCL positivity limiters

* Fixes to the boosted frame simulation

* Lorentz Transform the envelope field

* Minor fix for envelope lorentz transform

* Protection against N = 0

* Minor bug fixes for zero density check

* Bugfix: Improper check of N = 0, updated

* Bugfix: Fixed Lorentz transforms in the fluids-InitData()

* Bugfix: Small values of N were causing gamma to have unphysical values; added a check

* Mergewq

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Improvment: calc of gamma, added additional slope-limiting utilities

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Change MUSCL scheme to a primative varibale model

* Fixed RZ for primative variable sources

* Updated tests to match primative vars

* Small Bugfix

* Added a 1D WFA physical_app + test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Minor fixes to pass CI

* Add include statement for fluid

* Use temporary variable gamma_boost in device functions

* Add missing .H file for Python compilations

* Moved WarpX::beta_boost out of device functions

* CI Fixes

* More CI fixes for device-host issues

* Cleanup of some var names

* Minor Cleanup

* Removed unessesary autos

* Fluid Theory Docs

* Checks that there is only the m = 0 azimuthal mode, removed TODOs and declared RZ bound default behavior

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed indentation

* Fixed Warning about azimuthal modes

* Added documentation for fluid input parameters

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed per Remi's partial review, adds checks for do_not_push/gather

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed bug in matrix(J), updated all fluid tests accordingly

* RZ iff for centrigual forces

* Changed variable names

* Updated the 1d_laser_acc case to include the full laser model in the theory.

* Changed names of c_{x,y,z} to dt/d{x,y,z}

* Code cleanup, mostly of comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Large change: Rewrote MUSCLadvection() to simplify readability

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Minor change to positivity limiter function implentation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleanup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleanup flux and velocity functions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleanup for inputs to ave by definind diff functions, fixed RZ boundary problem at r-max

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleanup of the flux functions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Removed some unused util functions

* Simplified linear slope calc function

* Reworded docs to not inlcude contact info

* New CI test for boosted WFA with fluids

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added current and charge deposition for Hybrid-Ohm and electrostatic solvers

* Fixed docs, removed extra .get() on rho/J

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Declare myfl as private

* Add flag do_fluid_species

* New function to extract species properties

* Update injection_style use

* Remove PlasmaInjector in WarpXFluidContainer

* Remove number of particle per cell from inputs scripts

* Add missing files

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix GPU error

* Update call to extract particle charge and mass

* Update tests

* Clean up code

* Avoid life-time issues with parsers

* Avoid additional life-time issues

* Added string that we don't support mesh refinement

* Fixed Clangtidy issue, added warning that fluids only work with one mesh refinement level

* Minor cleanup

* Fixed build issue

---------

Co-authored-by: Remi Lehe <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Edoardo Zoni <[email protected]>

RZ m=0 mode support for particle field diagnostics  (#4291)

* added particle field functionality for RZ modes for openPMD format

* removed print statements and fixed field naming to work with openpmd

* remove debug statement

* documentation and replaced assert with warning

* forgot semicolon

Fix clang-tidy error [readability-simplify-boolean-expr] (#4328)

Clean-up docs for PR3991, fluids (#4330)

Bump up HDF5 version on PM to 1.12.2.7 (#4333)

The previous version cray-hdf5-parallel/1.12.2.1 was not recognized anymore.
At this moment, 1.12.2.3 and 1.12.2.7 are installed as modules on Perlmutter.

Edited Solenoid backend amrex handles

Designed SolRF calculation

updated comments

Merge nodal synchronization with `FillBoundary` calls in PML (#3534)

* Add nodal synchronization option to PML functions

* Add missing #include directive

* Remove calls to `NodalSyncPML`

* Same changes for PML classes in RZ geometry

* Remove unused functions

* Update checksums of `divb_cleaning_3d`

Add SymPy notebook to derive PSATD equations in PML (#4316)

CI: Unbreak macOS (libomp) (#4341)

Something changed in the base image again.

Close #4331 segfault when activating nuclearfusion collisions (#4338)

* Raise proper error message when specifying product species

* Fix case where 0 particles should be created

* Clang-Tidy: Disable `modernize-return-braced-init-list`

Buggy transform for non-init-list constructors.

---------

Co-authored-by: Axel Huebl <[email protected]>

Momentum-conserving gather for MR ratio higher than 2 (#1650)

* Momentum-Conserving Interpolation for Arbitrary Mesh Refinement

* Implement 1D Case, Cleaning

* Add Zero Padding

* Add Langmuir Test (FDTD)

* Fix CI test

* Abort when using PSATD + MR + momentum-conserving

* Apply suggestions from code review

* Improve docstring

Badge: Minor RTD Link Cleanup

ensure that mass is specified (#4337)

Release 23.10 (#4344)

* AMReX: 23.10

* pyAMReX: 23.10

* WarpX: 23.10

Add new PRL paper using WarpX (#4351)

* Add new PRL paper using WarpX

* Update PRAB citation

[pre-commit.ci] pre-commit autoupdate (#4352)

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Lassen (LLNL): TOSS3 Setup (#4346)

* Lassen (LLNL): TOSS3 Setup

Add a TOSS3 section again.

* Fix SciPy and Finalize Python Env

Fixed some missing semicolons and consts

Solenoid: Fix Compile Errors

Fix issues with cupy-WarpX interoperability (#4348)

* Fix issues with cupy-WarpX interoperability

* Update cupy binding

Adjusted some more const declarations

Added some comments to code Lines

Change default behavior of picmi.FieldDiagnostic and picmi.ParticleDiagnostic & fix CI tests (#4317)

* Do not write particles with `FieldDiagnostic`

Do not write fields with `ParticleDiagnostic

Update implementation

Revert "Update implementation"

This reverts commit 77b473f4afbfe2414bbe5d1a8b4e65ec475a7bd7.

Use syntax with argvattrs

Correct typo

Force writing of species

Add function that can replace existing attributes

Revert "Revert "Update implementation""

This reverts commit d946fe643b085cfec4ae90673f1105c8098ab748.

Correct syntax typo

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Revert "Revert "Revert "Update implementation"""

This reverts commit 69092be1e46da655075f5292931fa4ffe6d86d7c.

Generalization for backtransformed diagnostics

Update lab-frame diagnostics

Update 1D CI case

Fix additional merge errors

Remove particle diagnostic

Add particle diagnostic where needed

Use latest PICMI version

Handle the case when species is None

Add missing `add_diagnostic` calls

* Update 1D ion beam case

Fixed CI: plasma_lens

Fixed CI: LoadExternalField

Fixed CI: Python_reduced_diags_loadbalancecosts_timers

Clean up

* Fixed CI: Python_ionization, Ohm Solver

* Clean up: removed jx, jy, jz

* More fixes in Ohm solver's CIs

* Placed species in squire brackets

* Wrtie FieldDiagnostics in CI: Python_prev_positions

* Do not specify datalist in test

---------

Co-authored-by: Remi Lehe <[email protected]>

Added extended writeup to the  docs for PR3991, fluids (#4365)

Electrostatic Diagnostics for `j`: Default to Direct Deposition (#4362)

* Change Default: Direct Current Deposition for ES

Used as a diagnostics for `j`.

* Reset j in Benchmarks

Esirkepov -> Direct Deposition

Python: Clean Out Old Bindings (#4233)

* libwarpx: clean out old bindings

* Docs: Update Wrappers

* Update Tests: `getistep`, `set_potential_on_eb`, `deposit_charge_density`

* getistep: lev argument

* Apply suggestions from code review

Co-authored-by: Roelof Groenewald <[email protected]>

* Fix capacitive_discharge & ohm_solver_ion_beam_instability

* Update `ParticleContainerWrapper` to `ParticleBoundaryBufferWrapper` in docs

---------

Co-authored-by: Roelof Groenewald <[email protected]>

Restore `get_particle_boundary_buffer_structs` functionality from before pyamrex transition (#4367)

Fix bug in clang-tidy configuration file  (#4321)

* fix issue in clang-tidy

* address most of the issues found with clang-tidy

* address issues found with clang-tidy

* address issues found with clang-tidy

* address issues found with clang-tidy

* fix issues found with clang-tidy

* fix issues found with clang-tidy

* refactor variable name

* fix residual issues found with clang-tidy

* revert jn -> cyl_bessel change

* cleaning

* fix bug

* fix issues found by clang-tidy in new code

* address issues found by clang-tidy in new code

* fixed issues

* address residual issues found with clang-tidy

Fix: CMake `Python_EXECUTABLE` (#4379)

Replace the hard-coded `python3` with the found/set Python
executable of the current build environment.

Reorder WarpX.H so that public, protected, and private only appear once (#4340)

* Reorder WarpX.H so that public, protected, and private only appear once

Co-authored-by: Axel Huebl <[email protected]>

CMake: `pip_install_nodeps` Target (#4361)

Add a target that does not search of check any dependencies with pip.
Useful in package managers.

[pre-commit.ci] pre-commit autoupdate (#4378)

updates:
- [github.com/hadialqattan/pycln: v2.2.2 → v2.3.0](https://github.com/hadialqattan/pycln/compare/v2.2.2...v2.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Fix: Fails in Python Callbacks Abort (#4380)

* Fix: Fails in Python Callbacks Abort

Make sure that errors in Python callbacks abort the simulation.
Before, MPI-parallel simulations would hang.

* Include <cstdlib>

* Include <iostream>

AMReX/PICSAR: Weekly Update (#4363)

* AMReX: Weekly Update

* AMReX: Weekly Update

Add RZ support for Ohm's law solver (#4161)

* add RZ support for `FiniteDifferenceSolver::CalculateCurrentAmpere`

* add RZ support in `HybridPICSolveECylindrical`

* allow an initial Bz field to be set in RZ

* apply PEC boundary to r_max boundary in RZ

* WIP normal modes example / CI test

* fix typo in Cartesian EM modes example

* code cleanup and addition of CI test

* some progress on CI test

* fix compile issue when `USE_EB=True`; update CI test and analysis script

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix CI test and update docs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* reset benchmark values for failing tests

* update reference amplitude values based on previous values from Azure

* reset hybrid-PIC RZ checksum values - not sure why this is needed

* add `-DWarpX_PYTHON=ON` cmake option to hybrid-PIC RZ test configuration

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* apply changes requested during code review

* fix clang-tidy narrowing conversion warnings

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Python: Rename Callback Files (#4381)

Renamed after thinning out everything else.

Added solenoidRF

add instructions for leonardo hpc (#4353)

* add instructions for leonardo hpc

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix wrong name for build directory in leonardo.rst

* Update Tools/machines/leonardo-cineca/install_gpu_dependencies.sh

add copyright and license notice

Co-authored-by: Luca Fedeli <[email protected]>

* fix formatting in Docs/source/install/hpc/leonardo.rst

add space

Co-authored-by: Axel Huebl <[email protected]>

* Fix formatting in Docs/source/install/hpc/leonardo.rst

Add equals

Co-authored-by: Axel Huebl <[email protected]>

* Fix formatting in Docs/source/install/hpc/leonardo.rst

change quotation marks

Co-authored-by: Axel Huebl <[email protected]>

* Fix formatting in Docs/source/install/hpc/leonardo.rst

Co-authored-by: Axel Huebl <[email protected]>

* add separate instructions to install WarpX as a Python module

Co-authored-by: Axel Huebl <[email protected]>

* add cleaning of both standard and python builds

Co-authored-by: Axel Huebl <[email protected]>

* removed source of profile file in job.sh

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Luca Fedeli <[email protected]>
Co-authored-by: Axel Huebl <[email protected]>

GetAndSetPosition: General Particle PIdx (#4386)

* GetAndSetPosition: General Particle PIdx

Generalize the `SetParticlePosition` & `GetParticlePosition` classes
to work with arbitrary particle index enumerators. That way, we can
reuse them between different particle containers.

* FieldProbe: Remove Hack

* GetAndSetPosition: Usage w/ Template

Updated comments and added Solenoid.H code

AMReX: Weekly Update (#4387)

Fixed some typos and removed unused variables

Removed extra unused variables

Fixed another typo

Lassen (LLNL): `h5py` (#4388)

* Lassen (LLNL): `h5py`

Install `h5py` on Lassen using our pre-compiled HDF5 package.

* All Machines: Ensure Setuptools in Venv

Machines: HDF5 & ADIOS2 Tools in PATH (#4389)

Ensure tools such as `bpls`, `bpdump` and `h5ls` are available to
users if we self-compile them.

Clang tidy CI test: add some cppcoreguidelines-* checks (#4149)

* clang-tidy CI test: add some cppcoreguidelines-* checks. Initial work

* addressing issues found with clang-tidy

* continue addressing issues found with clang-tidy

* fix bug

* fixed issue

* address issues found with clang-tidy

* addressing issues found with clang-tidy

* fix initialization order

* fix initialization order

Fix External AMReX Builds (#4390)

- print version
- make AMReX external if pyAMReX is external
- new AMReX 23.11+ installed CMake module paths for CMake scripts
- `TINYP` is not really required for external packages and thus
  should not fail if configured not to be used

Added Solenoid and SolenoidRF to makelist

CI: setup-python < 3.12

Requires #2821

Doc: Python Backtrace in CXX Segfaults (#4391)

Document the workflow to find out which last Python line was called if the
code crashes in the CXX part for PICMI runs.

AMReX/pyAMReX/PICSAR: Weekly Update (#4396)

* AMReX: Weekly Update

* New Tool: `Release/updatepyAMReX.py`

* pyAMReX: Weekly Update

Docs: Add Particles-in-PML Paper (#4398)

Add paper: "Absorption of charged particles in perfectly matched
layers by optimal damping of the deposited current" (2022).

Doc: Fix IPAC23 DOI (#4399)

Changed since preprint.

Python 3.12: Refactor out Distutils (#4392)

* CI: Unconstrain Some Upper Py Versions

* Replace distutils

* Update Docs

* no `clean` commmand

https://github.com/pypa/setuptools/discussions/2838

* Remove `SETUPTOOLS_USE_DISTUTILS`

Old workaround for old mpi4py.

* Update Doc String

* Update CI

* Update Tools/machines/lassen-llnl/install_v100_ml.sh

Co-authored-by: Roelof Groenewald <[email protected]>

---------

Co-authored-by: Roelof Groenewald <[email protected]>

Properly flush metadata of incomplete BTD, at the end of simulation (#4372)

Remove call to WarpX::GetInstance from InitializeMacroMultiFabUsingParser (#4138)

* remove call to WarpX::GetInstance from InitializeMacroMultiFabUsingParser

* fix bug

* fix bugs

Remove Cori from documentation (#3939)

* Remove Cori from documentation

* rder clusters in alphabetical order

* Update instructions to use mamba

* Apply suggestions from code review

* Apply suggestions from code review

* Cleanup: Formatting & Robustness

Improvements:
- easier future updates: clean out existing envs
- conda settings
- doc links
- remove outdated warning
- `conda deactivate` will fall back into `nersc-python` conda env,
  instead we can `exit` the SSH session to be done

Bugs:
- `echo`: needs `-e` for line breaks
- unpin `ipympl`
- helper script was not yet used in Jupyter kernel
- helper script lacked permissions
- `!mamba install -c conda-forge`: needs `-y` or will hang

Formatting:
- small text updates
- verbatim formatting
- slightly clearer namings

---------

Co-authored-by: Axel Huebl <[email protected]>

Allow negative mean velocity with NFluxPerCell (#4397)

* Allow negative drift velocity with Gaussian flux injection

* Simplify by using sign of u_m

* Add negative u_m test to flux_injection

* Update FluxInjection3D benchmark

* Save abs(u_m) as a temporary const

Bug fix: the electric field calculation for ionization had a bug if external electric field and grid electric field co-exist in the quasi-cylindrical geometry. This commit fixes this bug. (#4094)

add Nicks (2023) to science highlights (#4407)

In doGatherShapeN, for RZ use temporaries for Er and Etheta (#4409)

Release 23.11 (#4410)

* AMReX: 23.11

* pyAMReX: 23.11

* WarpX: 23.11

AMReX/pyAMReX/PICSAR: Weekly Update (#4417)

* AMReX: Weekly Update

* pyAMReX: Weekly Update

* PICSAR: Weekly Update

CI: Unbreak macOS (#4427)

Python: Use a fresh Virtualenv

Brew Python is too broken/inconsistent in packages like
`six`, `matplotlib`, `pandas` et al.

Update AMReX to latest commit (#4423)

Remove legacy references to EvolveEM which had been renamed Evolve (#4422)

Parallelize scraping (#4418)

* 2 modifs

* 1 modif

Doc: Laser Pulse Manip. for LPI (#4414)

* Doc: Laser Pulse Manip. for LPI

Add commonly used acronyms for laser pulse manipulation and
instability mitigation in laser-plasma interaction physics.

* Update glossary.rst

Fix unused variable with OpenPMD=OFF (#4421)

AMReX: Weekly Update (#4431)

Add paper using WarpX for laser-driven fusion (#4428)

[pre-commit.ci] pre-commit autoupdate (#4433)

updates:
- [github.com/hadialqattan/pycln: v2.3.0 → v2.4.0](https://github.com/hadialqattan/pycln/compare/v2.3.0...v2.4.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Add python binding to `WarpXParticleContainer::sumParticleCharge` (#4406)

Refinement patch parser (#4299)

* parser to define ref patches

* fix def for 1D and add RZ

* fix 1D Z def

* remove function def for fine_taglo/hi

* fix warning and error strig

* fix warning message

Make the static variable "authors" of the WarpX class a private member of the WarpX class  (#4404)

* make authors a private variable of the WarpX class instead of a public static variable

* update docstring

Add gaussian_parse_momentum_function (#4400)

* Add gaussian_parse_momentum_function

* Update initial_distribution benchmarks

* Remove blank line at end of initial_distribution.json

* Update doc

* Minor clean up in the CI test

* Further clean up of the doc

* Add new option to PICMI

* Add documentation for option in PICMI

Make whitespace alignment more consistent (#4440)

* Make sure code is aligned properly

* Minor adjustments, mainly to method arguments

* More corrections

* More corrections

* More corrections 2

fix minor bug in picmi `ParticleDiagnostic` (#4442)

Set the particle fields directly to the constant external fields (#4339)

* Set the particle fields directly to the constant external fields

* Change "get" to "query" for the external fields

* Fix PairGenerationTransformFunc

* More fixes

* Yet more fixes for QED

* Make temporary a const

* Broke vector into separate reals

* Fix ColliderRelevant.cpp

* Fix ParticleExtrema

* Updated comment regarding static

* Clean up for clang-tidy

Clang tidy CI test: add almost all modernize-* checks (#4319)

* Clang-tidy CI test: add almost all modernize-* checks

* address issues found with clang-tidy

* address issues found with clang-tidy

* fix bug

* fixed bug

* fix bugs

* address issue found with clang-tidy

* fix residual issues found with clang-tidy

* fix issue related to modernize-use-default-member-init check

* address issues found with clang-tidy

* fix issues found with clang-tidy

Move AnyFFT.H and FFT wrappers into ablastr (#4005)

* move AnyFFT.H into ablastr
* place anyfft under ablastr/math/fft
* add logic to enable fft in ablastr via flag ABLASTR_USE_FFT
* ABLASTR FFT: Build System Update

Co-authored-by: Axel Huebl <[email protected]>

AMReX/pyAMReX/PICSAR: Weekly Update (#4447)

* AMReX: Weekly Update

* pyAMReX: Weekly Update

CI: numprocs * numthreads <= 2 (#4450)

We must not oversubscribe the two (2) CI cores
with the number of processes times threads we use in tests.

Doc: Fix Typo `<probe>.integrate = true` (#4449)

Typo, this should not be `==`.

Maxlevel user option for external field initialization (#4326)

* add new option to initialize external fields on grid upto a max user-defined level

* ensure to init level > max level to 0

* fix logic for init

* Edoardo's fixes for typo

Co-authored-by: Edoardo Zoni <[email protected]>

* Update Source/WarpX.H

Co-authored-by: Edoardo Zoni <[email protected]>

* fix bug

* adding picmi interface with doc for Analytical initial field

* allocinit fields to simplify default behavior in initialization with constant and parser up to max levels

* default not needed anymore

* no need for a default

* fix incomplete paranthesis

* fix doc to remove default and include Dave's suggestion

* Update doc string

* fix incorrect rebase

---------

Co-authored-by: Edoardo Zoni <[email protected]>
Co-authored-by: Axel Huebl <[email protected]>

CPU CI: Always Serialize (#4451)

Always add
- `warpx.do_dynamic_scheduling=0`
- `warpx.serialize_initial_conditions=1`

to CPU CI jobs, so we cannot forget it when it matters (e.g.,
random numbers in distributions).

Contributing style and conventions additions (#4452)

* Add class definition convention and reword function definition convention

* Use code-block and modify documentation.rst to conform to conventions

* Small fix to code-block

* Fix typo and add new lines

* Revert new lines

* Indents code-blocks and words in between

* Use less code blocks

* Use "amrex::Print" instead of "Print"

add start/end moving step (#4437)

* add start/end moving step

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* set the default parameters to be None in start/end_moving_window_step

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix the indent

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: root <root@Tiga>

Frontier (OLCF): cupy (#4247)

Documenting cupy installation for Frontier.

Allow multiple injection sources per species (#4196)

* Extensive clean up of PlasmaInjection

* Small cleanup of parseMomentum

* Fix string argument reference

* Remove unneeded surface_flux

* Allow multiple injection sources per species

* Add documentation

* Some clean up

* Bug fix

* Add ParmParseWithOptionalGroup

* Used langmuir/inputs_2d as a CI test case

* Update documentation

* Each source must have injection_style specified

* Fix in documentation

* Small clean up in Examples/Tests/langmuir/inputs_2d

* Add documentation to ParmParseWithOptionalGroup

* Update nuclear_fusion tests to use multiple injection_source

* Clean up "const int"

* Make explicit double and float in ParmParseWithOptionalGroup

* Make charge and mass ParticleReal

* Update Deuterium_Tritium_Fusion_3D.json

* Move ParmParseWithOptionalGroup to Utils and update method names

* Allow the injection_style to be the same for all sources

* Revert the nuclear_fusion/inputs_deuterium_tritium_rz test

* Revert the changes to Examples/Tests/langmuir/inputs_2d

* Small cleanup to use references insteads of pointers

* Update Source/Particles/PhysicalParticleContainer.H

Co-authored-by: Remi Lehe <[email protected]>

* Rework the ParmParse get routines

* Update doc regarding moving windows

* Further rework, now cleaning up the query routines

* Rework the handling of the optional group name in input parameter parsing

* Fix consts

* Add multiple source capability to the PICMI interface

* Small clean up in picmi

---------

Co-authored-by: Remi Lehe <[email protected]>

Clang-Tidy Cache (#4453)

Use ccache in the clang-tidy CI. This allows us to skip clang-tidy checks on
files that are not changed as reported by ccache.

AMReX: Update to `development` (#4455)

```
./Tools/Release/updateAMReX.py
```

Set `amrex.omp_threads = "nosmt"` (#4393)

Improve the performance on Intel and AMD CPUs by default:
Avoid oversubscribing the physical number of CPU threads, as is
default in OpenMP.

Initial commit (#4460)

New Cache Strategy (#4456)

If a cache is updated during a job, GitHub does not store the new cache
unless it's not found with the primary key. To work around that, we use the
git hash in the cache name. When the cache action tries to load the cache
using the primary key, it's always a miss. It will then try to load a cache
using the restore-keys. If the cache is updated during CI, the new version
will be stored under the primary key's name.

In this new strategy, a new PR will use the cache associated with the latest
development branch. The updated cache will be stored and become private to
that PR. Any updates to the PR will also create new updated caches. But we
don't need to keep all the copies.  We only need to keep the latest version
of the cache associated with the PR. So we use a workflow (clean-cache.yml)
to clean up the old caches.

After a PR is closed, we use clean-cache-postpr.yml to clean up all the
caches associated with the PR. There is no easy way to get the PR number of
the PR that triggers the cleanup workflow. Thus, we store the PR number as
an artifact for the cleanup workflow.

It turns out ccache encounters internal errors in some CIs on Ubuntu
20.04. Switching to the latest ccache solves the issues.

Make geometry.dims abort message more user-friendly (#4459)

Fix typo in "write_diagnostics_on_restart" (#4463)

* fix type on "write diagnostics on restart"

write_diagnostics_on_restart was write_diagonstics_on_restart

* fix all instances of typo

* Delete install.sh

Bugfix in `fields.py` `mesh()` with ghost cells included (#4466)

* fix issue in `fields.py` when retrieving the mesh in 1d with ghost cells included

* fix general bug with `mesh()`

fix preprocessor defs for 1D in two locations (#4465)

Add external current handling to Ohm's law solver (#4405)

* add `WarpX::getedgelengths` and WarpX::getfaceareas` functions to return pointers to those multifabs

* add external current support to the hybrid-PIC solver

* add external current specification (for hybrid-PIC scheme) to picmi

* add RZ support for `FiniteDifferenceSolver::CalculateCurrentAmpere`

* allow an initial Bz field to be set in RZ

* code cleanup and addition of CI test

* avoid lambda capture issue

* update documentation to show external current implementation

* revert unwanted changes

* restore RZ support that was lost during rebase

* fix segfault when EB support is OFF

* fix codeQL issue

* add some details to docs

* the external current only needs to be calculated once per field solve step

* add description of `hybrid_pic_model.J[x/y/z]_external_grid_function(x, y, z, t)` to the documentation

Release 23.12 (#4469)

* AMReX: 23.12

* pyAMReX: 23.12

* WarpX: 23.12

Remove brew cache (#4470)

The size of the brew cache is huge. It can be as big as more than 6
GB. Since we only have 10 GB GitHub cache space, the brew cache is disabled
in the macOS CI. It should not increase the time for the macOS CI too
much. Without any cache, it usually takes less than 10 minutes to install
all the brew packages.

Doc: Restructure Examples (#4467)

* Doc: Restructure Examples

Restructure examples by science case.

* Doc: Fix visualized field name.
* Doc: `:py:function:` with trailing ()

Co-authored-by: Roelof Groenewald <[email protected]>

Docs: Fix Many Small Errors & Warnings

Mostly file names that changed or were not yet created.

Docs: Fix Formatting in `parameters.rst`

More formatting issues in a list.

macOS CI: export CCACHE_DEPEND=1 (#4475)

Without it, the hit rate of ccache is very low.

Doc: Streamline Python Input (#4472)

Start to streamline the PICMI Python input.

Rename Depose -> Deposit (#4474)

Correct on-axis field boundary for RZ (#4464)

* Correct on-axis fields for RZ

* Update checksum file

* Clean commented-out code

Fix typos in comments and docs (#4471)

* Fix typos and spelling

* More typos

* Typos 2023 Nov 27

* 2023 Nov 30 Update

* Docs typos

* Fix "arbitrary"

* 2023 Dec 01 typos

* Particles

* ablastr - FieldSolver

* Filter

* Fluids

* Docs + Tools

* Change back to "lamda"

* Fix typo

Co-authored-by: Roelof Groenewald <[email protected]>

* Fix cylindrical

---------

Co-authored-by: Axel Huebl <[email protected]>
Co-authored-by: Roelof Groenewald <[email protected]>

pybind11: v2.11.1+ (#4473)

Update pybind11 to the latest release.

Set alpha mass directly from NIST data (#4478)

* Set alpha mass directly from NIST data

* Delete extra line

Add `latex_theory/allbibs.bib` to bibliography list and delete duplicates (#4481)

* Add `latex_theory/allbibs.bib` to conf.py

* Delete additional redundant reference and make intro.rst match intro.tex

macOS CI: Fix brew installation (#4493)

It appears that we need to call brew upgrade.

sqrt -> std::sqrt (#4490)

Unlike std::sqrt that has overloads for double and float, sqrt is a C
function that takes a double. If the argument is a float, it will have to be
promoted to double first.

Clang-Tidy: Update performance and readability (#4492)

For performance and readability, instead of including checks explicitly,
switch to excluding checks explicitly. These checks are excluded because
currently WarpX fails at them.

Add portability and diagnostic checks.

Clang-Tidy CI: Keep Going after Errors (#4491)

Add `--keep-going` to the make command in Clang-Tidy CI. With that, the job
will keep going and show all the clang-tidy check errors instead of stopping
on the first error.

Tidy-Clang: performance-type-promotion-in-math-fn (#4497)

Move external field parameters out of WarpX class (#4441)

* move external field parameters into a dedicated class

* add full header in Python/WarpX.cpp

* fix bug introduced in Make.package

* enforce inputfile syntax

* fix issue found with clang-tidy

* remove unwanted includes

* added missing include

* replace init function with constructor

* update doc

* fix bug and add curly braces

[pre-commit.ci] pre-commit autoupdate (#4500)

updates:
- [github.com/pycqa/isort: 5.12.0 → 5.13.0](https://github.com/pycqa/isort/compare/5.12.0...5.13.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Custom class for bibliography style (#4482)

* bib-formatting

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename bib style class

* Delete unused imports

* Add comments to conf.py

* Tweaks to .bib files

* Add pybtex to Doc requirements

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

AMReX/pyAMReX/PICSAR: Weekly Update (#4489)

* AMReX: Weekly Update

* pyAMReX: Weekly Update

* Python: Update breaking APIs

Functions are now upstream and properties.

Clang-tidy: enable readability-duplicate-include check in clang-tidy CI test (#4496)

* enable readability-duplicate-include check in clang-tidy CI test

* remove duplicate includes

Use more consistent species types in fusion module (#4480)

* Force user to select helium4 in the p-B fusion reaction

* Update helium4 mass in fusion module and tests

* Replace proton with hydrogen1

* Update hydrogen1 mass in fusion module and tests

* Update benchmarks

AMReX/pyAMReX/PICSAR: Weekly Update (#4503)

* AMReX: Weekly Update

* pyAMReX: Weekly Update

workflow training neural network from warpx data (#4499)

* workflow training neural network from warpx data

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* address automated review comments

* Apply suggestions from code review

Co-authored-by: Axel Huebl <[email protected]>

* move data and figures to cloud (GitHub and Zenodo)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Change to title case

* add ml references to bibliography

* Formatting

* Test other multi-ref

* Refs

* One more ref

* Finalize Ending

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Axel Huebl <[email protected]>

Clang-Tidy: readability-braces-around-statements (#4511)

Fixed by clang-tidy --fix.

Clang-Tidy: readability-inconsistent-declaration-parameter-name (#4514)

Clang-tidy: enable no-malloc check in clang-tidy CI test (#4518)

Update descriptions of hybrid-PIC examples (#4479)

* update descriptions of hybrid-PIC examples

* requested changes as well as updates to the magnetic reconnection example README

Bibliography: improved citations (#4513)

* Fix up months and whitespace alignment

* Replace arxiv citations with published versions

* Author initials, Physics of Plasmas, delete empty lines, replace et al

* Comment urlretrieve in conf.py

* VayJCP13 redundant

* refs.bib author touch ups

* Uncomment conf.py

* alphabetize refs.bib entries

* Remove more "et al" from bib files

* Whitespaces and page numbers

Doc: Fix Sphinx Warnings

Fix formatting issues.

Doc: Examples Before APIs

Change ToC order as discussed in dev meeting.

Bibliography: make author family names appear last (#4506)

* bib-formatting

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename bib style class

* Delete unused imports

* Add comments to conf.py

* Tweaks to .bib files

* Add pybtex to Doc requirements

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* comment out 'lastfirst'

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Clang-Tidy: performance-noexcept-move-constructor (#4504)

Clang-Tidy: readability-qualified-auto (#4507)

Add ability to run checksum on openPMD files (#4519)

* Add ability to evaluate checksum on openPMD files

* Switch to openpmd output for 3D laser wakefield

* Fix issues with CI on plotfile

* Fix Python syntax

* Prevent error where the reg_test code does not find plotfiles

* Make the openPMD checksum identical to checkpoint checksum

move function definition to cpp file (#4522)

Improve documentation for laser chirp (#4525)

* Improve documentation for laser chirp

* Fix Latex

* Apply suggestions from code review

Co-authored-by: Axel Huebl <[email protected]>

---------

Co-authored-by: Axel Huebl <[email protected]>

Doc: Fix ChecksumAPI `autofunction` (#4524)

Ensure the ChecksumAPI can be rendered in Sphinx via `autofunction`.

WarpXSumGuardCells: move function definitions in cpp file (#4521)

* move function definition in cpp file

* fix bugs

* fix issue found with clang-tidy

* Clean Commented Line

Co-authored-by: Luca Fedeli <[email protected]>

---------

Co-authored-by: Axel Huebl <[email protected]>

Spruce up amr.rst (#4529)

* Documentation: spruce up AMR section

* Change prefix to "amr-"

* Undo unnecessary changes

* Adjust size to 95% for better aesthetics

* Grammar

* Normalize Quotes

---------

Co-authored-by: Axel Huebl <[email protected]>

Doc: Extend a Simulation Workflow (#4520)

* Doc: Extend a Simulation Workflow

Rework and move the workflow on how to extend simulations
from Python.

* Fix Typos, Rename File & Section

Co-authored-by: David Grote <[email protected]>

* Section: Modify Solvers

* Example: Calc E_x*E_x

* Fix Typo

Co-authored-by: Roelof Groenewald <[email protected]>

* Docs: `MFIter` loop and WarpX MR level Props

* Explicit Callback Includes

* Fix: MultiFab `level=...` syntax

* Also tested `pti` loop

* Write: Do not Change Positions

Let's avoid to break the sim with this example :D

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: David Grote <[email protected]>
Co-authored-by: Roelof Groenewald <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Fix chirp documentation (#4533)

Spruce up input_output.rst (#4532)

Spruce up cold_fluid_model.rst (#4531)

Spruce up boosted_frame.rst (#4530)

Documentation: numbered reference formatting (#4528)

* Documentation: custom formatting

* Documentation: custom formatting

Fix CI for ROCm 6.0 (#4527)

Need to explicitly install hiprand package in CI because it's now a
standalone project, not a submodule for rocRand according to the release
notes.

Spruce up ml_dataset_training.rst (#4512)

* Make refs work in ml_dataset_training.rst

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add figures locally and modify captions

* Revert figures back to links

* Adjust caption on beam 0 figure

* Delete extra line breaks

* Double-Ref

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Axel Huebl <[email protected]>

Spruce up PIC theory section (#4536)

* Spruce up picsar_theory.rst

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Minor edit

* Rename picsar_theory.rst to pic.rst

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Docs: rename and spruce up boundary conditions section (#4537)

* Docs: rename and spruce up boundary conditions section

Spruce up kinetic_fluid_hybrid_model.rst (#4534)

Doc: CUDA 11.7+ (#4538)

We know of a few compiler issues for C++17 CUDA code in CUDA <11.7 for
a bit, updating Summit and general recommendations.

Add updated instructions for WarpX on Karolina (#4477)

* Add updated instructions for WarpX on Karolina

Use spack for installing all dependencies, and the new slurm scheduler.

* Update Tools/machines/karolina-it4i/install_dependencies.sh

End for loop

Co-authored-by: Axel Huebl <[email protected]>

[pre-commit.ci] pre-commit autoupdate (#4539)

updates:
- [github.com/pycqa/isort: 5.13.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.13.0...5.13.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

AMReX/pyAMReX/PICSAR: Weekly Update (#4541)

* AMReX: Weekly Update

* pyAMReX: Weekly Update

WarpXAMReXInit: move include directive from header to cpp file (#4543)

Adding user defined keywords in Hybrid PIC Python class to allow for addition of constants when defining functions for resistivity and current. (#4550)

Clean up doc to improve readability (#4555)

add hybrid-PIC PoP reference to docs (#4551)

Fix reference (#4552)

AMReX/pyAMReX/PICSAR: Weekly Update (#4559)

* AMReX: Weekly Update

* pyAMReX: Weekly Update

Add updated instructions for WarpX on Karolina (#4545)

* Add updated instructions for WarpX on Karolina

Use spack for installing all dependencies, and the new slurm scheduler.

* Update Tools/machines/karolina-it4i/install_dependencies.sh

fix short circuit

Co-authored-by: Axel Huebl <[email protected]>

---------

Co-authored-by: Axel Huebl <[email protected]>

Add DSMC module (#4125)

* moved MCCProcess to ScatteringProcess

* initial commit of DSMC - not yet working

* partially working DSMC implementation

* reuse kinematic functionality

* fix bug in setting new particle ids

* code cleanup

* move DSMC filter functions to different file

* fixed issue with some negative id particles not being removed - needs clean up

* add a redistribute call after resampling to remove negative id particles

* update CMakeLists

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* code cleanup and build fixes

* only print resampling message if `verbose` is on

* properly use target species velocity

* add DSMC CI test

* fix CI issues

* WIP update collision documentation

* increase rtol for DSMC checksum test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* `import os` in analysis script for DSMC test

* reduce tolerance for DSMC test further

* added `get_charge_density` to pybind `WarpXParticleContainer` and exposed useful fields.py functionality directly for a mf

* fix outdated libwarpx call in CI test

* fix clang-tidy and CI issues

* use `double` in calculation of collision energy

* fix clang-tidy issues

* apply code review changes

Co-authored-by: RemiLehe <[email protected]>

* apply second round of code review changes

* use `amrex::Scan::PrefixSum` to calculate offsets from collision mask; fix for GPU executability

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: RemiLehe <[email protected]>

Fix: BeamRelevant 1D, 2D (#4558)

The `BeamRelevant` diagnostics in 1D and 2D predicted wrong
average positions for the symmetry dimensions.

Update documentation for checksum (#4561)

Implicit electromagnetic solver using Picard iterations (#4071)

* Added evolve_scheme parameter

* Add implicit advance using Picard iteration

* Added WarpXEvolveImplicitPicard.cpp to CMakeLists

* Fix push for 1D and 2D

* Add Langmuir_multi_implicit_picard CI test

* Add n_picard_iterations

* Further changes - now the solver is working (mostly)

* Fix some floats

* Fix default value of relative_time

* Major update, including charge conserving scheme

* Bug fix in CurrentDeposition.H

* Fix FieldGather for 2D for By

* Clean up print statements

* Fix B field gather in 1D

* Only add particle attributes if initializing level zero

* Set nodel_sync=true, fixes instabilities

* Only calculate interation convergence when needed

* Fix KernelTimer in CurrentDeposition.H

* Use WarpX::sync_nodal_points

* Update doc for evolve_scheme

* Update ImplicitPushXP to match PushPX

* Add RZ version

* Various fixes

* Add some ignore_unused statements

* Fixes to match changes from merge

* Add reference to paper in doc

* Updated paper reference in doc

* Add SemiImplicitPicard scheme

* Fixes needed after merge

* Use parser to query picard iteration parameters

* Remove unneeded const on scalar arguments

* More fixes for clang-tidy

* Remove unneeded print statements

* More clang-tidy cleanup

* Bug fix, forgotten declaration

* Hopefully one last clang-tidy fix

* Update RZ CI tests modified by fixes to fields along the axis

* Add 1d CI test

* Clean up for clang-tidy

* Update benchmarks for CI test

* Small fix for QED and CUDA

* Updates to the documentation

* Cleanup parameter input

* Move implicit evolve into the main evolve routine

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add more checks of input parameters

* Rename WarpXEvolveImplicitPicard.cpp to WarpXOneStepImplicitPicard.cpp

* Clean of one step file

* Remove commented code

* Clean up from merge

* Remove commented code

* Add picard_iteration_tolerance flag

* Fix clang-tidy issue

* clang-tidy fixes

* Update Docs/source/usage/parameters.rst

Fix Delta

Co-authored-by: Remi Lehe <[email protected]>

* Update Docs/source/usage/parameters.rst

Co-authored-by: Remi Lehe <[email protected]>

* Update Docs/source/usage/parameters.rst

Co-authored-by: Remi Lehe <[email protected]>

* Update Docs/source/usage/parameters.rst

Co-authored-by: Remi Lehe <[email protected]>

* With Redistribute, only nearest neighbor exchanges are needed

* Update documentation

* Changed name to SaveParticlesAtImplicitStepStart

* Update comments in UpdatePosition.H

* Abort if Vay deposition is used

* Change setup to require energy-conserving and setting galerkin_scheme

* Update documentation for Evolve routine

* Undid change to setting aux_is_nodal

* Add comments to PushType

* Update comment for ImplicitPushXP

* More updates to comment for ImplicitPushXP

* Fix setting of external fields in ImplicitPushXP

* Add comment to doDepositionShapeNImplicit

* Updates to charge conserving gather

* Renamed implicit field gather routine with Esirkepov stencil

* Update naming and comments in doGatherShapeNImplicit

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Remi Lehe <[email protected]>

Fix default initialization of runtime attributes. (#4508)

* Refactor DefaultInitializeRuntimeAttributes to free function template

* refactor filterCopyTransform

* update ParticleCreationFunc

* do filterCreateTransformFromFAB

* fix ionization initial level

* add start and stop indices

* trying to make it run on GPU based on the allocator

* run on GPU or not depending on allocator type

* fix typo

* fix non-QED compilation

* fix non-QED builds correctly

* fix narrowing

* fix segfault

* Call user runtime attributes after initializing position and momenta

* don't re-initialize QED comps if they've already been set

* Add automated test

* Update json for new test

* Fix bug in AddNParticles

* Add comments

---------

Co-authored-by: Remi Lehe <[email protected]>

Update explanation of why 2D simulations are not suitable for plasma-wakefield (#4544)

* Update physics explanation

* Apply suggestions from code review

Change the sign of laser particles (#4568)

* Change the sign of laser particles

The choice is somewhat arbitrary for current use cases. But it is necessary
for boosted frame restart runs (#4119). Since this changes the results for
the CI tests, we make this change a separate PR so that #4119 would be
easier to review.

* Update benchmarks from Azure output

Add semi-implicit CI test (#4565)

* Add semi-implicit CI test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update CI benchmark values

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Add filters for boundary scraping diagnostics (#4371)

* Edited openPMD diagnostic routines to use particle filters with boundary scraping diagnostics

The modification separates the cases for backtransformed diagnostics and boundary scraping diagnostics in WriteOpenPMDParticles, and implements filters for the latter (folowing the procedure used for fullDiagnostics)
This allows the filters available for fullDiagnostics (random_filter, uniform_filter, parser_filter, and geometry_filter) to be used with boundary scraping diagnostics

Some notes:
1. All particles are still flushed from the boundary scraping particle buffer after the diagnostic file is written, regardless of whether all particles were written
2. The filter functions are called at the time the diagnostic is written, not the time the particle crosses the boundary
This has a couple of implications:
    i.  The boundary scraping diagnostic should be written frequently to flush the buffer if a lot of particles cross the scraped boundary, even if only a small subset of those particles are written to file
    ii. "t" in plot_filter_function is the time the diagnostic file is written rather than the time the particle crossed the boundary

* Fixed spacing

* Added regression test for filtering boundary scraping diagnostics

Added a new regression test scraping_filter, based on scraping
This tests whether boundary scraping diagnostics are set up to use filtering
In this test, plot_filter_function is used to indicateas whether filters are implemented -- if one wants to test the other filtering options (e.g., random_fraction), more tests will be needed in the future

The regression test scraping was copied and plot_filter_function is used to write only the particles with z>0
Because this represents half the total particles, the check on the total number of particles now uses twice the number of particles scraped

* Updated scraping_filter test

Added check that all scraped particles have z > 0 as specified in inputs
Removed checksum test that was redundant with scraping test

* Fix indentation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Remi Lehe <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Update the field probe diagnostic documentation (#4564)

Apply particle selection to BTDiagnostics (#4570)

* Edited openPMD diagnostic routines to use particle filters with boundary scraping diagnostics

The modification separates the cases for backtransformed diagnostics and boundary scraping diagnostics in WriteOpenPMDParticles, and implements filters for the latter (folowing the procedure used for fullDiagnostics)
This allows the filters available for fullDiagnostics (random_filter, uniform_filter, parser_filter, and geometry_filter) to be used with boundary scraping diagnostics

Some notes:
1. All particles are still flushed from the boundary scraping particle buffer after th…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor out Distutils
3 participants