Skip to content

Commit 10def2d

Browse files
authored
Docs: Dimensionality (#1020)
Document the conventions that go with the three dimensional compilation variants of WarpX and what they imply in build and source.
1 parent 91e9a8d commit 10def2d

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

Docs/source/building/building.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _building-source:
2+
13
Building/installing WarpX
24
=========================
35

Docs/source/developers/developers.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Our Doxygen API documentation in classic formatting `is located here <../_static
1212

1313
amrex_basics
1414
repo_organization
15+
dimensionality
1516
fields
1617
particles
1718
initialization
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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

Comments
 (0)