Now targeting the correct branches Co-authored-by: Rubydragon <anton.reinhard@proton.me> Reviewed-on: #12
26 lines
874 B
Julia
26 lines
874 B
Julia
# patch QEDprocesses
|
|
# see issue https://github.com/QEDjl-project/QEDprocesses.jl/issues/77
|
|
@inline function QEDprocesses.number_particles(
|
|
proc_def::QEDbase.AbstractProcessDefinition,
|
|
::Type{PS},
|
|
) where {
|
|
DIR <: QEDbase.ParticleDirection,
|
|
PT <: QEDbase.AbstractParticleType,
|
|
EL <: AbstractFourMomentum,
|
|
PS <: ParticleStateful{DIR, PT, EL},
|
|
}
|
|
return QEDprocesses.number_particles(proc_def, DIR(), PT())
|
|
end
|
|
|
|
@inline function QEDcore.ParticleStateful{DIR, SPECIES}(
|
|
mom::AbstractFourMomentum,
|
|
) where {DIR <: ParticleDirection, SPECIES <: AbstractParticleType}
|
|
return ParticleStateful(DIR(), SPECIES(), mom)
|
|
end
|
|
|
|
@inline function QEDcore.ParticleStateful{DIR, SPECIES, EL}(
|
|
mom::EL,
|
|
) where {DIR <: ParticleDirection, SPECIES <: AbstractParticleType, EL <: AbstractFourMomentum}
|
|
return ParticleStateful(DIR(), SPECIES(), mom)
|
|
end
|