Skip to content

Commit f36153d

Browse files
committed
Add numeric checks to AMG test
1 parent a3d7b04 commit f36153d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/3d_example_amg.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using BattMo
1+
using BattMo, Jutul
22
using Test
33
using AlgebraicMultigrid
44

@@ -55,9 +55,16 @@ using AlgebraicMultigrid
5555
cfg[:extra_timing] = true
5656

5757
states, reports = simulate(state0, simulator, timesteps; forces=forces, config=cfg)
58-
58+
Cc = map(x -> x[:Control][:Current][1], states)
59+
Phi = map(x -> x[:Control][:Phi][1], states)
60+
@test length(states) == 77
61+
@test Cc[1] 0.00058 atol = 1e-2
62+
for i in 3:length(Cc)
63+
@test Cc[i] 0.008165 atol = 1e-2
64+
end
65+
@test Phi[1] 4.175 atol = 1e-1
66+
@test Phi[end] 2.76 atol = 1e-2
67+
@test Phi[30] 3.67 atol = 1e-2
5968
true
60-
6169
end
62-
6370
end

0 commit comments

Comments
 (0)