Skip to content

Commit

Permalink
some formatting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
j-fu committed Dec 7, 2024
1 parent 1d07ac6 commit 106e6b4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions examples/examples1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function runtests()
@test numbers_match(interval_localref(), 27, 26, 2)
@test numbers_match(interval_multiregion(), 21, 20, 3)
@test numbers_match(interval_subgrid(), 51, 50, 2)
nothing
return nothing
end

# Plot generation
Expand All @@ -67,5 +67,5 @@ function generateplots(picdir; Plotter = nothing)
Plotter.save(joinpath(picdir, "interval_multiregion.png"), gridplot(interval_multiregion(); Plotter, size, legend))
Plotter.save(joinpath(picdir, "interval_subgrid.png"), gridplot(interval_subgrid(); Plotter, size, legend))
end
nothing
return nothing
end
6 changes: 3 additions & 3 deletions examples/examples2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function rectangle_multiregion()
bfacemask!(grid, [0.0, 0.0], [0.0, 0.5], 5)
bfacemask!(grid, [1.0, 0.0], [1.0, 0.5], 6)
bfacemask!(grid, [0.0, 0.5], [1.0, 0.5], 7)
grid
return grid
end
# ![](rectangle_multiregion.png)

Expand Down Expand Up @@ -108,7 +108,7 @@ function runtests()
@test numbers_match(g, 187, 306, 66)
@test numbers_match(sg, 17, 16, 0)
@test issorted(view(sg[Coordinates], 1, :))
nothing
return nothing
end

# Plot generation
Expand All @@ -130,5 +130,5 @@ function generateplots(picdir; Plotter = nothing)
fname = joinpath(picdir, "sorted_subgrid.png")
Plotter.save(fname, reveal(p))
end
nothing
return nothing
end
6 changes: 3 additions & 3 deletions examples/examples3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ function runtests()
@test numbers_match(quadrilateral(), 330, 1200, 440)
@test mask_bedges()
@test numbers_match(cross3d(), 189, 480, 344)
nothing
return nothing
end

# Plot generation
using GridVisualize
function generateplots(picdir; Plotter = nothing)
if isdefined(Plotter, :Makie)
if isdefined(Plotter, :Makie)
size = (400, 400)
Plotter.save(joinpath(picdir, "quadrilateral.png"), gridplot(quadrilateral(); Plotter, size))
Plotter.save(joinpath(picdir, "cross3d.png"), gridplot(cross3d(); Plotter, size))
end
nothing
return nothing
end
4 changes: 2 additions & 2 deletions examples/gmsh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function runtests()
@test ok(gmsh_t1())
@test ok(gmsh_t4())
@test ok(gmsh_t5())
nothing
return nothing
end

# Plot generation
Expand All @@ -326,5 +326,5 @@ function generateplots(picdir; Plotter = nothing)
Plotter.save(joinpath(picdir, "gmsh_t4.png"), gridplot(gmsh_t4(); Plotter, size))
Plotter.save(joinpath(picdir, "gmsh_t5.png"), gridplot(gmsh_t5(); Plotter, size))
end
nothing
return nothing
end
6 changes: 3 additions & 3 deletions examples/vtk_write.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function grid3D_test(filename::String)
cell_data = cell_data,
field_data = field_data
)
nothing
return nothing

end

Expand All @@ -35,7 +35,7 @@ function grid2D_test(filename::String)
cell_data = cell_data,
field_data = field_data
)
nothing
return nothing
end

function grid1D_test(filename::String)
Expand All @@ -53,5 +53,5 @@ function grid1D_test(filename::String)
cell_data = cell_data,
field_data = field_data
)
nothing
return nothing
end

0 comments on commit 106e6b4

Please sign in to comment.