Skip to content

Commit 643ce55

Browse files
committed
fix some docs links
1 parent 430b1d3 commit 643ce55

9 files changed

Lines changed: 53 additions & 56 deletions

docs/source/advection_basics.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ with different spatial and temporal intergration schemes.
1616
``advection`` solver
1717
--------------------
1818

19-
:py:mod:`advection` implements the directionally unsplit corner
19+
:py:mod:`pyro.advection` implements the directionally unsplit corner
2020
transport upwind algorithm :cite:`colella:1990` with piecewise linear reconstruction.
2121
This is an overall second-order accurate method, with timesteps restricted
2222
by
@@ -33,7 +33,7 @@ The parameters for this solver are:
3333
``advection_fv4`` solver
3434
------------------------
3535

36-
:py:mod:`advection_fv4` uses a fourth-order accurate finite-volume
36+
:py:mod:`pyro.advection_fv4` uses a fourth-order accurate finite-volume
3737
method with RK4 time integration, following the ideas in
3838
:cite:`mccorquodalecolella`. It can be thought of as a
3939
method-of-lines integration, and as such has a slightly more restrictive
@@ -53,7 +53,7 @@ The parameters for this solver are:
5353
``advection_nonuniform`` solver
5454
-------------------------------
5555

56-
:py:mod:`advection_nonuniform` models advection with a non-uniform
56+
:py:mod:`pyro.advection_nonuniform` models advection with a non-uniform
5757
velocity field. This is used to implement the slotted disk problem
5858
from :cite:`ZALESAK1979335`. The basic method is similar to the
5959
algorithm used by the main ``advection`` solver.
@@ -65,7 +65,7 @@ The paramters for this solver are:
6565
``advection_rk`` solver
6666
-----------------------
6767

68-
:py:mod:`advection_rk` uses a method of lines time-integration
68+
:py:mod:`pyro.advection_rk` uses a method of lines time-integration
6969
approach with piecewise linear spatial reconstruction for linear
7070
advection. This is overall second-order accurate, so it represents a
7171
simpler algorithm than the ``advection_fv4`` method (in particular, we
@@ -79,7 +79,7 @@ The parameter for this solver are:
7979
``advection_weno`` solver
8080
-------------------------
8181

82-
:py:mod:`advection_weno` uses a WENO reconstruction and method of
82+
:py:mod:`pyro.advection_weno` uses a WENO reconstruction and method of
8383
lines time-integration
8484

8585

docs/source/compressible_basics.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ direction is allowed.
2929
``compressible`` solver
3030
-----------------------
3131

32-
:py:mod:`compressible` is based on a directionally unsplit (the corner
32+
:py:mod:`pyro.compressible` is based on a directionally unsplit (the corner
3333
transport upwind algorithm) piecewise linear method for the Euler
3434
equations, following :cite:`colella:1990`. This is overall second-order
3535
accurate.
@@ -41,7 +41,7 @@ The parameters for this solver are:
4141
``compressible_rk`` solver
4242
--------------------------
4343

44-
:py:mod:`compressible_rk` uses a method of lines time-integration
44+
:py:mod:`pyro.compressible_rk` uses a method of lines time-integration
4545
approach with piecewise linear spatial reconstruction for the Euler
4646
equations. This is overall second-order accurate.
4747

@@ -52,7 +52,7 @@ The parameters for this solver are:
5252
``compressible_fv4`` solver
5353
---------------------------
5454

55-
:py:mod:`compressible_fv4` uses a 4th order accurate method with RK4
55+
:py:mod:`pyro.compressible_fv4` uses a 4th order accurate method with RK4
5656
time integration, following :cite:`mccorquodalecolella`.
5757

5858
The parameter for this solver are:
@@ -63,9 +63,9 @@ The parameter for this solver are:
6363
``compressible_sdc`` solver
6464
---------------------------
6565

66-
:py:mod:`compressible_sdc` uses a 4th order accurate method with
66+
:py:mod:`pyro.compressible_sdc` uses a 4th order accurate method with
6767
spectral-deferred correction (SDC) for the time integration. This
68-
shares much in common with the :py:mod:`compressible_fv4` solver, aside from
68+
shares much in common with the :py:mod:`pyro.compressible_fv4` solver, aside from
6969
how the time-integration is handled.
7070

7171
The parameters for this solver are:
@@ -78,12 +78,12 @@ Example problems
7878

7979
.. note::
8080

81-
The 4th-order accurate solver (:py:mod:`compressible_fv4`) requires that
81+
The 4th-order accurate solver (:py:mod:`pyro.compressible_fv4`) requires that
8282
the initialization create cell-averages accurate to 4th-order. To
8383
allow for all the solvers to use the same problem setups, we assume
8484
that the initialization routines initialize cell-centers (which is
8585
fine for 2nd-order accuracy), and the
86-
:func:`preevolve() <compressible_fv4.simulation.Simulation.preevolve>` method will convert
86+
:func:`preevolve() <pyro.compressible_fv4.simulation.Simulation.preevolve>` method will convert
8787
these to cell-averages automatically after initialization.
8888

8989

docs/source/design.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ time you run the same bit of code, Numba will use the saved version rather than
141141
compiling the code again, saving some compilation time at the start of the
142142
simulation.
143143

144-
.. note::
145-
146-
Because we have chosen to cache the compiled code, Numba will save it in the ``__pycache__`` directories. If you change the code, a new version will be compiled and saved, but the old version will not be deleted. Over time, you may end up with many unneeded files saved in the ``__pycache__`` directories. To clean up these files, you can run ``./mk.sh clean`` in the main ``pyro2`` directory.
147144

148145
Main driver
149146
-----------

docs/source/diffusion_basics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pyro solves the constant-conductivity diffusion equation:
77
88
\frac{\partial \phi}{\partial t} = k \nabla^2 \phi
99
10-
This is done implicitly using multigrid, using the solver :py:mod:`diffusion`.
10+
This is done implicitly using multigrid, using the solver :py:mod:`pyro.diffusion`.
1111

1212
The diffusion equation is discretized using Crank-Nicolson
1313
differencing (this makes the diffusion operator time-centered) and the

docs/source/mesh_basics.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ discretization. The basic theory of such methods is discussed in
88
.. note::
99

1010
The core data structure that holds data on the grid is
11-
:func:`CellCenterData2d <mesh.patch.CellCenterData2d>`. This does
11+
:func:`CellCenterData2d <pyro.mesh.patch.CellCenterData2d>`. This does
1212
not distinguish between cell-centered data and cell-averages. This
1313
is fine for methods that are second-order accurate, but for
14-
higher-order methods, the :func:`FV2d <mesh.fv.FV2d>` class has
14+
higher-order methods, the :func:`FV2d <pyro.mesh.fv.FV2d>` class has
1515
methods for converting between the two data centerings.
1616

1717

18-
:mod:`mesh.patch <mesh.patch>` implementation and use
19-
-----------------------------------------------------
18+
:mod:`mesh.patch <pyro.mesh.patch>` implementation and use
19+
----------------------------------------------------------
2020

2121
We import the basic mesh functionality as:
2222

@@ -29,38 +29,38 @@ We import the basic mesh functionality as:
2929
3030
There are several main objects in the patch class that we interact with:
3131

32-
* :func:`patch.Grid2d <mesh.patch.Grid2d>`: this is the main grid
32+
* :func:`patch.Grid2d <pyro.mesh.patch.Grid2d>`: this is the main grid
3333
object. It is basically a container that holds the number of zones
3434
in each coordinate direction, the domain extrema, and the
3535
coordinates of the zones themselves (both at the edges and center).
3636

37-
* :func:`patch.CellCenterData2d <mesh.patch.CellCenterData2d>`: this
37+
* :func:`patch.CellCenterData2d <pyro.mesh.patch.CellCenterData2d>`: this
3838
is the main data object—it holds cell-centered data on a grid. To
39-
build a :func:`patch.CellCenterData2d <mesh.patch.CellCenterData2d>`
40-
object you need to pass in the :func:`patch.Grid2d <mesh.patch.Grid2d>`
39+
build a :func:`patch.CellCenterData2d <pyro.mesh.patch.CellCenterData2d>`
40+
object you need to pass in the :func:`patch.Grid2d <pyro.mesh.patch.Grid2d>`
4141
object that defines the mesh. The
42-
:func:`patch.CellCenterData2d <mesh.patch.CellCenterData2d>` object then
42+
:func:`patch.CellCenterData2d <pyro.mesh.patch.CellCenterData2d>` object then
4343
allocates storage for the unknowns that live on the grid. This class
4444
also provides methods to fill boundary conditions, retrieve the data
4545
in different fashions, and read and write the object from/to disk.
4646

47-
* :func:`fv.FV2d <mesh.fv.FV2d>`: this is a special class derived from
48-
:func:`patch.CellCenterData2d <mesh.patch.CellCenterData2d>` that implements some extra functions
47+
* :func:`fv.FV2d <pyro.mesh.fv.FV2d>`: this is a special class derived from
48+
:func:`patch.CellCenterData2d <pyro.mesh.patch.CellCenterData2d>` that implements some extra functions
4949
needed to convert between cell-center data and averages with
5050
fourth-order accuracy.
5151

52-
* :func:`bnd.BC <mesh.boundary.BC>`: This is simply a container that
52+
* :func:`bnd.BC <pyro.mesh.boundary.BC>`: This is simply a container that
5353
holds the names of the boundary conditions on each edge of the
5454
domain.
5555

56-
* :func:`ai.ArrayIndexer <mesh.array_indexer.ArrayIndexer>`: This is a
56+
* :func:`ai.ArrayIndexer <pyro.mesh.array_indexer.ArrayIndexer>`: This is a
5757
class that subclasses the NumPy ndarray and makes the data in the
5858
array know about the details of the grid it is defined on. In
5959
particular, it knows which cells are valid and which are the ghost
6060
cells, and it has methods to do the :math:`a_{i+1,j}` operations that are
6161
common in difference methods.
6262

63-
* :func:`integration.RKIntegrator <mesh.integration.RKIntegrator>`:
63+
* :func:`integration.RKIntegrator <pyro.mesh.integration.RKIntegrator>`:
6464
This class implements Runge-Kutta integration in time by managing a
6565
hierarchy of grids at different time-levels. A Butcher tableau
6666
provides the weights and evaluation points for the different stages
@@ -101,14 +101,14 @@ Jupyter notebook
101101

102102
A Jupyter notebook that illustrates some of the basics of working with
103103
the grid is provided as `mesh-examples.ipynb <https://github.com/python-hydro/pyro2/blob/main/mesh/mesh-examples.ipynb>`_. This will
104-
demonstrate, for example, how to use the :func:`ArrayIndexer <mesh.array_indexer.ArrayIndexer>` methods to
104+
demonstrate, for example, how to use the :func:`ArrayIndexer <pyro.mesh.array_indexer.ArrayIndexer>` methods to
105105
construct differences.
106106

107107

108108
Tests
109109
-----
110110

111-
The actual filling of the boundary conditions is done by the :func:`fill_BC <mesh.patch.CellCenterData2d.fill_BC>`
111+
The actual filling of the boundary conditions is done by the :func:`fill_BC <pyro.mesh.patch.CellCenterData2d.fill_BC>`
112112
method. The script ``bc_demo.py`` tests the various types of boundary
113113
conditions by initializing a small grid with sequential data, filling
114114
the BCs, and printing out the results.

docs/source/multigrid_basics.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ of grids. Chapter 9 of the `pdf notes <http://bender.astro.sunysb.edu/hydro_by_e
88

99
There are three solvers:
1010

11-
* The core solver, provided in the class :func:`MG.CellCenterMG2d <multigrid.MG.CellCenterMG2d>` solves constant-coefficient Helmholtz problems of the form
11+
* The core solver, provided in the class :func:`MG.CellCenterMG2d <pyro.multigrid.MG.CellCenterMG2d>` solves constant-coefficient Helmholtz problems of the form
1212
:math:`(\alpha - \beta \nabla^2) \phi = f`
1313

14-
* The class :func:`variable_coeff_MG.VarCoeffCCMG2d <multigrid.variable_coeff_MG.VarCoeffCCMG2d>` solves variable coefficient Poisson problems of the form
14+
* The class :func:`variable_coeff_MG.VarCoeffCCMG2d <pyro.multigrid.variable_coeff_MG.VarCoeffCCMG2d>` solves variable coefficient Poisson problems of the form
1515
:math:`\nabla \cdot (\eta \nabla \phi ) = f`. This class inherits the core functionality from ``MG.CellCenterMG2d``.
1616

17-
* The class :func:`general_MG.GeneralMG2d <multigrid.general_MG.GeneralMG2d>` solves a general elliptic
17+
* The class :func:`general_MG.GeneralMG2d <pyro.multigrid.general_MG.GeneralMG2d>` solves a general elliptic
1818
equation of the form :math:`\alpha \phi + \nabla \cdot ( \beta
1919
\nabla \phi) + \gamma \cdot \nabla \phi = f`. This class inherits
20-
the core functionality from :func:`MG.CellCenterMG2d <multigrid.MG.CellCenterMG2d>`.
20+
the core functionality from :func:`MG.CellCenterMG2d <pyro.multigrid.MG.CellCenterMG2d>`.
2121

2222
This solver is the only one to support inhomogeneous boundary
2323
conditions.

docs/source/output.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Several simply utilities exist to operate on output files
3939
Reading and plotting manually
4040
-----------------------------
4141

42-
pyro output data can be read using the :func:`util.io_pyro.read <util.io_pyro.read>` method. The following
42+
pyro output data can be read using the :func:`util.io_pyro.read <pyro.util.io_pyro.read>` method. The following
4343
sequence (done in a python session) reads in stored data (from the
4444
compressible Sedov problem) and plots data falling on a line in the x
4545
direction through the y-center of the domain (note: this will include

docs/source/particles_basics.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Particles
33

44
A solver for modelling particles.
55

6-
:mod:`particles.particles <particles.particles>` implementation and use
7-
-----------------------------------------------------------------------
6+
:mod:`particles.particles <pyro.particles.particles>` implementation and use
7+
----------------------------------------------------------------------------
88

99
We import the basic particles module functionality as:
1010

@@ -14,9 +14,9 @@ We import the basic particles module functionality as:
1414
1515
The particles solver is made up of two classes:
1616

17-
* :func:`Particle <particles.particles.Particle>`, which holds
17+
* :func:`Particle <pyro.particles.particles.Particle>`, which holds
1818
the data about a single particle (its position and velocity);
19-
* :func:`Particles <particles.particles.Particles>`, which holds the data
19+
* :func:`Particles <pyro.particles.particles.Particles>`, which holds the data
2020
about a collection of particles.
2121

2222
The particles are stored as a dictionary, and their positions are updated
@@ -27,20 +27,20 @@ function without otherwise affecting the behaviour of the module).
2727

2828
The particles can be initialized in a number of ways:
2929

30-
* :func:`randomly_generate_particles <particles.particles.Particles.randomly_generate_particles>`,
30+
* :func:`randomly_generate_particles <pyro.particles.particles.Particles.randomly_generate_particles>`,
3131
which randomly generates ``n_particles`` within the domain.
32-
* :func:`grid_generate_particles <particles.particles.Particles.grid_generate_particles>`,
32+
* :func:`grid_generate_particles <pyro.particles.particles.Particles.grid_generate_particles>`,
3333
which will generate approximately ``n_particles`` equally spaced in the
3434
x-direction and y-direction (note that it uses the same number of particles in
3535
each direction, so the spacing will be different in each direction if the
3636
domain is not square). The number of particles will be increased/decreased
3737
in order to fill the whole domain.
38-
* :func:`array_generate_particles <particles.particles.Particles.array_generate_particles>`,
38+
* :func:`array_generate_particles <pyro.particles.particles.Particles.array_generate_particles>`,
3939
which generates particles based on array of particle positions passed to the
4040
constructor.
4141
* The user can define their own ``particle_generator`` function and pass this into the
42-
:func:`Particles <particles.particles.Particles>` constructor. This function takes the number of particles to be
43-
generated and returns a dictionary of :func:`Particle <particles.particles.Particle>` objects.
42+
:func:`Particles <pyro.particles.particles.Particles>` constructor. This function takes the number of particles to be
43+
generated and returns a dictionary of :func:`Particle <pyro.particles.particles.Particle>` objects.
4444

4545
We can turn on/off the particles solver using the following runtime paramters:
4646

@@ -95,7 +95,7 @@ in as arguments to this function as they cannot be accessed using the standard
9595
Plotting particles
9696
------------------
9797

98-
Given the :func:`Particles <particles.particles.Particles>` object ``particles``, we can plot the particles by getting
98+
Given the :func:`Particles <pyro.particles.particles.Particles>` object ``particles``, we can plot the particles by getting
9999
their positions using
100100

101101
.. code-block:: python
@@ -128,7 +128,7 @@ x-position, we can plot them on the figure axis ``ax`` using the following code:
128128
ax.set_xlim([myg.xmin, myg.xmax])
129129
ax.set_ylim([myg.ymin, myg.ymax])
130130
131-
Applying this to the Kelvin-Helmholtz problem with the :mod:`compressible <compressible>` solver,
131+
Applying this to the Kelvin-Helmholtz problem with the :mod:`compressible <pyro.compressible>` solver,
132132
we can produce a plot such as the one below, where the particles have been
133133
plotted on top of the fluid density.
134134

docs/source/running.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Running
33

44
Pyro can be run in two ways: either from the commandline, using the ``pyro_sim.py``
55
script and passing in the solver, problem and inputs as arguments, or by using
6-
the :func:`Pyro <pyro_sim.pyro>` class.
6+
the :func:`Pyro <pyro.pyro_sim.pyro>` class.
77

88
Commandline
99
------------
@@ -49,16 +49,16 @@ above run, we could do:
4949
Pyro class
5050
----------
5151

52-
Alternatively, pyro can be run using the :func:`Pyro <pyro_sim.pyro>` class. This provides
52+
Alternatively, pyro can be run using the :func:`Pyro <pyro.pyro_sim.Pyro>` class. This provides
5353
an interface that enables simulations to be set up and run in a Jupyter notebook -- see
5454
``examples/examples.ipynb`` for an example notebook. A simulation can be set up and run
5555
by carrying out the following steps:
5656

57-
* create a :func:`Pyro <pyro_sim.pyro>` object, initializing it with a specific solver
57+
* create a :func:`Pyro <pyro.pyro_sim.Pyro>` object, initializing it with a specific solver
5858
* initialize the problem, passing in runtime parameters and inputs
5959
* run the simulation
6060

61-
For example, if we wished to use the :mod:`compressible <compressible>` solver to run the
61+
For example, if we wished to use the :mod:`compressible <pyro.compressible>` solver to run the
6262
Kelvin-Helmholtz problem ``kh``, we would do the following:
6363

6464
.. code-block:: python
@@ -71,7 +71,7 @@ Kelvin-Helmholtz problem ``kh``, we would do the following:
7171
7272
Instead of using an inputs file to define the problem parameters, we can define a
7373
dictionary of parameters and pass them into the :func:`initialize_problem
74-
<pyro_sim.pyro.initialize_problem>` function using the keyword argument ``inputs_dict``.
74+
<pyro.pyro_sim.Pyro.initialize_problem>` function using the keyword argument ``inputs_dict``.
7575
If an inputs file is also passed into the function, the parameters in the dictionary
7676
will override any parameters in the file. For example, if we wished to turn off
7777
visualization for the previous example, we would do:
@@ -84,8 +84,8 @@ visualization for the previous example, we would do:
8484
inputs_dict=parameters)
8585
8686
It's possible to evolve the simulation forward timestep by timestep manually using
87-
the :func:`single_step <pyro_sim.pyro.single_step>` function (rather than allowing
88-
:func:`run_sim <pyro_sim.pyro.run_sim>` to do this for us). To evolve our example
87+
the :func:`single_step <pyro.pyro_sim.Pyro.single_step>` function (rather than allowing
88+
:func:`run_sim <pyro.pyro_sim.Pyro.run_sim>` to do this for us). To evolve our example
8989
simulation forward by a single step, we'd run
9090

9191
.. code-block:: python
@@ -117,7 +117,7 @@ default value of any of these previously defined
117117
parameters. Additionally, any parameter can be specified at the end of
118118
the commandline, and these will be used to override the defaults. The
119119
collection of runtime parameters is stored in a
120-
:func:`RuntimeParameters <util.runparams.RuntimeParameters>` object.
120+
:func:`RuntimeParameters <pyro.util.runparams.RuntimeParameters>` object.
121121

122122
The ``runparams.py`` module in ``util/`` controls access to the runtime
123123
parameters. You can setup the runtime parameters, parse an inputs

0 commit comments

Comments
 (0)