Skip to content

Commit 761c825

Browse files
committed
few words on user-defined constants doc
1 parent 5c55400 commit 761c825

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Docs/source/running_cpp/parameters.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,13 @@ user-defined constant and ``x`` and ``y`` are variables. The names are case sens
107107
``(x>0)`` is `1` where `x>0` and `0` where `x<=0`. It allows the user to
108108
define functions by intervals. User-defined constants can be used in parsed
109109
functions only (i.e., ``density_function(x,y,z)`` and ``field_function(X,Y,t)``,
110-
see below). For example, parameter ``a0`` can be specified with:
110+
see below). User-defined constants can contain only letter, numbers and character _.
111+
The name of each constant has to begin with a letter. The following names are used
112+
by WarpX, and cannot be used as user-defined constants: `x`, `y`, `z`, `X`, `Y`, `t`.
113+
For example, parameters ``a0`` and ``z_plateau`` can be specified with:
111114

112115
* ``my_constants.a0 = 3.0``
116+
* ``my_constants.z_plateau = 150.e-6``
113117

114118
Particle initialization
115119
-----------------------

0 commit comments

Comments
 (0)