diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index d22097a208f..28c4e03d102 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -13,6 +13,7 @@ pr: paths: exclude: - Docs + - '**/*.rst' jobs: - job: diff --git a/.github/workflows/clang_sanitizers.yml b/.github/workflows/clang_sanitizers.yml index d63a329bf64..15dbb00756a 100644 --- a/.github/workflows/clang_sanitizers.yml +++ b/.github/workflows/clang_sanitizers.yml @@ -7,6 +7,7 @@ on: pull_request: paths-ignore: - "Docs/**" + - "**.rst" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-clangsanitizers diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml index edb3e8b1988..6e83b07000f 100644 --- a/.github/workflows/clang_tidy.yml +++ b/.github/workflows/clang_tidy.yml @@ -7,6 +7,7 @@ on: pull_request: paths-ignore: - "Docs/**" + - "**.rst" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-clangtidy diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index e4967bea790..404f53a3295 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -7,6 +7,7 @@ on: pull_request: paths-ignore: - "Docs/**" + - "**.rst" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-cuda diff --git a/.github/workflows/hip.yml b/.github/workflows/hip.yml index 6ab4e4a8401..f61c8fe1313 100644 --- a/.github/workflows/hip.yml +++ b/.github/workflows/hip.yml @@ -7,6 +7,7 @@ on: pull_request: paths-ignore: - "Docs/**" + - "**.rst" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-hip diff --git a/.github/workflows/insitu.yml b/.github/workflows/insitu.yml index 50b482d28d3..3d3942174a7 100644 --- a/.github/workflows/insitu.yml +++ b/.github/workflows/insitu.yml @@ -7,6 +7,7 @@ on: pull_request: paths-ignore: - "Docs/**" + - "**.rst" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-insituvis diff --git a/.github/workflows/intel.yml b/.github/workflows/intel.yml index 9b98c6e5990..25819e188e3 100644 --- a/.github/workflows/intel.yml +++ b/.github/workflows/intel.yml @@ -7,6 +7,7 @@ on: pull_request: paths-ignore: - "Docs/**" + - "**.rst" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-intel diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0ddfcf38b41..87482cc6166 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -7,6 +7,7 @@ on: pull_request: paths-ignore: - "Docs/**" + - "**.rst" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-macos diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index bbe20679781..d657daf5793 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -7,6 +7,7 @@ on: pull_request: paths-ignore: - "Docs/**" + - "**.rst" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-ubuntu diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ae4843e0536..7f964239a02 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -7,6 +7,7 @@ on: pull_request: paths-ignore: - "Docs/**" + - "**.rst" concurrency: group: ${{ github.ref }}-${{ github.head_ref }}-windows diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c396c95b1d..c07ad07f74a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,7 @@ repos: # Python: Ruff linter & formatter # https://docs.astral.sh/ruff/ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.3 + rev: v0.8.6 hooks: # Run the linter - id: ruff diff --git a/CMakeLists.txt b/CMakeLists.txt index c7a889633da..ff5d156fb8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -480,7 +480,7 @@ foreach(D IN LISTS WarpX_DIMS) warpx_enable_IPO(pyWarpX_${SD}) else() # conditionally defined target in pybind11 - # https://github.com/pybind/pybind11/blob/v2.12.0/tools/pybind11Common.cmake#L397-L403 + # https://github.com/pybind/pybind11/blob/v2.13.0/tools/pybind11Common.cmake#L407-L413 target_link_libraries(pyWarpX_${SD} PRIVATE pybind11::lto) endif() endif() diff --git a/Docs/source/developers/checksum.rst b/Docs/source/developers/checksum.rst index ccbea3408ef..1e71ee3ddae 100644 --- a/Docs/source/developers/checksum.rst +++ b/Docs/source/developers/checksum.rst @@ -22,11 +22,6 @@ This relies on the function ``evaluate_checksum``: .. autofunction:: checksumAPI.evaluate_checksum -Here's an example: - -.. literalinclude:: ../../../Examples/Tests/embedded_circle/analysis.py - :language: python - This can also be included as part of an existing analysis script. How to evaluate checksums from the command line diff --git a/Docs/source/developers/fields.rst b/Docs/source/developers/fields.rst index bd6a886ae2a..ee782570bad 100644 --- a/Docs/source/developers/fields.rst +++ b/Docs/source/developers/fields.rst @@ -119,9 +119,9 @@ Bilinear filter The multi-pass bilinear filter (applied on the current density) is implemented in ``Source/Filter/``, and class ``WarpX`` holds an instance of this class in member variable ``WarpX::bilinear_filter``. For performance reasons (to avoid creating too many guard cells), this filter is directly applied in communication routines, see ``WarpX::AddCurrentFromFineLevelandSumBoundary`` above and -.. doxygenfunction:: WarpX::ApplyFilterMF(const amrex::Vector, 3>> &mfvec, int lev, int idim) +.. doxygenfunction:: WarpX::ApplyFilterMF(const ablastr::fields::MultiLevelVectorField &mfvec, int lev, int idim) -.. doxygenfunction:: WarpX::SumBoundaryJ(const amrex::Vector, 3>> ¤t, int lev, int idim, const amrex::Periodicity &period) +.. doxygenfunction:: WarpX::SumBoundaryJ(const ablastr::fields::MultiLevelVectorField ¤t, int lev, int idim, const amrex::Periodicity &period) Godfrey's anti-NCI filter for FDTD simulations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/Docs/source/developers/gnumake/python.rst b/Docs/source/developers/gnumake/python.rst index 543b80d5ddd..06dbd5ac737 100644 --- a/Docs/source/developers/gnumake/python.rst +++ b/Docs/source/developers/gnumake/python.rst @@ -3,7 +3,7 @@ Installing WarpX as a Python package ==================================== -A full Python installation of WarpX can be done, which includes a build of all of the C++ code, or a pure Python version can be made which only installs the Python scripts. WarpX requires Python version 3.8 or newer. +A full Python installation of WarpX can be done, which includes a build of all of the C++ code, or a pure Python version can be made which only installs the Python scripts. WarpX requires Python version 3.9 or newer. For a full Python installation of WarpX --------------------------------------- diff --git a/Docs/source/developers/particles.rst b/Docs/source/developers/particles.rst index 1f1e2eab606..45a92107ae9 100644 --- a/Docs/source/developers/particles.rst +++ b/Docs/source/developers/particles.rst @@ -83,7 +83,7 @@ Main functions .. doxygenfunction:: PhysicalParticleContainer::PushPX -.. doxygenfunction:: WarpXParticleContainer::DepositCurrent(amrex::Vector, 3>> &J, amrex::Real dt, amrex::Real relative_time) +.. doxygenfunction:: WarpXParticleContainer::DepositCurrent(ablastr::fields::MultiLevelVectorField const &J, amrex::Real dt, amrex::Real relative_time) .. note:: The current deposition is used both by ``PhysicalParticleContainer`` and ``LaserParticleContainer``, so it is in the parent class ``WarpXParticleContainer``. diff --git a/Docs/source/highlights.rst b/Docs/source/highlights.rst index 7f613625c55..300d94149f8 100644 --- a/Docs/source/highlights.rst +++ b/Docs/source/highlights.rst @@ -188,6 +188,14 @@ Scientific works in High-Performance Computing, applied mathematics and numerics Please see :ref:`this section `. +Related works using WarpX: + +#. Yan Y., Du F., Tang J., Yu D and Zhao Y., + **Numerical study on wave attenuation via 1D fully kinetic electromagnetic particle-in-cell simulations**. + Plasma Sources Sci. Technol. **33** 115013, 2024 + `DOI:10.1088/1361-6595/ad8c7c `__ + + Nuclear Fusion and Plasma Confinement ************************************* diff --git a/Docs/source/install/dependencies.rst b/Docs/source/install/dependencies.rst index 13e2377d568..200677807d7 100644 --- a/Docs/source/install/dependencies.rst +++ b/Docs/source/install/dependencies.rst @@ -37,7 +37,7 @@ Optional dependencies include: - `SENSEI 4.0.0+ `__: for in situ analysis and visualization - `CCache `__: to speed up rebuilds (For CUDA support, needs version 3.7.9+ and 4.2+ is recommended) - `Ninja `__: for faster parallel compiles -- `Python 3.8+ `__ +- `Python 3.9+ `__ - `mpi4py `__ - `numpy `__ diff --git a/Docs/source/install/hpc/dane.rst b/Docs/source/install/hpc/dane.rst index 2e0efc99391..9c3c9077df5 100644 --- a/Docs/source/install/hpc/dane.rst +++ b/Docs/source/install/hpc/dane.rst @@ -3,7 +3,7 @@ Dane (LLNL) ============= -The `Dane Intel CPU cluster `_ is located at LLNL. +The `Dane Intel CPU cluster `__ is located at LLNL. Introduction @@ -11,9 +11,9 @@ Introduction If you are new to this system, **please see the following resources**: -* `LLNL user account `__ (login required) * `Jupyter service `__ (`documentation `__, login required) -* `Production directories `_: +* `Production directories `__: * ``/p/lustre1/$(whoami)`` and ``/p/lustre2/$(whoami)``: personal directory on the parallel filesystem * Note that the ``$HOME`` directory and the ``/usr/workspace/$(whoami)`` space are NFS mounted and *not* suitable for production quality data generation. diff --git a/Docs/source/install/hpc/lawrencium.rst b/Docs/source/install/hpc/lawrencium.rst index 2217c5a31ce..f163531a29a 100644 --- a/Docs/source/install/hpc/lawrencium.rst +++ b/Docs/source/install/hpc/lawrencium.rst @@ -69,7 +69,7 @@ And since Lawrencium does not yet provide a module for them, install ADIOS2, BLA cmake -S src/lapackpp -B src/lapackpp-v100-build -DCMAKE_CXX_STANDARD=17 -Dgpu_backend=cuda -Dbuild_tests=OFF -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_PREFIX=$HOME/sw/v100/lapackpp-master -Duse_cmake_find_lapack=ON -DBLAS_LIBRARIES=${LAPACK_DIR}/lib/libblas.a -DLAPACK_LIBRARIES=${LAPACK_DIR}/lib/liblapack.a cmake --build src/lapackpp-v100-build --target install --parallel 12 -Optionally, download and install Python packages for :ref:`PICMI ` or dynamic ensemble optimizations (:ref:`libEnsemble `): +Optionally, download and install Python packages for :ref:`PICMI ` or dynamic ensemble optimizations (`libEnsemble `__): .. code-block:: bash diff --git a/Docs/source/refs.bib b/Docs/source/refs.bib index 02251c433d5..d6c81c34404 100644 --- a/Docs/source/refs.bib +++ b/Docs/source/refs.bib @@ -458,6 +458,7 @@ @misc{Fallahi2020 @article{VayFELA2009, title = {FULL ELECTROMAGNETIC SIMULATION OF FREE-ELECTRON LASER AMPLIFIER PHYSICS VIA THE LORENTZ-BOOSTED FRAME APPROACH}, author = {Fawley, William M and Vay, Jean-Luc}, + journal = {}, abstractNote = {Numerical simulation of some systems containing charged particles with highly relativistic directed motion can by speeded up by orders of magnitude by choice of the proper Lorentz-boosted frame[1]. A particularly good example is that of short wavelength free-electron lasers (FELs) in which a high energy electron beam interacts with a static magnetic undulator. In the optimal boost frame with Lorentz factor gamma_F , the red-shifted FEL radiation and blue shifted undulator have identical wavelengths and the number of required time-steps (presuming the Courant condition applies) decreases by a factor of 2(gamma_F)**2 for fully electromagnetic simulation. We have adapted the WARP code [2]to apply this method to several FEL problems involving coherent spontaneous emission (CSE) from pre-bunched ebeams, including that in a biharmonic undulator.}, url = {https://www.osti.gov/biblio/964405}, place = {United States}, diff --git a/Docs/source/theory/multiphysics/collisions.rst b/Docs/source/theory/multiphysics/collisions.rst index 08485345a13..a2b11bf42a2 100644 --- a/Docs/source/theory/multiphysics/collisions.rst +++ b/Docs/source/theory/multiphysics/collisions.rst @@ -131,7 +131,7 @@ The process is also the same as for elastic scattering except the excitation ene Benchmarks ---------- -See the :ref:`MCC example ` for a benchmark of the MCC +See the :ref:`MCC example ` for a benchmark of the MCC implementation against literature results. Particle cooling due to elastic collisions diff --git a/Docs/source/usage/examples.rst b/Docs/source/usage/examples.rst index fa3e674edd3..4ac80a8bab0 100644 --- a/Docs/source/usage/examples.rst +++ b/Docs/source/usage/examples.rst @@ -65,14 +65,6 @@ Microelectronics * `ARTEMIS manual `__ -Nuclear Fusion --------------- - -.. note:: - - TODO - - Fundamental Plasma Physics -------------------------- diff --git a/Docs/source/usage/examples/thomson_parabola_spectrometer b/Docs/source/usage/examples/thomson_parabola_spectrometer new file mode 120000 index 00000000000..8e72fba4100 --- /dev/null +++ b/Docs/source/usage/examples/thomson_parabola_spectrometer @@ -0,0 +1 @@ +../../../../Examples/Physics_applications/thomson_parabola_spectrometer \ No newline at end of file diff --git a/Examples/Physics_applications/thomson_parabola_spectrometer/README.rst b/Examples/Physics_applications/thomson_parabola_spectrometer/README.rst index b033ee8c1dd..10009008714 100644 --- a/Examples/Physics_applications/thomson_parabola_spectrometer/README.rst +++ b/Examples/Physics_applications/thomson_parabola_spectrometer/README.rst @@ -28,7 +28,7 @@ The PICMI input file is not available for this example yet. For `MPI-parallel `__ runs, prefix these lines with ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system. -.. literalinclude:: inputs +.. literalinclude:: inputs_test_3d_thomson_parabola_spectrometer :language: ini :caption: You can copy this file from ``Examples/Physics_applications/thomson_parabola_spectrometer/inputs_test_3d_thomson_parabola_spectrometer``. diff --git a/Python/setup.py b/Python/setup.py index fa38e14e7ce..c119917631e 100644 --- a/Python/setup.py +++ b/Python/setup.py @@ -71,6 +71,6 @@ description="""Wrapper of WarpX""", package_data=package_data, install_requires=["numpy", "picmistandard==0.33.0", "periodictable"], - python_requires=">=3.8", + python_requires=">=3.8", # left for CI, truly ">=3.9" zip_safe=False, ) diff --git a/Source/BoundaryConditions/PEC_Insulator.cpp b/Source/BoundaryConditions/PEC_Insulator.cpp index b9926e4bf22..b6b6bcf08ea 100644 --- a/Source/BoundaryConditions/PEC_Insulator.cpp +++ b/Source/BoundaryConditions/PEC_Insulator.cpp @@ -69,7 +69,7 @@ namespace bool GuardCell = false; bool isInsulatorBoundary = false; amrex::Real sign = +1._rt; - bool is_normal_to_boundary; + bool is_normal_to_boundary = false; amrex::Real field_value = 0._rt; bool set_field = false; // Loop over all dimensions diff --git a/Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp b/Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp index 96e92b80359..ce39265e720 100644 --- a/Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp +++ b/Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp @@ -128,22 +128,22 @@ WarpX::AddMagnetostaticFieldLabFrame() // const amrex::Real magnetostatic_absolute_tolerance = self_fields_absolute_tolerance*PhysConst::c; // temporary fix!!! - const amrex::Real magnetostatic_absolute_tolerance = 0.0; - amrex::Real self_fields_required_precision; + const amrex::Real absolute_tolerance = 0.0; + amrex::Real required_precision; if constexpr (std::is_same::value) { - self_fields_required_precision = 1e-5; + required_precision = 1e-5; } else { - self_fields_required_precision = 1e-11; + required_precision = 1e-11; } - const int self_fields_max_iters = 200; - const int self_fields_verbosity = 2; + const int verbosity = 2; computeVectorPotential( m_fields.get_mr_levels_alldirs(FieldType::current_fp, finest_level), m_fields.get_mr_levels_alldirs(FieldType::vector_potential_fp_nodal, finest_level), - self_fields_required_precision, magnetostatic_absolute_tolerance, self_fields_max_iters, - self_fields_verbosity); + required_precision, absolute_tolerance, magnetostatic_solver_max_iters, + verbosity + ); } /* Compute the vector potential `A` by solving the Poisson equation with `J` as diff --git a/Source/Parallelization/WarpXRegrid.cpp b/Source/Parallelization/WarpXRegrid.cpp index a0a2d4929df..7adc00ed523 100644 --- a/Source/Parallelization/WarpXRegrid.cpp +++ b/Source/Parallelization/WarpXRegrid.cpp @@ -320,7 +320,7 @@ WarpX::ComputeCostsHeuristic (amrex::VectoroverlapsWith(lo, hi)) { return; } - } + // Skip cells that do not overlap with the bounds specified by the user (xmin/xmax, ymin/ymax, zmin/zmax) + auto lo = getCellCoords(overlap_corner, dx, {0._rt, 0._rt, 0._rt}, iv); + auto hi = getCellCoords(overlap_corner, dx, {1._rt, 1._rt, 1._rt}, iv); + if (!flux_pos->overlapsWith(lo, hi)) { return; } auto index = overlap_box.index(iv); // Take into account refined injection region diff --git a/Source/WarpX.H b/Source/WarpX.H index 73998d6faf2..56d4f879de8 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -902,6 +902,7 @@ public: // Magnetostatic Solver Interface MagnetostaticSolver::VectorPoissonBoundaryHandler m_vector_poisson_boundary_handler; + int magnetostatic_solver_max_iters = 200; void ComputeMagnetostaticField (); void AddMagnetostaticFieldLabFrame (); void computeVectorPotential (ablastr::fields::MultiLevelVectorField const& curr, diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 965235e1078..75aa964da3a 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -684,6 +684,7 @@ WarpX::ReadParameters () poisson_solver_id!=PoissonSolverAlgo::IntegratedGreenFunction, "To use the FFT Poisson solver, compile with WARPX_USE_FFT=ON."); #endif + utils::parser::queryWithParser(pp_warpx, "self_fields_max_iters", magnetostatic_solver_max_iters); WARPX_ALWAYS_ASSERT_WITH_MESSAGE( ( diff --git a/Tools/machines/perlmutter-nersc/perlmutter_cpu_warpx.profile.example b/Tools/machines/perlmutter-nersc/perlmutter_cpu_warpx.profile.example index 488d53c6af9..a7493ecd4bc 100644 --- a/Tools/machines/perlmutter-nersc/perlmutter_cpu_warpx.profile.example +++ b/Tools/machines/perlmutter-nersc/perlmutter_cpu_warpx.profile.example @@ -7,7 +7,7 @@ if [ -z ${proj-} ]; then echo "WARNING: The 'proj' variable is not yet set in yo # required dependencies module load cpu -module load cmake/3.24.3 +module load cmake/3.30.2 module load cray-fftw/3.3.10.6 # optional: for QED support with detailed tables diff --git a/Tools/machines/perlmutter-nersc/perlmutter_gpu_warpx.profile.example b/Tools/machines/perlmutter-nersc/perlmutter_gpu_warpx.profile.example index 7e76d1366a3..5d413db71e1 100644 --- a/Tools/machines/perlmutter-nersc/perlmutter_gpu_warpx.profile.example +++ b/Tools/machines/perlmutter-nersc/perlmutter_gpu_warpx.profile.example @@ -12,7 +12,7 @@ module load craype module load craype-x86-milan module load craype-accel-nvidia80 module load cudatoolkit -module load cmake/3.24.3 +module load cmake/3.30.2 # optional: for QED support with detailed tables export BOOST_ROOT=/global/common/software/spackecp/perlmutter/e4s-23.08/default/spack/opt/spack/linux-sles15-zen3/gcc-12.3.0/boost-1.83.0-nxqk3hnci5g3wqv75wvsmuke3w74mzxi diff --git a/cmake/dependencies/pybind11.cmake b/cmake/dependencies/pybind11.cmake index 50b00013f7a..e90b56b2d38 100644 --- a/cmake/dependencies/pybind11.cmake +++ b/cmake/dependencies/pybind11.cmake @@ -37,7 +37,7 @@ function(find_pybind11) mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED_FETCHEDpybind11) endif() else() - find_package(pybind11 2.12.0 CONFIG REQUIRED) + find_package(pybind11 2.13.0 CONFIG REQUIRED) message(STATUS "pybind11: Found version '${pybind11_VERSION}'") endif() endfunction() @@ -52,7 +52,7 @@ option(WarpX_pybind11_internal "Download & build pybind11" ON) set(WarpX_pybind11_repo "https://github.com/pybind/pybind11.git" CACHE STRING "Repository URI to pull and build pybind11 from if(WarpX_pybind11_internal)") -set(WarpX_pybind11_branch "v2.12.0" +set(WarpX_pybind11_branch "v2.13.6" CACHE STRING "Repository branch for WarpX_pybind11_repo if(WarpX_pybind11_internal)") diff --git a/setup.py b/setup.py index 0feb0a710d4..cb98d6371f5 100644 --- a/setup.py +++ b/setup.py @@ -307,7 +307,7 @@ def build_extension(self, ext): cmdclass=cmdclass, # scripts=['warpx_1d', 'warpx_2d', 'warpx_rz', 'warpx_3d'], zip_safe=False, - python_requires=">=3.8", + python_requires=">=3.8", # left for CI, truly ">=3.9" # tests_require=['pytest'], install_requires=install_requires, # see: src/bindings/python/cli @@ -336,10 +336,11 @@ def build_extension(self, ext): "Topic :: Scientific/Engineering :: Physics", "Programming Language :: C++", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ( "License :: OSI Approved :: " "BSD License" ), # TODO: use real SPDX: BSD-3-Clause-LBNL