Skip to content

Commit

Permalink
Keep up to date with review changes on base PR
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonReinhard committed Jun 21, 2024
1 parent db551c2 commit ed086bd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions src/phase_spaces/access.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ end
QEDbase.process(psp::PhaseSpacePoint) = psp.proc
QEDbase.model(psp::PhaseSpacePoint) = psp.model
QEDbase.phase_space_definition(psp::PhaseSpacePoint) = psp.ps_def

QEDbase.particles(psp::PhaseSpacePoint, ::QEDbase.Incoming) = psp.in_particles
QEDbase.particles(psp::PhaseSpacePoint, ::QEDbase.Outgoing) = psp.out_particles
2 changes: 1 addition & 1 deletion src/phase_spaces/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ struct PhaseSpacePoint{
IN_PARTICLES<:Tuple{Vararg{ParticleStateful}},
OUT_PARTICLES<:Tuple{Vararg{ParticleStateful}},
ELEMENT<:QEDbase.AbstractFourMomentum,
} <: QEDbase.AbstractPhaseSpacePoint{PROC,MODEL,PSDEF,IN_PARTICLES,OUT_PARTICLES,ELEMENT}
} <: QEDbase.AbstractPhaseSpacePoint{PROC,MODEL,PSDEF,IN_PARTICLES,OUT_PARTICLES}
proc::PROC
model::MODEL
ps_def::PSDEF
Expand Down
8 changes: 4 additions & 4 deletions test/interfaces/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ struct TestProcess <: QEDbase.AbstractProcessDefinition end
struct TestModel <: QEDbase.AbstractModelDefinition end

struct TestProcessSetup <: QEDbase.AbstractProcessSetup end
QEDbase.QEDbase.scattering_process(::TestProcessSetup) = TestProcess()
QEDbase.QEDbase.physical_model(::TestProcessSetup) = TestModel()
QEDbase.scattering_process(::TestProcessSetup) = TestProcess()
QEDbase.physical_model(::TestProcessSetup) = TestModel()

struct TestProcessSetupFAIL <: QEDbase.AbstractProcessSetup end

Expand All @@ -182,8 +182,8 @@ struct TestProcessSetupFAIL <: QEDbase.AbstractProcessSetup end
INCOMING_PARTICLES = rand(RNG, PARTICLE_SET, N_INCOMING)
OUTGOING_PARTICLES = rand(RNG, PARTICLE_SET, N_OUTGOING)

@suppress QEDbase.QEDbase.incoming_particles(::TestProcess) = INCOMING_PARTICLES
@suppress QEDbase.QEDbase.outgoing_particles(::TestProcess) = OUTGOING_PARTICLES
@suppress QEDbase.incoming_particles(::TestProcess) = INCOMING_PARTICLES
@suppress QEDbase.outgoing_particles(::TestProcess) = OUTGOING_PARTICLES

@testset "delegated functions" begin
stp = TestProcessSetup()
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ begin
include("particles/types.jl")
end

@time @safetestset "particle types" begin
@time @safetestset "particle states" begin
include("particles/states.jl")
end

Expand Down
8 changes: 4 additions & 4 deletions test/test_implementation/test_process.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function TestProcess(rng::AbstractRNG, N_in::Int, N_out::Int)
return TestProcess(in_particles, out_particles)
end

QEDbase.QEDbase.incoming_particles(proc::TestProcess) = proc.incoming_particles
QEDbase.QEDbase.outgoing_particles(proc::TestProcess) = proc.outgoing_particles
QEDbase.incoming_particles(proc::TestProcess) = proc.incoming_particles
QEDbase.outgoing_particles(proc::TestProcess) = proc.outgoing_particles

struct TestProcess_FAIL{IP<:Tuple,OP<:Tuple} <: QEDbase.AbstractProcessDefinition
incoming_particles::IP
Expand Down Expand Up @@ -69,8 +69,8 @@ function TestProcess_FAIL_DIFFCS(rng::AbstractRNG, N_in::Int, N_out::Int)
return TestProcess_FAIL_DIFFCS(in_particles, out_particles)
end

QEDbase.QEDbase.incoming_particles(proc::TestProcess_FAIL_DIFFCS) = proc.incoming_particles
QEDbase.QEDbase.outgoing_particles(proc::TestProcess_FAIL_DIFFCS) = proc.outgoing_particles
QEDbase.incoming_particles(proc::TestProcess_FAIL_DIFFCS) = proc.incoming_particles
QEDbase.outgoing_particles(proc::TestProcess_FAIL_DIFFCS) = proc.outgoing_particles

# dummy phase space definition + failing phase space definition
struct TestPhasespaceDef <: QEDbase.AbstractPhasespaceDefinition end
Expand Down

0 comments on commit ed086bd

Please sign in to comment.