You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revert the classical_physics example-group split (#905)
Reverts #904. It broke the docs build on master.
Splitting the shared `@example physics` block into per-topic groups gives each group its own
module, so every name a group uses must be defined *within that group*. #904 fixed one escapee
(`ODERKN`) but not all of them: the `double-pendulum` group also uses `g`, which is defined in
an earlier block, so `makedocs` fails with
```
UndefVarError: `g` not defined in `Main.var"__atexample__named__double-pendulum"`
```
and the following block then cascades on `sol`.
Restoring the single `physics` group unbreaks the build. The split is still worth doing — it is
a real readability improvement — but it needs every cross-block name resolved first, which is
best verified by a full docs build before merging rather than after.
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/src/examples/classical_physics.md
+17-18Lines changed: 17 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ If you're getting some cold feet to jump in to DiffEq land, here are some handcr
12
12
13
13
The Radioactive decay problem is the first order linear ODE problem of an exponential with a negative coefficient, which represents the half-life of the process in question. Should the coefficient be positive, this would represent a population growth equation. ``λ`` is known as the decay rate, and can be related to the half-life as ``λ = \ln(2)/t_{1/2}``.
14
14
15
-
```@example
15
+
```@example physics
16
16
import OrdinaryDiffEq as ODE, Plots
17
17
Plots.gr()
18
18
@@ -70,7 +70,7 @@ with ``c_1``, ``c_2`` constants determined by the initial conditions such that
70
70
Instead of transforming this to a system of ODEs to solve with `ODEProblem`,
71
71
we can use `SecondOrderODEProblem` as follows.
72
72
73
-
```@example
73
+
```@example physics
74
74
# Simple Harmonic Oscillator Problem
75
75
import OrdinaryDiffEq as ODE
76
76
import OrdinaryDiffEqRKN as ODERKN # DPRKN6
@@ -135,7 +135,7 @@ of first order ODEs by employing the notation ``ω(t) = \dot{θ}``.
135
135
\end{align*}
136
136
```
137
137
138
-
```@examplesimple-pendulum
138
+
```@examplephysics
139
139
# Simple Pendulum Problem
140
140
import OrdinaryDiffEq as ODE, Plots
141
141
@@ -168,7 +168,7 @@ Plots.plot(
168
168
169
169
So now we know that behaviour of the position versus time. However, it will be useful to us to look at the phase space of the pendulum, i.e., and representation of all possible states of the system in question (the pendulum) by looking at its velocity and position. Phase space analysis is ubiquitous in the analysis of dynamical systems, and thus we will provide a few facilities for it.
170
170
171
-
```@examplesimple-pendulum
171
+
```@examplephysics
172
172
p = Plots.plot(
173
173
sol, vars = (1, 2), xlims = (-9, 9), title = "Phase Space Plot",
0 commit comments