Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for Parser #608

Merged
merged 1 commit into from
Oct 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/source/run/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
Input parameters
================

Parser
------

In HiPACE++ all input parameters are obtained through `amrex::Parser`, making it possible to
specify input parameters with expressions and not just numbers. User constants can be defined
in the input script with `my_constants`. Some Physical constants are already provided.

.. code-block:: bash

my_constants.ne = 1.25e24
my_constants.kp_inv = "clight / sqrt(ne * q_e^2 / (epsilon0 * m_e))"
beam.radius = "kp_inv / 2"

For a list of supported functions see the
`AMReX documentation <https://amrex-codes.github.io/amrex/docs_html/Basics.html#parser>`__.
Sometimes it is necessary to use double-quotes around expressions, especially when providing them
as command line parameters. Multi-line expressions are allowed if surrounded by double-quotes.

General parameters
------------------

Expand Down