Skip to content

Commit 9aeee60

Browse files
committed
refactor: Format docstrings
1 parent 02db5ce commit 9aeee60

File tree

6 files changed

+0
-40
lines changed

6 files changed

+0
-40
lines changed

src/UltraDark.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ Take `n` steps with time step `Δt`
110110
```jldoctest
111111
julia> using UltraDark: take_steps!, Grids, OutputConfig, Config
112112
113-
114113
julia> take_steps!(
115114
Grids(1.0, 16),
116115
0,

src/config.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ See also: [`SimulationConfig`](@
4646
```jldoctest
4747
julia> using UltraDark
4848
49-
5049
julia> TimeStepOptions()
5150
TimeStepOptions(10, 1.0)
5251
```

src/grids.jl

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,10 @@ struct containing grids used in a simulation
1414
```jldoctest
1515
julia> using UltraDark
1616
17-
1817
julia> len = 1;
1918
20-
2119
julia> resol = 16;
2220
23-
2421
julia> Grids(len, resol);
2522
2623
```
@@ -137,7 +134,6 @@ Create an empty grid with length `length` and resolution `resol`
137134
```jldoctest
138135
julia> using UltraDark
139136
140-
141137
julia> Grids(1.0, 64);
142138
143139
```
@@ -161,7 +157,6 @@ Create an empty `length[1]`x`length[2]`x`length[3]` grid with resolution
161157
```jldoctest
162158
julia> using UltraDark
163159
164-
165160
julia> Grids((1.0, 1.0, 0.5), (64, 64, 32));
166161
167162
```
@@ -243,10 +238,8 @@ Calculate the Fourier frequencies of a box with side lengths `lengths` and resol
243238
```jldoctest
244239
julia> using UltraDark: k_vec
245240
246-
247241
julia> kvec = k_vec((2π, 2π, 2π), (4, 4, 4));
248242
249-
250243
julia> kvec[1]
251244
4-element AbstractFFTs.Frequencies{Float64}:
252245
0.0
@@ -307,16 +300,12 @@ Calculate the volume of each grid cell
307300
```jldoctest
308301
julia> using UltraDark
309302
310-
311303
julia> box_length = 1.0;
312304
313-
314305
julia> resol = 16;
315306
316-
317307
julia> g = Grids(box_length, resol);
318308
319-
320309
julia> dV(g) * resol^3 == box_length^3
321310
true
322311
```
@@ -335,19 +324,14 @@ Calculate the radial coordinate in a spherical coordinate system
335324
```jldoctest
336325
julia> using UltraDark
337326
338-
339327
julia> import UltraDark: radius_spherical, polar_angle, azimuthal_angle
340328
341-
342329
julia> box_length = 1.0;
343330
344-
345331
julia> resol = 16;
346332
347-
348333
julia> g = Grids(box_length, resol);
349334
350-
351335
julia> all(radius_spherical(g) .* sin.(polar_angle(g)) .* cos.(azimuthal_angle(g)) .≈ g.x)
352336
true
353337
@@ -420,19 +404,14 @@ Calculate the radial coordinate in cylindrical coordinates
420404
```jldoctest
421405
julia> using UltraDark
422406
423-
424407
julia> import UltraDark: radius_cylindrical, azimuthal_angle
425408
426-
427409
julia> box_length = 1.0;
428410
429-
430411
julia> resol = 16;
431412
432-
433413
julia> g = Grids(box_length, resol);
434414
435-
436415
julia> all(radius_cylindrical(g) .* cos.(azimuthal_angle(g)) .≈ g.x)
437416
true
438417
@@ -466,16 +445,12 @@ Calculate total mass of a density field
466445
```jldoctest
467446
julia> using UltraDark
468447
469-
470448
julia> g = Grids(1.0, 16);
471449
472-
473450
julia> g.ρx .= 0.0;
474451
475-
476452
julia> g.ρx[1, 1, 1] = 1.0;
477453
478-
479454
julia> UltraDark.mass(g) == 1.0 * (1.0 / 16)^3
480455
true
481456
```

src/pencil_grids.jl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@ struct containing grids used in a simulation
66
```jldoctest
77
julia> using UltraDark
88
9-
109
julia> len = 1;
1110
12-
1311
julia> resol = 16;
1412
15-
1613
julia> PencilGrids(len, resol);
1714
1815
```
@@ -159,7 +156,6 @@ Create an empty grid with length `length` and resolution `resol`. Uses `PencilF
159156
```jldoctest
160157
julia> using UltraDark
161158
162-
163159
julia> PencilGrids(1.0, 64);
164160
165161
```
@@ -184,7 +180,6 @@ Each grid is a `PencilArray`, allowing multiprocess FFTs.
184180
```jldoctest
185181
julia> using UltraDark
186182
187-
188183
julia> PencilGrids((1.0, 1.0, 0.5), (64, 64, 32));
189184
190185
```

src/summary.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,10 @@ The current time in the real world.
146146
```jldoctest
147147
julia> using UltraDark
148148
149-
150149
julia> t1 = Summary.WallTime();
151150
152-
153151
julia> t2 = Summary.WallTime(0.0, 1.0, 1e-1, Grids(1.0, 16), nothing, ());
154152
155-
156153
julia> t1.date < t2.date
157154
true
158155
```
@@ -267,10 +264,8 @@ which it was calculated.
267264
```jldoctest
268265
julia> using UltraDark
269266
270-
271267
julia> g = Grids(1.0, 16);
272268
273-
274269
julia> Summary.MeanDensity(g)
275270
UltraDark.Summary.MeanDensity(0.0, 4096)
276271
```
@@ -427,10 +422,8 @@ Total mass on a grid
427422
```jldoctest
428423
julia> using UltraDark
429424
430-
431425
julia> g = Grids(1.0, 16);
432426
433-
434427
julia> Summary.TotalMass(0.0, 1.0, 1e-1, g, nothing, ())
435428
UltraDark.Summary.TotalMass(0.0)
436429
```

src/time_step.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ be taken, and they should fit in `time_interval`.
1010
```jldoctest
1111
julia> using UltraDark: actual_time_step, TimeStepOptions
1212
13-
1413
julia> actual_time_step(0.11, 1, TimeStepOptions())
1514
(0.1, 10)
1615
```

0 commit comments

Comments
 (0)