Skip to content

Commit

Permalink
png instead of svg in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
j-fu committed Jun 7, 2024
1 parent 3811340 commit 6cc5af1
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ExtendableGrids"
uuid = "cfc395e8-590f-11e8-1f13-43a2532b2fa8"
authors = ["Juergen Fuhrmann <juergen.fuhrmann@wias-berlin.de>", "Christian Merdon <christian.merdon@wias-berlin.de>", "Johannes Taraz <johannes.taraz@gmail.com>"]
version = "1.6.0"
version = "1.6.1"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Triangulate = "f7e6ffb2-c36d-4f8f-a77e-16e897189344"
Documenter = "1"
julia = "1.9"
ExampleJuggler = "2"
CairoMakie = "0.12"
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Documenter, ExtendableGrids, ExampleJuggler, Gmsh
import CairoMakie
CairoMakie.activate!(; type = "svg", visible = false)
CairoMakie.activate!(; type = "png", visible = false)
ExampleJuggler.verbose!(true)
ExtendableGridsGmshExt=Base.get_extension(ExtendableGrids, :ExtendableGridsGmshExt)
function mkdocs()
Expand Down
16 changes: 8 additions & 8 deletions examples/examples1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function interval_from_vector()
X = collect(0:0.05:1)
grid = simplexgrid(X)
end
# ![](interval_from_vector.svg)
# ![](interval_from_vector.png)

#
# ## Interval with local refinement
Expand All @@ -19,7 +19,7 @@ function interval_localref()
X = glue(XLeft, XRight)
grid = simplexgrid(X)
end
# ![](interval_localref.svg)
# ![](interval_localref.png)

#
# ## Interval with multiple regions
Expand All @@ -31,7 +31,7 @@ function interval_multiregion()
bfacemask!(grid, [0.5], [0.5], 4)
grid
end
# ![](interval_multiregion.svg)
# ![](interval_multiregion.png)
#
# ## Multiple regions and subgrid
#
Expand All @@ -43,7 +43,7 @@ function interval_subgrid()
cellmask!(grid, [0.20], [0.5], 3)
subgrid(grid, [2, 3])
end
# ![](interval_subgrid.svg)
# ![](interval_subgrid.png)
# ## CI callbacks for [ExampleJuggler.jl](https://github.com/j-fu/ExampleJuggler.jl)
# Unit tests
using Test
Expand All @@ -61,9 +61,9 @@ function generateplots(picdir; Plotter = nothing)
if isdefined(Plotter, :Makie)
size = (500, 200)
legend = :rt
Plotter.save(joinpath(picdir, "interval_from_vector.svg"), gridplot(interval_from_vector(); Plotter, size, legend))
Plotter.save(joinpath(picdir, "interval_localref.svg"), gridplot(interval_localref(); Plotter, size, legend))
Plotter.save(joinpath(picdir, "interval_multiregion.svg"), gridplot(interval_multiregion(); Plotter, size, legend))
Plotter.save(joinpath(picdir, "interval_subgrid.svg"), gridplot(interval_subgrid(); Plotter, size, legend))
Plotter.save(joinpath(picdir, "interval_from_vector.png"), gridplot(interval_from_vector(); Plotter, size, legend))
Plotter.save(joinpath(picdir, "interval_localref.png"), gridplot(interval_localref(); Plotter, size, legend))
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
end
24 changes: 12 additions & 12 deletions examples/examples2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function rectangle()
Y = collect(0:0.05:1)
simplexgrid(X, X)
end
# ![](rectangle.svg)
# ![](rectangle.png)
#
# ## Rectangle with local refinement
#
Expand All @@ -21,7 +21,7 @@ function rectangle_localref()
X = glue(XLeft, XRight)
simplexgrid(X, X)
end
# ![](rectangle_localref.svg)
# ![](rectangle_localref.png)

#
# ## Rectangle with multiple regions
Expand All @@ -35,7 +35,7 @@ function rectangle_multiregion()
bfacemask!(grid, [1.0, 0.0], [1.0, 0.5], 6)
bfacemask!(grid, [0.0, 0.5], [1.0, 0.5], 7)
end
# ![](rectangle_multiregion.svg)
# ![](rectangle_multiregion.png)

#
# ## Subgrid from rectangle
Expand All @@ -47,7 +47,7 @@ function rectangle_subgrid()
rect!(grid, [0.25, 0.25], [0.75, 0.75]; region = 2, bregion = 5)
subgrid(grid, [1])
end
# ![](rectangle_subgrid.svg)
# ![](rectangle_subgrid.png)

#
# ## Rect2d with bregion function
Expand All @@ -64,7 +64,7 @@ function rect2d_bregion_function()

subgrid(grid, [2])
end
# ![](rect2d_bregion_function.svg)
# ![](rect2d_bregion_function.png)

function sorted_subgrid(; maxvolume = 0.01)
builder = SimplexGridBuilder(; Generator = Triangulate)
Expand Down Expand Up @@ -92,7 +92,7 @@ function sorted_subgrid(; maxvolume = 0.01)
sf = view(f, sg)
g, sg, sf
end
# ![](sorted_subgrid.svg)
# ![](sorted_subgrid.png)
# ## CI callbacks for [ExampleJuggler.jl](https://github.com/j-fu/ExampleJuggler.jl)
# Unit tests
using Test
Expand All @@ -114,18 +114,18 @@ using GridVisualize
function generateplots(picdir; Plotter = nothing)
if isdefined(Plotter, :Makie)
size = (300, 300)
Plotter.save(joinpath(picdir, "rectangle.svg"), gridplot(rectangle(); Plotter, size))
Plotter.save(joinpath(picdir, "rectangle_localref.svg"), gridplot(rectangle_localref(); Plotter, size))
Plotter.save(joinpath(picdir, "rectangle_multiregion.svg"), gridplot(rectangle_multiregion(); Plotter, size))
Plotter.save(joinpath(picdir, "rectangle_subgrid.svg"), gridplot(rectangle_subgrid(); Plotter, size))
Plotter.save(joinpath(picdir, "rect2d_bregion_function.svg"), gridplot(rect2d_bregion_function(); Plotter, size))
Plotter.save(joinpath(picdir, "rectangle.png"), gridplot(rectangle(); Plotter, size))
Plotter.save(joinpath(picdir, "rectangle_localref.png"), gridplot(rectangle_localref(); Plotter, size))
Plotter.save(joinpath(picdir, "rectangle_multiregion.png"), gridplot(rectangle_multiregion(); Plotter, size))
Plotter.save(joinpath(picdir, "rectangle_subgrid.png"), gridplot(rectangle_subgrid(); Plotter, size))
Plotter.save(joinpath(picdir, "rect2d_bregion_function.png"), gridplot(rect2d_bregion_function(); Plotter, size))

g, sg, sf = sorted_subgrid()
p = GridVisualizer(; Plotter, layout = (1, 3), size = (800, 300))
gridplot!(p[1, 1], g)
gridplot!(p[1, 2], sg)
scalarplot!(p[1, 3], sg, sf)
fname = joinpath(picdir, "sorted_subgrid.svg")
fname = joinpath(picdir, "sorted_subgrid.png")
Plotter.save(fname, reveal(p))
end
end
8 changes: 4 additions & 4 deletions examples/examples3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function quadrilateral(; hx = 0.25, hy = 0.2, hz = 0.1)
Z = collect(0:hz:1)
simplexgrid(X, Y, Z)
end
# ![](quadrilateral.svg)
# ![](quadrilateral.png)

# ## Cross3d
function cross3d()
Expand All @@ -25,7 +25,7 @@ function cross3d()

subgrid(grid, [2])
end
# ![](cross3d.svg)
# ![](cross3d.png)
# ## CI callbacks for [ExampleJuggler.jl](https://github.com/j-fu/ExampleJuggler.jl)
# Unit tests

Expand Down Expand Up @@ -54,7 +54,7 @@ using GridVisualize
function generateplots(picdir; Plotter = nothing)
if isdefined(Plotter, :Makie)
size = (400, 400)
Plotter.save(joinpath(picdir, "quadrilateral.svg"), gridplot(quadrilateral(); Plotter, size))
Plotter.save(joinpath(picdir, "cross3d.svg"), gridplot(cross3d(); Plotter, size))
Plotter.save(joinpath(picdir, "quadrilateral.png"), gridplot(quadrilateral(); Plotter, size))
Plotter.save(joinpath(picdir, "cross3d.png"), gridplot(cross3d(); Plotter, size))
end
end
12 changes: 6 additions & 6 deletions examples/gmsh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function gmsh_t1()
gmsh.finalize()
grid
end
# ![](gmsh_t1.svg)
# ![](gmsh_t1.png)

#
# [Example t4](https://gmsh.info/doc/texinfo/gmsh.html#t4) from the GMSH docs
Expand Down Expand Up @@ -160,7 +160,7 @@ function gmsh_t4()
grid
end

# ![](gmsh_t4.svg)
# ![](gmsh_t4.png)

#
# [Example t5](https://gmsh.info/doc/texinfo/gmsh.html#t5) from the GMSH docs
Expand Down Expand Up @@ -292,7 +292,7 @@ function gmsh_t5()
gmsh.finalize()
grid
end
# ![](gmsh_t5.svg)
# ![](gmsh_t5.png)


# ## CI callbacks for [ExampleJuggler.jl](https://github.com/j-fu/ExampleJuggler.jl)
Expand All @@ -310,8 +310,8 @@ using GridVisualize
function generateplots(picdir; Plotter = nothing)
if isdefined(Plotter, :Makie)
size = (500, 500)
Plotter.save(joinpath(picdir, "gmsh_t1.svg"), gridplot(gmsh_t1(); Plotter, size))
Plotter.save(joinpath(picdir, "gmsh_t4.svg"), gridplot(gmsh_t4(); Plotter, size))
Plotter.save(joinpath(picdir, "gmsh_t5.svg"), gridplot(gmsh_t5(); Plotter, size))
Plotter.save(joinpath(picdir, "gmsh_t1.png"), gridplot(gmsh_t1(); Plotter, size))
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
end

2 comments on commit 6cc5af1

@j-fu
Copy link
Owner Author

@j-fu j-fu commented on 6cc5af1 Jun 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/108468

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.6.1 -m "<description of version>" 6cc5af1f2514d60af6454a6dc0254e19930cad64
git push origin v1.6.1

Please sign in to comment.