@@ -3,19 +3,21 @@ using Test
3
3
4
4
T = Float32
5
5
6
- @testset " Test simulating in two refinement steps" begin
6
+ @timed_testset " Test simulating in two refinement steps" begin
7
7
sim = Simulation {T} (" BEGe_01.yaml" )
8
- calculate_electric_potential ! (sim, refinement_limits = [0.2 , 0.1 ], depletion_handling = true )
8
+ timed_calculate_electric_potential ! (sim, refinement_limits = [0.2 , 0.1 ], depletion_handling = true )
9
9
10
10
sim2 = Simulation {T} (" BEGe_01.yaml" )
11
- calculate_electric_potential ! (sim2, refinement_limits = [0.2 ], depletion_handling = true )
12
- calculate_electric_potential ! (sim2, refinement_limits = [0.1 ], depletion_handling = true , initialize = false )
11
+ timed_calculate_electric_potential ! (sim2, refinement_limits = [0.2 ], depletion_handling = true )
12
+ timed_calculate_electric_potential ! (sim2, refinement_limits = [0.1 ], depletion_handling = true , initialize = false )
13
13
14
14
@test size (sim. electric_potential. data) == size (sim2. electric_potential. data)
15
+ @test all (isapprox .(sim. electric_potential. data, sim2. electric_potential. data))
16
+ @test sim. electric_potential. grid == sim2. electric_potential. grid
15
17
16
- calculate_weighting_potential ! (sim, 1 , refinement_limits = [0.2 , 0.1 ], depletion_handling = true )
17
- calculate_weighting_potential ! (sim2, 1 , refinement_limits = [0.2 ], depletion_handling = true )
18
- calculate_weighting_potential ! (sim2, 1 , refinement_limits = [0.1 ], depletion_handling = true , initialize = false )
18
+ timed_calculate_weighting_potential ! (sim, 1 , refinement_limits = [0.2 , 0.1 ], depletion_handling = true )
19
+ timed_calculate_weighting_potential ! (sim2, 1 , refinement_limits = [0.2 ], depletion_handling = true )
20
+ timed_calculate_weighting_potential ! (sim2, 1 , refinement_limits = [0.1 ], depletion_handling = true , initialize = false )
19
21
20
22
@test size (sim. weighting_potentials[1 ]. data) == size (sim2. weighting_potentials[1 ]. data)
21
23
end
0 commit comments