From de4fd0958079bd7e7f8ea0645c55e834cb627497 Mon Sep 17 00:00:00 2001 From: AntonReinhard Date: Tue, 29 Oct 2024 12:18:15 +0100 Subject: [PATCH] Fix tests again --- .../perturbative/cross_section.jl | 24 ++++++++++--------- test/gpu/process_interface.jl | 3 ++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/processes/one_photon_compton/perturbative/cross_section.jl b/src/processes/one_photon_compton/perturbative/cross_section.jl index 23618a5..c1ff2ab 100644 --- a/src/processes/one_photon_compton/perturbative/cross_section.jl +++ b/src/processes/one_photon_compton/perturbative/cross_section.jl @@ -106,17 +106,19 @@ function _pert_compton_matrix_element( QEDbase._as_svec(out_photon_state), ) - matrix_elements = NTuple{length(base_states_comb),ComplexF64}( - _pert_compton_matrix_element_single( - in_electron_mom, - in_el, - in_photon_mom, - in_ph, - out_electron_mom, - out_el, - out_photon_mom, - out_ph, - ) for (in_el, in_ph, out_el, out_ph) in base_states_comb + matrix_elements::NTuple{length(base_states_comb),ComplexF64} = ( + ( + _pert_compton_matrix_element_single( + in_electron_mom, + in_el, + in_photon_mom, + in_ph, + out_electron_mom, + out_el, + out_photon_mom, + out_ph, + ) for (in_el, in_ph, out_el, out_ph) in base_states_comb + )..., ) return matrix_elements diff --git a/test/gpu/process_interface.jl b/test/gpu/process_interface.jl index 9586b1d..42e7501 100644 --- a/test/gpu/process_interface.jl +++ b/test/gpu/process_interface.jl @@ -113,7 +113,8 @@ RNG = Random.MersenneTwister(573) @test all( tuple_isapprox.( Vector(QEDbase._matrix_element.(gpupsps)), - QEDbase._matrix_element.(psps), + QEDbase._matrix_element.(psps); + rtol=sqrt(eps(Float64)), ), )