Skip to content

Commit

Permalink
Fix tests for integration tests on QEDbase
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonReinhard committed Jun 19, 2024
1 parent c29838a commit 26dc858
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/QEDcore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include("algebraic_objects/four_momentum.jl")
include("algebraic_objects/lorentz_vector.jl")
include("algebraic_objects/gamma_matrices.jl")

include("particles/spinors.jl")
include("particles/particle_types.jl")
include("particles/spinors.jl")

end
15 changes: 7 additions & 8 deletions src/particles/spinors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function _build_particle_booster(
return (slashed(mom) + mass * one(DiracMatrix)) / (sqrt(abs(mom.t) + mass))
end

struct IncomingFermionSpinor <: QEDbase.AbstractParticleSpinor
struct IncomingFermionSpinor <: AbstractParticleSpinor
booster::DiracMatrix
end

Expand All @@ -59,7 +59,7 @@ end

const SpinorU = IncomingFermionSpinor

struct OutgoingFermionSpinor <: QEDbase.AbstractParticleSpinor
struct OutgoingFermionSpinor <: AbstractParticleSpinor
booster::DiracMatrix
end

Expand All @@ -86,7 +86,7 @@ function _build_antiparticle_booster(
return (mass * one(DiracMatrix) - slashed(mom)) / (sqrt(abs(mom.t) + mass))
end

struct OutgoingAntiFermionSpinor <: QEDbase.AbstractParticleSpinor
struct OutgoingAntiFermionSpinor <: AbstractParticleSpinor
booster::DiracMatrix
end

Expand All @@ -102,7 +102,7 @@ end

const SpinorV = OutgoingAntiFermionSpinor

struct IncomingAntiFermionSpinor <: QEDbase.AbstractParticleSpinor
struct IncomingAntiFermionSpinor <: AbstractParticleSpinor
booster::DiracMatrix
end

Expand All @@ -118,7 +118,6 @@ end

const SpinorVbar = IncomingAntiFermionSpinor

# TODO: reenable when it's no longer in QEDbase
# function getindex(SP::T, idx) where {T<:QEDbase.AbstractParticleSpinor}
# return idx in (1, 2) ? SP(idx) : throw(BoundsError())
# end
function getindex(SP::T, idx) where {T<:AbstractParticleSpinor}
return idx in (1, 2) ? SP(idx) : throw(BoundsError())
end
1 change: 1 addition & 0 deletions test/particles/types.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using QEDbase
using QEDcore
using StaticArrays
using Random

Expand Down

0 comments on commit 26dc858

Please sign in to comment.