Skip to content

Commit

Permalink
Fix tests for 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVandH committed May 9, 2023
1 parent 2f2aea0 commit 677eb46
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FiniteVolumeMethod"
uuid = "d4f04ab7-4f65-4d72-8a28-7087bc7f46f4"
authors = ["Daniel VandenHeuvel <danj.vandenheuvel@gmail.com>"]
version = "0.4.5"
version = "0.4.6"

[deps]
ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e"
Expand Down
1 change: 0 additions & 1 deletion docs/src/example_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ using SteadyStateDiffEq
using LinearAlgebra
using ElasticArrays
using NonlinearSolve
using FastLapackInterface
using Krylov
```

Expand Down
1 change: 0 additions & 1 deletion docs/src/mean_exit_time.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ using OrdinaryDiffEq
using SteadyStateDiffEq
using LinearSolve
using LinearAlgebra
using FastLapackInterface

R = 1.0
θ = LinRange(0, 2π, 100)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/reaction_diffusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ prob = FVMProblem(mesh, BCs; diffusion_function=D, reaction_function=R, initial_
## Step 4: Solve
using OrdinaryDiffEq, LinearSolve

alg = FBDF(linsolve=UMFPACKFactorization())
alg = FBDF(linsolve=UMFPACKFactorization(), autodiff=false)
sol = solve(prob, alg; saveat=0.025)

## Step 5: Visualisation
Expand Down
1 change: 0 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ DelaunayTriangulation = "927a84f5-c5f4-47a5-9785-b46e178433df"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
ElasticArrays = "fdbdab4c-e67f-52f5-8c3f-e7b388dad3d4"
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
FastLapackInterface = "29a986be-02c6-4525-aec4-84b980013641"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
2 changes: 1 addition & 1 deletion test/boundary_conditions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ end
# Test the type-stability for a vector of functions
function vector_of_function_test(wrappers, parameters)
nums = zeros(length(wrappers))
@inline map(wrappers, eachindex(wrappers), parameters) do f, i, p
map(wrappers, eachindex(wrappers), parameters) do f, i, p
x, y, t, u = rand(4)
nums[i] = f(x, y, t, u, p)
end
Expand Down
2 changes: 1 addition & 1 deletion test/geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ for coordinate_type in (Vector{Float64}, NTuple{2,Float64}, SVector{2,Float64})
## Test the boundary information
boundary_info = FVM.get_boundary_information(geo)
boundary_elements = boundary_info.boundary_elements

local boundary_nodes
boundary_nodes = boundary_info.boundary_nodes
true_boundary_nodes = collect(1:48)

Expand Down
3 changes: 1 addition & 2 deletions test/met_perturbed_circle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ using CairoMakie
using OrdinaryDiffEq
using SteadyStateDiffEq
using LinearSolve
using FastLapackInterface
using LinearAlgebra
using ReferenceTests
using StableRNGs
Expand Down Expand Up @@ -42,7 +41,7 @@ prob = FVMProblem(mesh, BCs;
final_time=final_time,
initial_condition=initial_guess,
steady=true)
alg = DynamicSS(TRBDF2(linsolve=FastLUFactorization()))
alg = DynamicSS(TRBDF2(linsolve=KrylovJL_GMRES()))
sol = solve(prob, alg, parallel=true)
fig = Figure(fontsize=38)
ax = Axis(fig[1, 1], xlabel=L"x", ylabel=L"y")
Expand Down
4 changes: 2 additions & 2 deletions test/parallel_reaction_example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ R = (x, y, t, u, p) -> u * (1 - u)
u₀ = [f(points[:, i]...) for i in axes(points, 2)]
final_time = 0.5
prob = FVMProblem(mesh, BCs; iip_flux=false, diffusion_function=D, reaction_function=R, initial_condition=u₀, final_time)
alg = TRBDF2(linsolve=KLUFactorization(; reuse_symbolic=false))
alg = TRBDF2(linsolve=KLUFactorization(; reuse_symbolic=false), autodiff = VERSION v"1.8.5")
sol_par = solve(prob, alg; parallel=true, saveat=0.05)
sol_ser = solve(prob, alg; parallel=false, saveat=0.05)
@test sol_par.u sol_ser.u rtol=1e-7

prob = FVMProblem(mesh, BCs; iip_flux=true, diffusion_function=D, reaction_function=R, initial_condition=u₀, final_time)
alg = TRBDF2(linsolve=KLUFactorization(; reuse_symbolic=false))
alg = TRBDF2(linsolve=KLUFactorization(; reuse_symbolic=false), autodiff = VERSION v"1.8.5")
sol_par = solve(prob, alg; parallel=true, saveat=0.05)
sol_ser = solve(prob, alg; parallel=false, saveat=0.05)
@test sol_par.u sol_ser.u rtol=1e-7
4 changes: 2 additions & 2 deletions test/parallel_tissue_example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ prob = FVMProblem(msh, BC;
final_time=48.0,
initial_condition=initial_condition)

alg = TRBDF2(linsolve=KLUFactorization())
alg = TRBDF2(linsolve=KLUFactorization(), autodiff = VERSION v"1.8.5")
sol_par = solve(prob, alg; parallel=true, saveat=0.05)
sol_ser = solve(prob, alg; parallel=false, saveat=0.05)
@test sol_par.u sol_ser.u

alg = TRBDF2(linsolve=KLUFactorization(; reuse_symbolic=false))
alg = TRBDF2(linsolve=KLUFactorization(; reuse_symbolic=false), autodiff = VERSION v"1.8.5")
sol_par = solve(prob, alg; parallel=true, saveat=0.05)
sol_ser = solve(prob, alg; parallel=false, saveat=0.05)
@test sol_par.u sol_ser.u
Expand Down
2 changes: 1 addition & 1 deletion test/reaction_example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ final_time = 0.10
prob = FVMProblem(mesh, BCs; diffusion_function=D, reaction_function=R, initial_condition=u₀, final_time)

## Step 4: Solve
alg = FBDF(linsolve=UMFPACKFactorization())
alg = FBDF(linsolve=UMFPACKFactorization(), autodiff = false)
sol = solve(prob, alg; saveat=0.025)

## Step 5: Visualisation
Expand Down

2 comments on commit 677eb46

@DanielVandH
Copy link
Member Author

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/83163

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 v0.4.6 -m "<description of version>" 677eb463e0c0f151cd8ee18bc64f92a123936823
git push origin v0.4.6

Please sign in to comment.