diff --git a/docs/make.jl b/docs/make.jl index 10161fd3..85738643 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -7,6 +7,7 @@ using Catlab using Catlab.WiringDiagrams using AlgebraicPetri using CairoMakie +using Distributed # Set Literate.jl config if not being compiled on recognized service. config = Dict{String,String}() @@ -15,21 +16,21 @@ if !(haskey(ENV, "GITHUB_ACTIONS") || haskey(ENV, "GITLAB_CI")) config["repo_root_url"] = "https://github.com/AlgebraicJulia/Decapodes.jl/blob/main/docs" end -# const literate_dir = joinpath(@__DIR__, "..", "examples") -# const generated_dir = joinpath(@__DIR__, "src", "examples") +const literate_dir = joinpath(@__DIR__, "..", "examples") +const generated_dir = joinpath(@__DIR__, "src", "examples") -# for (root, dirs, files) in walkdir(literate_dir) -# out_dir = joinpath(generated_dir, relpath(root, literate_dir)) -# pmap(files) do file -# f,l = splitext(file) -# if l == ".jl" && !startswith(f, "_") -# Literate.markdown(joinpath(root, file), out_dir; -# config=config, documenter=true, credit=false) -# Literate.notebook(joinpath(root, file), out_dir; -# execute=true, documenter=true, credit=false) -# end -# end -# end +for (root, dirs, files) in walkdir(literate_dir) + out_dir = joinpath(generated_dir, relpath(root, literate_dir)) + pmap(files) do file + f,l = splitext(file) + if l == ".jl" && !startswith(f, "_") + Literate.markdown(joinpath(root, file), out_dir; + config=config, documenter=true, credit=false) + Literate.notebook(joinpath(root, file), out_dir; + execute=true, documenter=true, credit=false) + end + end +end @info "Building Documenter.jl docs" makedocs( @@ -52,9 +53,9 @@ makedocs( "Glacial Flow" => "ice_dynamics.md", "Grigoriev Ice Cap" => "grigoriev.md", "Budyko-Sellers-Halfar" => "budyko_sellers_halfar.md", -# "Examples" => Any[ -# "examples/cfd_example.md" -# ], + "Examples" => Any[ + "examples/cfd_example.md" + ], "Library Reference" => "api.md" ] ) diff --git a/examples/chemistry/brusselator_bounded.jl b/examples/chemistry/brusselator_bounded.jl index b2cf3910..4b72fb0a 100644 --- a/examples/chemistry/brusselator_bounded.jl +++ b/examples/chemistry/brusselator_bounded.jl @@ -65,7 +65,7 @@ resolve_overloads!(Brusselator) to_graphviz(Brusselator) # TODO: Create square domain of approximately 32x32 vertices. -s = loadmesh(Rectangle_30x10()) +s = triangulated_grid(30,10,2,2) scaling_mat = Diagonal([1/maximum(x->x[1], s[:point]), 1/maximum(x->x[2], s[:point]), 1.0]) @@ -230,7 +230,7 @@ constants_and_parameters = ( R = R, F = t -> t ≥ 1.1 ? F₂ : F₁) -tₑ = 21.5e4 +tₑ = 21.5e2 @info("Precompiling Solver") prob = ODEProblem(fₘ, u₀, (0, 1e-4), constants_and_parameters)