@@ -18,21 +18,36 @@ Astronomy & Computing `[paper link] <http://adsabs.harvard.edu/abs/2013arXiv1306
1818Directory structure
1919-------------------
2020
21+ pyro follows a standard python package structure. The main directory
22+ (called ``pyro2/ `` for historical reasons) contains:
23+
24+ * ``docs/ `` : The documentation in Sphinx format
25+
26+ * ``examples/ `` : Some example notebooks
27+
28+ * ``paper/ `` : the original JOSS paper
29+
30+ * ``presentations/ `` : some presentations given on pyro in the past
31+
32+ * ``pyro/ `` : the main source directory
33+
34+ * ``www/ `` : the logo used in the website
35+
36+ It is at this level (``pyro2/ ``) that the installation of pyro is done (via ``setup.py ``).
37+
38+ ``pyro/ ``
39+ ^^^^^^^^^
40+
41+ The main code is all contained in the ``pyro/ `` subdirectory. Here we discuss that.
42+
2143The files for each solver are in their own sub-directory, with
2244additional sub-directories for the mesh and utilities. Each solver has
2345two sub-directories: ``problems/ `` and ``tests/ ``. These store the
2446different problem setups for the solver and reference output for
2547testing.
2648
27- Your ``PYTHONPATH `` environment variable should be set to include the
28- top-level ``pyro2/ `` directory.
29-
3049The overall structure is:
3150
32- * ``pyro2/ ``: This is the top-level directory. The main driver,
33- ``pyro_sim.py ``, is here, and all pyro simulations should be run from
34- this directory.
35-
3651* ``advection/ ``: The linear advection equation solver using the CTU
3752 method. All advection-specific routines live here.
3853
@@ -127,13 +142,16 @@ The overall structure is:
127142 modes.
128143
129144
145+
146+
130147Numba
131148-----
132149
133- ``numba `` is used to speed up some critical portions of the code. Numba is a *just-in-time compiler * for python. When a call is first
134- made to a function decorated with Numba's ``@njit `` decorator, it is compiled to
135- machine code 'just-in-time' for it to be executed. Once compiled, it can then
136- run at (near-to) native machine code speed.
150+ Numba is used to speed up some critical portions of the code. Numba is
151+ a *just-in-time compiler * for python. When a call is first made to a
152+ function decorated with Numba's ``@njit `` decorator, it is compiled to
153+ machine code 'just-in-time' for it to be executed. Once compiled, it
154+ can then run at (near-to) native machine code speed.
137155
138156We also use Numba's ``cache=True `` option, which means that once the
139157code is compiled, Numba will write the code into a file-based cache. The next
@@ -145,8 +163,8 @@ simulation.
145163Main driver
146164-----------
147165
148- All the solvers use the same driver, the main ``pyro_sim.py `` script. The
149- flowchart for the driver is:
166+ All the solvers use the same driver, the main ``pyro_sim.py `` script,
167+ contained in `` pyro2/pyro/ ``. The flowchart for the driver is:
150168
151169* parse runtime parameters
152170
0 commit comments