Skip to content

Commit bb4664f

Browse files
authored
Merge pull request #328 from FourierFlows/ncc/fix-3dgrid-show
Fix show `grid.Lz` for `ThreeDGrid`
2 parents 3f685d0 + 1457d20 commit bb4664f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/domains.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ show(io::IO, g::ThreeDGrid{T}) where T =
537537
print(io, "ThreeDimensionalGrid\n",
538538
" ├───────────────────── Device: ", griddevice(g), '\n',
539539
" ├────────────────── FloatType: $T", '\n',
540-
" ├────────── size (Lx, Ly, Lz): ", (g.Lx, g.Ly, g.Ly), '\n',
540+
" ├────────── size (Lx, Ly, Lz): ", (g.Lx, g.Ly, g.Lz), '\n',
541541
" ├──── resolution (nx, ny, nz): ", (g.nx, g.ny, g.nz), '\n',
542542
" ├── grid spacing (dx, dy, dz): ", (g.dx, g.dy, g.dz), '\n',
543543
" ├──────────────────── domain: x ∈ [$(g.x[1]), $(g.x[end])]", '\n',

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ for dev in devices
117117

118118
@test repr(g₂) == "TwoDimensionalGrid\n ├───────────────── Device: "*FourierFlows.griddevice(g₂)*"\n ├────────────── FloatType: Float64\n ├────────── size (Lx, Ly): (6.283185307179586, 12.566370614359172)\n ├──── resolution (nx, ny): (6, 8)\n ├── grid spacing (dx, dy): (1.0471975511965976, 1.5707963267948966)\n ├───────────────── domain: x ∈ [-3.141592653589793, 2.094395102393195]\n | y ∈ [-6.283185307179586, 4.71238898038469]\n └─ aliased fraction: 0.3333333333333333"
119119

120-
@test repr(g₃) == "ThreeDimensionalGrid\n ├───────────────────── Device: "*FourierFlows.griddevice(g₃)*"\n ├────────────────── FloatType: Float64\n ├────────── size (Lx, Ly, Lz): (6.283185307179586, 12.566370614359172, 12.566370614359172)\n ├──── resolution (nx, ny, nz): (6, 8, 10)\n ├── grid spacing (dx, dy, dz): (1.0471975511965976, 1.5707963267948966, 0.3)\n ├──────────────────── domain: x ∈ [-3.141592653589793, 2.094395102393195]\n | y ∈ [-6.283185307179586, 4.71238898038469]\n | z ∈ [-1.5, 1.2]\n └─ aliased fraction: 0.3333333333333333"
120+
@test repr(g₃) == "ThreeDimensionalGrid\n ├───────────────────── Device: "*FourierFlows.griddevice(g₃)*"\n ├────────────────── FloatType: Float64\n ├────────── size (Lx, Ly, Lz): (6.283185307179586, 12.566370614359172, 3.0)\n ├──── resolution (nx, ny, nz): (6, 8, 10)\n ├── grid spacing (dx, dy, dz): (1.0471975511965976, 1.5707963267948966, 0.3)\n ├──────────────────── domain: x ∈ [-3.141592653589793, 2.094395102393195]\n | y ∈ [-6.283185307179586, 4.71238898038469]\n | z ∈ [-1.5, 1.2]\n └─ aliased fraction: 0.3333333333333333"
121121

122122
# Test no dealiasing
123123
g₁ = OneDGrid(nx, Lx; aliased_fraction = 0)

0 commit comments

Comments
 (0)