Skip to content
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Reexport = "1.2.2"
SciMLBase = "2.99, 3"
SimpleUnPack = "1"
SparseArrays = "1"
StaticArrayInterface = "1.5.1"
StaticArrayInterface = "1.10"
StaticArrays = "1.9.8"
StructArrays = "0.6.17, 0.7"
Unrolled = "0.1.3"
Expand Down
30 changes: 16 additions & 14 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,31 @@ BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
OrdinaryDiffEqRKN = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a"
OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce"
OrdinaryDiffEqSSPRK = "669c94d9-1f4b-4b64-b377-1aa079aa2388"
OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"

[compat]
BandedMatrices = "1"
BenchmarkTools = "0.5, 0.7, 1.0 - 1.2.0, 1.2.2"
BenchmarkTools = "1.2.2"
Documenter = "1"
ForwardDiff = "0.10.19, 1"
ForwardDiff = "1"
LaTeXStrings = "1.2"
OrdinaryDiffEq = "5.50, 6"
OrdinaryDiffEqRKN = "2.0"
OrdinaryDiffEqSSPRK = "2.0"
OrdinaryDiffEqTsit5 = "2.0"
OrdinaryDiffEqRosenbrock = "2.0"
Plots = "1.9"
StaticArrays = "1.2"
StructArrays = "0.6.17, 0.7"
StructArrays = "0.7"

[preferences.OrdinaryDiffEq]
PrecompileAutoSpecialize = false
PrecompileAutoSwitch = false
PrecompileDefaultSpecialize = false
PrecompileFunctionWrapperSpecialize = false
PrecompileLowStorage = false
PrecompileNoSpecialize = false
PrecompileNonStiff = false
PrecompileStiff = false
[extras]
HostCPUFeatures = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0"

[preferences.HostCPUFeatures]
allow_runtime_invalidation = true
10 changes: 5 additions & 5 deletions docs/src/tutorials/advection_diffusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Let's create an appropriate discretization of this equation step by step. At fir
we load packages that we will use in this example.

```@example advection_diffusion
using SummationByPartsOperators, OrdinaryDiffEq
using SummationByPartsOperators, OrdinaryDiffEqTsit5
using LaTeXStrings; using Plots: Plots, plot, plot!, savefig
```

Expand Down Expand Up @@ -65,8 +65,8 @@ time stepping.
sol = solve(ode, Tsit5(), saveat=range(first(tspan), stop=last(tspan), length=200));

plot(xguide=L"x", yguide=L"u")
plot!(evaluate_coefficients(sol[1], D1), label=L"u_0")
plot!(evaluate_coefficients(sol[end], D1), label=L"u_\mathrm{numerical}")
plot!(evaluate_coefficients(sol.u[1], D1), label=L"u_0")
plot!(evaluate_coefficients(sol.u[end], D1), label=L"u_\mathrm{numerical}")
savefig("example_advection_diffusion.png");
```

Expand All @@ -82,7 +82,7 @@ using Printf; using Plots: Animation, frame, gif

let anim = Animation()
idx = 1
x, u = evaluate_coefficients(sol[idx], D1)
x, u = evaluate_coefficients(sol.u[idx], D1)
fig = plot(x, u, xguide=L"x", yguide=L"u", xlim=extrema(x), ylim=(-1.05, 1.05),
label="", title=@sprintf("\$t = %6.2f \$", sol.t[idx]))
for idx in 1:length(sol.t)
Expand All @@ -106,6 +106,6 @@ using InteractiveUtils
versioninfo()

using Pkg
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEq"],
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEqTsit5"],
mode=PKGMODE_MANIFEST)
```
14 changes: 7 additions & 7 deletions docs/src/tutorials/constant_linear_advection.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Let's create an appropriate discretization of this equation step by step. At fir
we load packages that we will use in this example.

```@example linear_advection
using SummationByPartsOperators, OrdinaryDiffEq
using SummationByPartsOperators, OrdinaryDiffEqTsit5
using LaTeXStrings; using Plots: Plots, plot, plot!, savefig
```

Expand Down Expand Up @@ -85,8 +85,8 @@ time stepping.
sol = solve(ode, Tsit5(), saveat=range(first(tspan), stop=last(tspan), length=200));

plot(xguide=L"x", yguide=L"u")
plot!(evaluate_coefficients(sol[1], D), label=L"u_0")
plot!(evaluate_coefficients(sol[end], D), label=L"u_\mathrm{numerical}")
plot!(evaluate_coefficients(sol.u[1], D), label=L"u_0")
plot!(evaluate_coefficients(sol.u[end], D), label=L"u_\mathrm{numerical}")
savefig("example_linear_advection.png");
```

Expand All @@ -101,7 +101,7 @@ using Printf; using Plots: Animation, frame, gif

let anim = Animation()
idx = 1
x, u = evaluate_coefficients(sol[idx], D)
x, u = evaluate_coefficients(sol.u[idx], D)
fig = plot(x, u, xguide=L"x", yguide=L"u", xlim=extrema(x), ylim=(-1.05, 1.05),
label="", title=@sprintf("\$t = %6.2f \$", sol.t[idx]))
for idx in 1:length(sol.t)
Expand All @@ -121,8 +121,8 @@ You can use a CG or DG method by swapping out the derivative operator `D`.

```@example linear_advection
plot(xguide=L"x", yguide=L"u")
plot!(evaluate_coefficients(sol[1], D), label=L"u_0")
plot!(evaluate_coefficients(sol[end], D), label=L"u_\mathrm{FD}")
plot!(evaluate_coefficients(sol.u[1], D), label=L"u_0")
plot!(evaluate_coefficients(sol.u[end], D), label=L"u_\mathrm{FD}")

# CGSEM using polynomials of degree 3, i.e. 4 nodes per element, and 30 elements
D_CGSEM = couple_continuously(
Expand Down Expand Up @@ -157,6 +157,6 @@ using InteractiveUtils
versioninfo()

using Pkg
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEq"],
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEqTsit5"],
mode=PKGMODE_MANIFEST)
```
10 changes: 5 additions & 5 deletions docs/src/tutorials/kdv.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Let's create an appropriate discretization of this equation step by step. At fir
we load packages that we will use in this example.

```@example kdv
using SummationByPartsOperators, OrdinaryDiffEq
using SummationByPartsOperators, OrdinaryDiffEqRosenbrock
using LaTeXStrings; using Plots: Plots, plot, plot!, savefig
```

Expand Down Expand Up @@ -111,8 +111,8 @@ derivative makes the system stiff.
sol = solve(ode, Rodas5(), saveat=range(first(tspan), stop=last(tspan), length=200))

plot(xguide=L"x", yguide=L"u")
plot!(evaluate_coefficients(sol[1], D1), label=L"u_0")
plot!(evaluate_coefficients(sol[end], D1), label=L"u_\mathrm{numerical}")
plot!(evaluate_coefficients(sol.u[1], D1), label=L"u_0")
plot!(evaluate_coefficients(sol.u[end], D1), label=L"u_\mathrm{numerical}")
savefig("example_kdv.png");
```

Expand All @@ -128,7 +128,7 @@ using Printf; using Plots: Animation, frame, gif

let anim = Animation()
idx = 1
x, u = evaluate_coefficients(sol[idx], D1)
x, u = evaluate_coefficients(sol.u[idx], D1)
fig = plot(x, u, xguide=L"x", yguide=L"u", xlim=extrema(x), ylim=(-0.05, 2.05),
label="", title=@sprintf("\$t = %6.2f \$", sol.t[idx]))
for idx in 1:length(sol.t)
Expand All @@ -152,6 +152,6 @@ using InteractiveUtils
versioninfo()

using Pkg
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEq"],
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEqRosenbrock"],
mode=PKGMODE_MANIFEST)
```
14 changes: 8 additions & 6 deletions docs/src/tutorials/twodimensional_linear_advection.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ one-dimensional SBP operators in each direction. Based on one-dimensional SBP op
in ``[y_{\min}, y_{\max}]``, we can construct a two-dimensional SBP operator ``D`` on ``N = N_x\cdot N_y`` nodes utilizing Kronecker products.

```@example twodimensional_advection
using SummationByPartsOperators, OrdinaryDiffEq
using SummationByPartsOperators, OrdinaryDiffEqTsit5
using LaTeXStrings; using Plots: Plots, scatter, scatter!, savefig
using LinearAlgebra: norm, dot

Expand Down Expand Up @@ -81,11 +81,13 @@ B_y = mass_matrix_boundary(D, 2)
We can verify the SBP property of the two-dimensional operator in each direction:

```@example twodimensional_advection
M * D_x + D_x' * M ≈ B_x
check = M * D_x + D_x' * M ≈ B_x
check || error("SBP property in x-direction is not satisfied.")
```

```@example twodimensional_advection
M * D_y + D_y' * M ≈ B_y
check = M * D_y + D_y' * M ≈ B_y
check || error("SBP property in y-direction is not satisfied.")
```

Similar to [`integrate`](@ref) for performing integrals in the interior, we can use [`integrate_boundary`](@ref) to perform integrals along the boundary.
Expand Down Expand Up @@ -148,9 +150,9 @@ saveat = range(tspan..., length = 100)
sol = solve(ode, Tsit5(); saveat)

using Printf; using Plots: @animate, gif
anim = @animate for i in eachindex(sol)
anim = @animate for i in eachindex(sol.u)
t = sol.t[i]
scatter(first.(nodes), last.(nodes), sol[i], label = L"u_\mathrm{numerical}")
scatter(first.(nodes), last.(nodes), sol.u[i], label = L"u_\mathrm{numerical}")
scatter!(first.(nodes), last.(nodes), u.(Ref(t), nodes), label = L"u_\mathrm{analytical}", xlabel = "x", ylabel = "y", zlabel = "u",
title = @sprintf("t = %.2f", t), zrange = (-0.1, 1.1), legend = :topright, dpi = 170)
end
Expand All @@ -166,7 +168,7 @@ using InteractiveUtils
versioninfo()

using Pkg
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEq"],
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEqTsit5"],
mode=PKGMODE_MANIFEST)
```

Expand Down
8 changes: 4 additions & 4 deletions docs/src/tutorials/variable_linear_advection.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Have a look at the source code if you want to dig deeper. Below is an example
demonstrating how to use this semidiscretization.

```@example variable_linear_advection
using SummationByPartsOperators, OrdinaryDiffEq
using SummationByPartsOperators, OrdinaryDiffEqSSPRK
using LaTeXStrings; using Plots: Plots, plot, plot!, savefig

# general parameters
Expand Down Expand Up @@ -55,8 +55,8 @@ sol = solve(ode, SSPRK104(), dt=D.Δx, adaptive=false,

# visualise the result
plot(xguide=L"x", yguide=L"u")
plot!(evaluate_coefficients(sol[1], semi), label=L"u_0")
plot!(evaluate_coefficients(sol[end], semi), label=L"u_\mathrm{numerical}")
plot!(evaluate_coefficients(sol.u[1], semi), label=L"u_0")
plot!(evaluate_coefficients(sol.u[end], semi), label=L"u_\mathrm{numerical}")
savefig("example_linear_advection.png");
```

Expand All @@ -72,6 +72,6 @@ using InteractiveUtils
versioninfo()

using Pkg
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEq"],
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEqSSPRK"],
mode=PKGMODE_MANIFEST)
```
10 changes: 5 additions & 5 deletions docs/src/tutorials/wave_equation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Below is an example demonstrating how to use this semidiscretization.


```@example wave_equation
using SummationByPartsOperators, OrdinaryDiffEq
using SummationByPartsOperators, OrdinaryDiffEqRKN
using LaTeXStrings; using Plots: Plots, plot, plot!, savefig

# general parameters
Expand All @@ -46,8 +46,8 @@ sol = solve(ode, DPRKN6(), saveat=range(first(tspan), stop=last(tspan), length=2

# visualize the result
plot(xguide=L"x")
plot!(evaluate_coefficients(sol[end].x[2], semi), label=L"u")
plot!(evaluate_coefficients(sol[end].x[1], semi), label=L"\partial_t u")
plot!(evaluate_coefficients(sol.u[end].x[2], semi), label=L"u")
plot!(evaluate_coefficients(sol.u[end].x[1], semi), label=L"\partial_t u")
savefig("example_wave_equation.png");
```

Expand Down Expand Up @@ -78,7 +78,7 @@ function create_gif(left_bc::Val{LEFT_BC}, right_bc::Val{RIGHT_BC}) where {LEFT_

anim = Animation()
idx = 1
x, u = evaluate_coefficients(sol[idx].x[2], D2)
x, u = evaluate_coefficients(sol.u[idx].x[2], D2)
fig = plot(x, u, xguide=L"x", yguide=L"u", xlim=extrema(x), ylim=(-1.05, 1.05),
label="", title=@sprintf("\$t = %6.2f \$", sol.t[idx]))
for idx in 1:length(sol.t)
Expand Down Expand Up @@ -116,6 +116,6 @@ using InteractiveUtils
versioninfo()

using Pkg
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEq"],
Pkg.status(["SummationByPartsOperators", "OrdinaryDiffEqRKN"],
mode=PKGMODE_MANIFEST)
```
8 changes: 7 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ BandedMatrices = "1"
DiffEqCallbacks = "2.35, 3, 4"
ForwardDiff = "0.10.19, 1"
Optim = "1.7.5, 2"
OrdinaryDiffEqSSPRK = "1.5"
OrdinaryDiffEqSSPRK = "1.5, 2.0"
SpecialFunctions = "1, 2"
StaticArrays = "1.9.8"
StructArrays = "0.6.17, 0.7"

[extras]
HostCPUFeatures = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0"

[preferences.HostCPUFeatures]
allow_runtime_invalidation = true
Loading