Skip to content

Commit

Permalink
docs and testing handled by ExampleJuggler.jl (#13)
Browse files Browse the repository at this point in the history
* docs and testing handle by ExampleJuggler pkg

* replace fieldtype jac

* add repo link

* bump v1.0.0 (breaking change): Params is now given as a struct, params fields can also be given as kwargs in pdepe function
  • Loading branch information
gregoirepourtier committed Nov 27, 2023
1 parent 6b125db commit b64d8cf
Show file tree
Hide file tree
Showing 24 changed files with 172 additions and 911 deletions.
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SkeelBerzins"
uuid = "15eb0f9a-d441-4223-9ae5-4829ae804a45"
authors = ["gregoirepourtier <gpourtier@icloud.com>"]
version = "0.1.6"
version = "1.0.0"

[deps]
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
Expand Down Expand Up @@ -37,6 +37,7 @@ julia = "1.6"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
DoubleFloats = "497a8b3b-efae-58df-a0af-a86822472b78"
ExampleJuggler = "3bbe58f8-ed81-4c4e-a134-03e85fcf4a1a"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
Expand All @@ -46,4 +47,4 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "SpecialFunctions", "SciMLSensitivity", "OptimizationPolyalgorithms", "OptimizationOptimJL", "Optimization", "LinearAlgebra", "DifferentialEquations", "DelimitedFiles", "DoubleFloats"]
test = ["Test", "SpecialFunctions", "SciMLSensitivity", "OptimizationPolyalgorithms", "OptimizationOptimJL", "Optimization", "LinearAlgebra", "DifferentialEquations", "DelimitedFiles", "DoubleFloats", "ExampleJuggler"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Solver for one-dimensional parabolic and elliptic nonlinear partial differential equations.

This package is based on the spatial discretization for the method of lines introduced by Skeel and Berzins in [[1]](#Reference) and MATLAB's [pdepe](https://de.mathworks.com/help/matlab/ref/pdepe.html) API. For transient problems, the time discretization is performed either by the implicit Euler method (internal method) or by using an ODE/DAE solver from the [DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl) package.
This package is based on the spatial discretization for the method of lines introduced by Skeel and Berzins in [[1]](#Reference) and provides an API similar to MATLAB's [pdepe](https://de.mathworks.com/help/matlab/ref/pdepe.html). For transient problems, the time discretization is performed either by the implicit Euler method (internal method) or by using an ODE/DAE solver from the [DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl) package.

# Prerequisite

Expand Down
7 changes: 7 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
[deps]
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DoubleFloats = "497a8b3b-efae-58df-a0af-a86822472b78"
ExampleJuggler = "3bbe58f8-ed81-4c4e-a134-03e85fcf4a1a"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
OptimizationPolyalgorithms = "500b13db-7e66-49ce-bda4-eed966be6282"
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"
SkeelBerzins = "15eb0f9a-d441-4223-9ae5-4829ae804a45"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
81 changes: 52 additions & 29 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,32 +1,55 @@
using Documenter
using SkeelBerzins, DifferentialEquations
using ExampleJuggler

makedocs(
modules = [SkeelBerzins, Base.get_extension(SkeelBerzins, :SkeelBerzinsDiffEq)],
sitename = "SkeelBerzins.jl",
doctest = false, clean = true,
warnonly = true,
format = Documenter.HTML(),
authors = "Grégoire Pourtier",
pages = ["Home" => "index.md",
"Manual" => ["Problem Definition" => "problem_definition.md",
"Solvers" => "solvers.md",
"Achieve performance" => "performance.md",
"Public and Private APIs" => "public_private_APIs.md"
],
"Examples" => ["101: Linear Diffusion equation" =>"examples/example101.md",
"102: Nonlinear Diffusion equation" =>"examples/example102.md",
"103: Linear Diffusion equation in cylindrical coordinates" =>"examples/example103.md",
"104: Poisson equation" =>"examples/example104.md",
"105: Stationary nonlinear diffusion equation" =>"examples/example105.md",
"106: System of Reaction-Diffusion equations" =>"examples/example106.md",
"107: Linear Diffusion equation in spherical coordinates" =>"examples/example107.md",
"201: Interpolation of Partial Derivatives" =>"examples/example201.md",
"301: PDE Constrained Optimization" =>"examples/example301.md"
]
]
)

deploydocs(
repo = "github.com/gregoirepourtier/SkeelBerzins.jl.git"
)

function create_doc()
ExampleJuggler.verbose!(true)

cleanexamples()

exampledir = joinpath(@__DIR__, "..", "examples")

modules = filter(ex -> splitext(ex)[2] == ".jl", basename.(readdir(exampledir)))
module_examples = @docmodules(exampledir, modules)

module_examples_reformated = Array{Pair{String,String}}(undef, length(module_examples))
for i in eachindex(module_examples)
mod = module_examples[i]
tmp_new = tmp = replace(replace(first(mod), "_" => ": " ; count=1), "Example" => "")
cpt_spaces = 0
for i in 2:length(tmp[2:end-1])
if isuppercase(tmp[i]) && islowercase(tmp[i+1])
tmp_new = tmp_new[1:i-1+cpt_spaces]*" "*tmp[i:end]
cpt_spaces += 1
end
end
module_examples_reformated[i] = Pair(tmp_new, mod[2])
end

makedocs(; modules = [SkeelBerzins, Base.get_extension(SkeelBerzins, :SkeelBerzinsDiffEq)],
sitename = "SkeelBerzins.jl",
checkdocs = :all,
doctest = false, clean = false,
warnonly = true,
format = Documenter.HTML(; mathengine = MathJax3(), repolink = "https://github.com/gregoirepourtier/SkeelBerzins.jl"),
authors = "G. Pourtier",
repo = "https://github.com/gregoirepourtier/SkeelBerzins.jl",
pages = ["Home" => "index.md",
"Manual" => ["Problem Definition" => "problem_definition.md",
"Solvers" => "solvers.md",
"Achieve performance" => "performance.md",
"Public and Private APIs" => "public_private_APIs.md"
],
"Examples" => module_examples_reformated
])

cleanexamples()

deploydocs(
repo = "github.com/gregoirepourtier/SkeelBerzins.jl.git"
)

end

create_doc()
107 changes: 0 additions & 107 deletions docs/src/examples/example101.md

This file was deleted.

93 changes: 0 additions & 93 deletions docs/src/examples/example102.md

This file was deleted.

2 comments on commit b64d8cf

@gregoirepourtier
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@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/96003

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.0.0 -m "<description of version>" b64d8cf92f5fd3278830be73827f6722a75d539e
git push origin v1.0.0

Please sign in to comment.