test: adapt tests to change from mr !2

[skip ci]
This commit is contained in:
nebmit 2024-03-12 15:06:20 +01:00
parent 539c6f9544
commit f69d58e070
No known key found for this signature in database
3 changed files with 10 additions and 14 deletions

View File

@ -8,8 +8,6 @@
@test TUG.getType(be) == TUG.CONSTANT
@test TUG.getValue(be) == 1.0
@test TUG.getValue([be]) == [1.0]
@test_throws ArgumentError TUG.BoundaryElement{Float64}(-1.0)
end
@testset "Boundary" begin
@ -25,7 +23,6 @@
@test TUG.getBoundaryElementType(boundary, TUG.TOP, 1) == TUG.CLOSED
@test TUG.getBoundaryElementType(boundary, TUG.BOTTOM, 1) == TUG.CLOSED
@test_throws ArgumentError TUG.getBoundaryElementType(boundary, TUG.LEFT, -1)
@test_throws ArgumentError TUG.getBoundaryElementType(boundary, TUG.RIGHT, 26)
@test TUG.getBoundaryElementValue(boundary, TUG.LEFT, 1) == -1.0
@ -33,7 +30,6 @@
@test TUG.getBoundaryElementValue(boundary, TUG.TOP, 1) == -1.0
@test TUG.getBoundaryElementValue(boundary, TUG.BOTTOM, 1) == -1.0
@test_throws ArgumentError TUG.getBoundaryElementValue(boundary, TUG.BOTTOM, -1)
@test_throws ArgumentError TUG.getBoundaryElementValue(boundary, TUG.TOP, 21)
TUG.setBoundarySideClosed!(boundary, TUG.LEFT)

View File

@ -113,11 +113,11 @@
TUG.next(simulation)
end
expected_concentrations = [
1.9866377371338924 3.67421468453773 14.255058363518529 3.5916629034159486 1.1419105589005596
1.98663773713389 3.674214684537723 14.255058363518497 3.5916629034159406 1.1419105589005576
1.9866377371338884 3.6742146845377186 14.255058363518481 3.591662903415937 1.1419105589005565
1.9866377371338895 3.674214684537725 14.255058363518502 3.5916629034159424 1.1419105589005574
1.9866377371338952 3.6742146845377377 14.255058363518547 3.591662903415955 1.141910558900562
2.116922560959072 3.6843335107065727 14.255652775906785 3.5916901126508205 1.141911092414447
2.1169225609590687 3.684333510706568 14.255652775906759 3.5916901126508134 1.1419110924144453
2.1169225609590674 3.6843335107065607 14.255652775906748 3.591690112650811 1.1419110924144442
2.1169225609590687 3.684333510706565 14.255652775906766 3.5916901126508147 1.1419110924144449
2.116922560959073 3.684333510706576 14.25565277590681 3.5916901126508267 1.141911092414448
]
@test isapprox(
TUG.getConcentrations(simulation, 1),

View File

@ -114,11 +114,11 @@
)
TUG.run(simulation)
expected_concentrations = [
1.9866377371338924 3.67421468453773 14.255058363518529 3.5916629034159486 1.1419105589005596
1.98663773713389 3.674214684537723 14.255058363518497 3.5916629034159406 1.1419105589005576
1.9866377371338884 3.6742146845377186 14.255058363518481 3.591662903415937 1.1419105589005565
1.9866377371338895 3.674214684537725 14.255058363518502 3.5916629034159424 1.1419105589005574
1.9866377371338952 3.6742146845377377 14.255058363518547 3.591662903415955 1.141910558900562
2.116922560959072 3.6843335107065727 14.255652775906785 3.5916901126508205 1.141911092414447
2.1169225609590687 3.684333510706568 14.255652775906759 3.5916901126508134 1.1419110924144453
2.1169225609590674 3.6843335107065607 14.255652775906748 3.591690112650811 1.1419110924144442
2.1169225609590687 3.684333510706565 14.255652775906766 3.5916901126508147 1.1419110924144449
2.116922560959073 3.684333510706576 14.25565277590681 3.5916901126508267 1.141911092414448
]
@test isapprox(TUG.getConcentrations(grid), expected_concentrations, atol = 1e-6)
end