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