|
| 1 | +.. _developers-dimensionality: |
| 2 | + |
| 3 | +Dimensionality |
| 4 | +============== |
| 5 | + |
| 6 | +This section describes the handling of dimensionality in WarpX. |
| 7 | + |
| 8 | +Build Options |
| 9 | +------------- |
| 10 | + |
| 11 | +========== =================== |
| 12 | +Dimensions Makefile Option |
| 13 | +========== =================== |
| 14 | +**3D3V** ``DIM=3`` |
| 15 | +**2D3V** ``DIM=2`` |
| 16 | +**RZ** ``USE_RZ=TRUE`` |
| 17 | +========== =================== |
| 18 | + |
| 19 | +Notet that ``DIM`` is ignored (force-set to ``2``) as soon as ``USE_RZ`` is set to ``TRUE``. |
| 20 | + |
| 21 | +See :ref:`building from source <building-source>` for further details. |
| 22 | + |
| 23 | +Defines |
| 24 | +------- |
| 25 | + |
| 26 | +Depending on the build variant of WarpX, the following preprocessor macros will be set: |
| 27 | + |
| 28 | +================== =========== =========== =========== |
| 29 | +Macro 3D3V 2D3V RZ |
| 30 | +================== =========== =========== =========== |
| 31 | +``AMREX_SPACEDIM`` ``3`` ``2`` ``2`` |
| 32 | +``WARPX_DIM_XZ`` *undefined* **defined** *undefined* |
| 33 | +``WARPX_DIM_RZ`` *undefined* *undefined* **defined** |
| 34 | +================== =========== =========== =========== |
| 35 | + |
| 36 | +At the same time, the following conventions will apply: |
| 37 | + |
| 38 | +==================== =========== =========== =========== |
| 39 | +**Convention** **3D3V** **2D3V** **RZ** |
| 40 | +-------------------- ----------- ----------- ----------- |
| 41 | +*Fields* |
| 42 | +----------------------------------------------------------- |
| 43 | +AMReX Box dimensions ``3`` ``2`` ``2`` |
| 44 | +WarpX axis labels ``x, y, z`` ``x, z`` ``x, z`` |
| 45 | +-------------------- ----------- ----------- ----------- |
| 46 | +*Particles* |
| 47 | +----------------------------------------------------------- |
| 48 | +AMReX AoS ``.pos()`` ``0, 1, 2`` ``0, 1`` ``0, 1`` |
| 49 | +WarpX position names ``x, y, z`` ``x, z`` ``r, z`` |
| 50 | +extra SoA attribute ``theta`` |
| 51 | +==================== =========== =========== =========== |
| 52 | + |
| 53 | +Please see the following sections for particle AoS and SoA details. |
0 commit comments