From 87df7436280e39efd5859071e0789e119750c1fc Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 6 Jan 2025 18:10:27 -0800 Subject: [PATCH] Sphinx: Fix Errors/Warnings Fix a few Sphinx errors/warnings that I saw when building locally. --- docs/source/usage/python.rst | 4 ++-- examples/cfchannel/README.rst | 30 ++++++++++++++++++++++-------- examples/expanding_beam/README.rst | 30 ++++++++++++++++++++++-------- 3 files changed, 46 insertions(+), 18 deletions(-) diff --git a/docs/source/usage/python.rst b/docs/source/usage/python.rst index ddda0a0d0..16df118cc 100644 --- a/docs/source/usage/python.rst +++ b/docs/source/usage/python.rst @@ -780,7 +780,7 @@ This module provides elements for the accelerator lattice. :param ds: Segment length in m. :param k: focusing strength in m^(-2) (if unit = 0) = (azimuthal magnetic field gradient in T/m) / (rigidity in T-m) - OR azimuthal magnetic field gradient in T/m (if unit = 1) + OR azimuthal magnetic field gradient in T/m (if unit = 1) :param unit: specification of units for plasma lens focusing strength :param dx: horizontal translation error in m :param dy: vertical translation error in m @@ -901,7 +901,7 @@ This module provides elements for the accelerator lattice. :param ds: Segment length in m. :param bscale: Scaling factor for on-axis magnetic field Bz in inverse meters (if unit = 0) = (magnetic field Bz in T) / (rigidity in T-m) - OR Magnetic field Bz in T (SI units, if unit = 1) + OR Magnetic field Bz in T (SI units, if unit = 1) :param cos_coefficients: array of ``float`` cosine coefficients in Fourier expansion of on-axis magnetic field Bz (optional); default is a thin-shell model from `DOI:10.1016/J.NIMA.2022.166706 `__ :param sin_coefficients: array of ``float`` sine coefficients in Fourier expansion of on-axis magnetic field Bz diff --git a/examples/cfchannel/README.rst b/examples/cfchannel/README.rst index 1f24365c0..6c96bb11d 100644 --- a/examples/cfchannel/README.rst +++ b/examples/cfchannel/README.rst @@ -81,28 +81,42 @@ The initial distribution used is a 6D waterbag. The beam second moments should remain nearly unchanged, except for some small emittance growth due to nonlinear space charge. This is tested using the second moments of the distribution. -In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:` +In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values. Run --- -This example can be run as a Python script (``python3 run_cfchannel_10nC.py``) or as an app with an input file (``impactx input_cfchannel_10nC.in``). +This example can be run as a Python script (``python3 run_cfchannel_10nC_fft.py``) or as an app with an input file (``impactx input_cfchannel_10nC_fft.in``). Each can also be prefixed with an `MPI executor `__, such as ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system. +We also provide the same example with the multi-grid (MLMG) Poisson solver. + .. tab-set:: - .. tab-item:: Python Script + .. tab-item:: Python Script (FFT) + + .. literalinclude:: run_cfchannel_10nC_fft.py + :language: python3 + :caption: You can copy this file from ``examples/cfchannel/run_cfchannel_10nC_fft.py``. + + .. tab-item:: Python Script (MLMG) - .. literalinclude:: run_cfchannel_10nC.py + .. literalinclude:: run_cfchannel_10nC_mlmg.py :language: python3 - :caption: You can copy this file from ``examples/cfchannel/run_cfchannel_10nC.py``. + :caption: You can copy this file from ``examples/cfchannel/run_cfchannel_10nC_mlmg.py``. + + .. tab-item:: App Input File (FFT) + + .. literalinclude:: input_cfchannel_10nC_fft.in + :language: ini + :caption: You can copy this file from ``examples/cfchannel/input_cfchannel_10nC_fft.in``. - .. tab-item:: App Input File + .. tab-item:: App Input File (MLMG) - .. literalinclude:: input_cfchannel_10nC.in + .. literalinclude:: input_cfchannel_10nC_mlmg.in :language: ini - :caption: You can copy this file from ``examples/cfchannel/input_cfchannel_10nC.in``. + :caption: You can copy this file from ``examples/cfchannel/input_cfchannel_10nC_mlmg.in``. Analyze diff --git a/examples/expanding_beam/README.rst b/examples/expanding_beam/README.rst index abe830a56..3512e3f58 100644 --- a/examples/expanding_beam/README.rst +++ b/examples/expanding_beam/README.rst @@ -25,24 +25,38 @@ Run This example can be run **either** as: -* **Python** script: ``python3 run_expanding.py`` or -* ImpactX **executable** using an input file: ``impactx input_expanding.in`` +* **Python** script: ``python3 run_expanding_fft.py`` or +* ImpactX **executable** using an input file: ``impactx input_expanding_fft.in`` For `MPI-parallel `__ runs, prefix these lines with ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system. +We also provide the same example with the multi-grid (MLMG) Poisson solver. + .. tab-set:: - .. tab-item:: Python: Script + .. tab-item:: Python: Script (FFT) + + .. literalinclude:: run_expanding_fft.py + :language: python3 + :caption: You can copy this file from ``examples/expanding/run_expanding_fft.py``. + + .. tab-item:: Python: Script (MLMG) - .. literalinclude:: run_expanding.py + .. literalinclude:: run_expanding_mlmg.py :language: python3 - :caption: You can copy this file from ``examples/expanding/run_expanding.py``. + :caption: You can copy this file from ``examples/expanding/run_expanding_mlmg.py``. + + .. tab-item:: Executable: Input File (FFT) + + .. literalinclude:: input_expanding_fft.in + :language: ini + :caption: You can copy this file from ``examples/expanding/input_expanding_fft.in``. - .. tab-item:: Executable: Input File + .. tab-item:: Executable: Input File (MLMG) - .. literalinclude:: input_expanding.in + .. literalinclude:: input_expanding_mlmg.in :language: ini - :caption: You can copy this file from ``examples/expanding/input_expanding.in``. + :caption: You can copy this file from ``examples/expanding/input_expanding_mlmg.in``. Analyze