Skip to content

Commit 1b991fd

Browse files
committed
Add (broken) validation test for thermalfluid benchmark
1 parent 59bb6ea commit 1b991fd

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

test/benchmark.jl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using Pkg; Pkg.activate(joinpath(dirname(@__DIR__), "benchmark"))
2+
using DAECompiler
3+
using DAECompiler: compute_residual_vectors
4+
using SciMLBase, Sundials
5+
using Test
6+
7+
include("../benchmark/thermalfluid.jl")
8+
9+
@testset "Validation" begin
10+
Benchmark{3}()()
11+
12+
u = zeros(68)
13+
du = zeros(68)
14+
residuals, expanded_residuals = compute_residual_vectors(Benchmark{3}(), u, du)
15+
@test length(residuals) == length(expanded_residuals)
16+
@test_broken residuals expanded_residuals
17+
# indices = findall(i -> residuals[i] ≉ expanded_residuals[i], eachindex(residuals))
18+
# residuals[indices]
19+
# expanded_residuals[indices]
20+
end
21+
22+
let sol = solve(DAECProblem(Benchmark{3}(), [1:9;] .=> 0.), IDA())
23+
@test_broken sol.retcode == ReturnCode.Success
24+
end

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ include("validation.jl")
1111

1212
using Pkg
1313
Pkg.activate(joinpath(dirname(@__DIR__), "benchmark")) do
14-
include("../benchmark/main.jl")
14+
include("benchmark.jl")
1515
end

0 commit comments

Comments
 (0)