Skip to content

Commit

Permalink
Change docstrings so they render correctly with sphinx.
Browse files Browse the repository at this point in the history
Sphinx doesn't like ampersands.

docathon
  • Loading branch information
ketch committed Mar 10, 2017
1 parent 4881129 commit eb99ef0
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
# PyClaw-specific files to ignore
_output
_plots
_plots*
petclaw.log
pyclaw.log
.noseids
_build
build
*.dSYM

# symlink to examples directory
src/pyclaw/examples
2 changes: 1 addition & 1 deletion examples/advection_1d/advection_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Solve the linear advection equation:
.. math::
q_t + u q_x & = 0.
q_t + u q_x = 0.
Here q is the density of some conserved quantity and u is the velocity.
Expand Down
4 changes: 2 additions & 2 deletions examples/advection_2d/advection_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Solve the two-dimensional advection equation
.. math::
q_t + u q_x + v q_y & = 0
.. math::
q_t + u q_x + v q_y = 0
Here q is a conserved quantity, and (u,v) is the velocity vector.
"""
Expand Down
4 changes: 2 additions & 2 deletions examples/advection_2d_annulus/advection_annulus.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Solve the linear advection equation:
.. math::
q_t + (u(x,y) q)_x + (v(x,y) q)_y & = 0
.. math::
q_t + (u(x,y) q)_x + (v(x,y) q)_y = 0
in an annular domain, using a mapped grid.
Expand Down
4 changes: 2 additions & 2 deletions examples/advection_reaction_2d/advection_reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Solve the 2D advection-reaction problem
.. math::
p_t + u(x,y,t) p_x + v(x,y,t) p_y & = \epsilon q
q_t + u(x,y,t) q_x + v(x,y,t) q_y & = \epsilon p
p_t + u(x,y,t) p_x + v(x,y,t) p_y = \epsilon q \\
q_t + u(x,y,t) q_x + v(x,y,t) q_y = \epsilon p
Note that the left hand side of this system is the non-conservative transport
equation for p and q. The Riemann solver assumes that velocities are specified
Expand Down
2 changes: 1 addition & 1 deletion examples/burgers_1d/burgers_1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Solve the inviscid Burgers' equation:
.. math::
q_t + \frac{1}{2} (q^2)_x & = 0.
q_t + \frac{1}{2} (q^2)_x = 0.
This is a nonlinear PDE often used as a very simple
model for fluid dynamics.
Expand Down
2 changes: 1 addition & 1 deletion examples/euler_2d/quadrants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# encoding: utf-8
"""
r"""
Euler 2D Quadrants example
==========================
Expand Down
10 changes: 5 additions & 5 deletions examples/euler_2d/shock_forward_step.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/env python
# encoding: utf-8
"""
r"""
Compressible Euler flow over a forward-facing step
==================================================
Solve the Euler equations of compressible fluid dynamics in 2D:
.. math::
\rho_t + (\rho u)_x + (\rho v)_y & = 0 \\
(\rho u)_t + (\rho u^2 + p)_x + (\rho uv)_y & = 0 \\
(\rho v)_t + (\rho uv)_x + (\rho v^2 + p)_y & = 0 \\
E_t + (u (E + p) )_x + (v (E + p))_y & = 0.
\rho_t + (\rho u)_x + (\rho v)_y = 0 \\
(\rho u)_t + (\rho u^2 + p)_x + (\rho uv)_y = 0 \\
(\rho v)_t + (\rho uv)_x + (\rho v^2 + p)_y = 0 \\
E_t + (u (E + p) )_x + (v (E + p))_y = 0.
Here :math:`\rho` is the density, (u,v) is the velocity, and E is the total energy.
Expand Down
4 changes: 2 additions & 2 deletions examples/kpp/kpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
Solve the KPP equation:
.. math::
q_t + (\sin(q))_x + (\cos(q))_y & = 0
.. math::
q_t + (\sin(q))_x + (\cos(q))_y = 0
first proposed by Kurganov, Petrova, and Popov. It is challenging for schemes
with low numerical viscosity to capture the solution accurately.
Expand Down
8 changes: 4 additions & 4 deletions examples/shallow_2d/radial_dam_break.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
Solve the 2D shallow water equations:
.. :math:
h_t + (hu)_x + (hv)_y & = 0 \\
(hu)_t + (hu^2 + \frac{1}{2}gh^2)_x + (huv)_y & = 0 \\
(hv)_t + (huv)_x + (hv^2 + \frac{1}{2}gh^2)_y & = 0.
.. math::
h_t + (hu)_x + (hv)_y = 0 \\
(hu)_t + (hu^2 + \frac{1}{2}gh^2)_x + (huv)_y = 0 \\
(hv)_t + (huv)_x + (hv^2 + \frac{1}{2}gh^2)_y = 0.
The initial condition is a circular area with high depth surrounded by lower-depth water.
The top and right boundary conditions reflect, while the bottom and left boundaries
Expand Down

0 comments on commit eb99ef0

Please sign in to comment.