Skip to content

Commit 1b35375

Browse files
AntonReinhardAntonReinhard
and
AntonReinhard
authored
Remove interfaces and functionality that move (#74)
The interfaces and functionality have moved to QEDbase and QEDcore. --------- Co-authored-by: AntonReinhard <[email protected]>
1 parent 9662bf3 commit 1b35375

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+166
-2034
lines changed

Project.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ julia = "1.6"
2323
[extras]
2424
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
2525
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
26-
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
2726
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2827

2928
[targets]
30-
test = ["Random", "SafeTestsets", "Suppressor", "Test"]
29+
test = ["Random", "SafeTestsets", "Test"]

add_QEDcore_dev.jl

-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33

44
using Pkg: Pkg
55
Pkg.add(; url="https://github.com/QEDjl-project/QEDcore.jl", rev="dev")
6-
#Pkg.add(; url="https://github.com/QEDjl-project/QEDbase.jl.git", rev="process_interfaces")

docs/make.jl

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
using QEDprocesses
1+
using Pkg
2+
3+
# targeting the correct source code
4+
# this asumes the make.jl script is located in QEDprocesses.jl/docs
5+
project_path = Base.Filesystem.joinpath(Base.Filesystem.dirname(Base.source_path()), "..")
6+
Pkg.develop(; path=project_path)
7+
# temporarily necessary because processes used to have a compat that is gone after the `develop` above
8+
Pkg.update()
9+
210
using Documenter
11+
using QEDprocesses
312

413
DocMeta.setdocmeta!(QEDprocesses, :DocTestSetup, :(using QEDprocesses); recursive=true)
514

src/QEDprocesses.jl

+14-49
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,46 @@
1-
2-
# TODO: remove after refac
3-
__precompile__(false)
4-
51
module QEDprocesses
62

73
# constants
84
export ALPHA,
95
ALPHA_SQUARE, ELEMENTARY_CHARGE, ELEMENTARY_CHARGE_SQUARE, ELECTRONMASS, ONE_OVER_FOURPI
106

11-
# Abstract model interface
12-
export AbstractModelDefinition, fundamental_interaction_type
7+
# propagator
8+
export propagator
139

14-
# Abstract process interface
15-
export AbstractProcessDefinition, incoming_particles, outgoing_particles
16-
export number_incoming_particles, number_outgoing_particles
17-
export particles, number_particles
10+
# specific compute models
11+
export PerturbativeQED
1812

19-
# probabilities
20-
export differential_probability, unsafe_differential_probability
21-
export total_probability
13+
# specific scattering processes
14+
export Compton, omega_prime
2215

2316
# probabilities
2417
export differential_probability, unsafe_differential_probability
2518
export total_probability
2619

27-
# differential cross section
20+
# differential cross sections
2821
export differential_cross_section, unsafe_differential_cross_section
2922
export total_cross_section
3023

31-
# Abstract setup interface
32-
export AbstractComputationSetup, InvalidInputError, compute
33-
export AbstractProcessSetup, scattering_process, physical_model
34-
35-
# propagator
36-
export propagator
37-
38-
# phase space
39-
export AbstractCoordinateSystem, SphericalCoordinateSystem
40-
export AbstractFrameOfReference, CenterOfMomentumFrame, ElectronRestFrame
41-
export AbstractPhasespaceDefinition, PhasespaceDefinition
42-
export ParticleStateful, PhaseSpacePoint, InPhaseSpacePoint, OutPhaseSpacePoint
43-
export spin, polarization, particle_direction, particle_species, momentum, momenta, getindex
44-
45-
# specific compute models
46-
export PerturbativeQED
47-
48-
# specific scattering processes
49-
export Compton, omega_prime
50-
51-
using QEDbase: QEDbase
24+
using QEDbase
5225
using QEDcore
5326
using StaticArrays
5427
using QuadGK
5528

5629
include("constants.jl")
5730
include("utils.jl")
5831

59-
include("interfaces/model_interface.jl")
60-
include("interfaces/process_interface.jl")
61-
include("interfaces/setup_interface.jl")
62-
63-
include("phase_spaces/types.jl")
64-
include("phase_spaces/access.jl")
65-
include("phase_spaces/create.jl")
66-
include("phase_spaces/print.jl")
67-
include("phase_spaces/utility.jl")
68-
69-
include("momentum_generation.jl")
70-
include("propagators.jl")
71-
7232
include("cross_section/diff_probability.jl")
7333
include("cross_section/diff_cross_section.jl")
7434
include("cross_section/total_probability.jl")
7535
include("cross_section/total_cross_section.jl")
7636

7737
include("models/models.jl")
78-
include("processes/one_photon_compton/one_photon_compton.jl")
38+
39+
# one photon compton
40+
include("processes/one_photon_compton/process.jl")
41+
include("processes/one_photon_compton/perturbative/kinematics.jl")
42+
include("processes/one_photon_compton/perturbative/cross_section.jl")
43+
include("processes/one_photon_compton/perturbative/total_probability.jl")
7944

8045
include("patch_QEDbase.jl")
8146
end

src/cross_section/diff_cross_section.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Return the differential cross section evaluated on a phase space point without checking if the given phase space is physical.
1212
"""
1313
function unsafe_differential_cross_section(phase_space_point::PhaseSpacePoint)
14-
I = 1 / (4 * _incident_flux(phase_space_point))
14+
I = 1 / (4 * QEDbase._incident_flux(phase_space_point))
1515

1616
return I * unsafe_differential_probability(phase_space_point)
1717
end
@@ -22,8 +22,8 @@ end
2222
If the given phase spaces are physical, return differential cross section evaluated on a phase space point. Zero otherwise.
2323
"""
2424
function differential_cross_section(phase_space_point::PhaseSpacePoint)
25-
if !_is_in_phasespace(phase_space_point)
26-
return zero(eltype(_momentum_type(phase_space_point)))
25+
if !QEDbase._is_in_phasespace(phase_space_point)
26+
return zero(eltype(QEDcore._momentum_type(phase_space_point)))
2727
end
2828

2929
return unsafe_differential_cross_section(phase_space_point)

src/cross_section/diff_probability.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# convenience function
1010
# can be overloaded if an analytical version is known
1111
function _matrix_element_square(psp::PhaseSpacePoint)
12-
mat_el = _matrix_element(psp)
12+
mat_el = QEDbase._matrix_element(psp)
1313
return abs2.(mat_el)
1414
end
1515

@@ -21,9 +21,9 @@ Return differential probability evaluated on a phase space point without checkin
2121
function unsafe_differential_probability(psp::PhaseSpacePoint)
2222
matrix_elements_sq = _matrix_element_square(psp)
2323

24-
normalization = _averaging_norm(psp.proc)
24+
normalization = QEDbase._averaging_norm(psp.proc)
2525

26-
ps_fac = _phase_space_factor(psp)
26+
ps_fac = QEDbase._phase_space_factor(psp)
2727

2828
return normalization * sum(matrix_elements_sq) * ps_fac
2929
end
@@ -34,8 +34,8 @@ end
3434
If the given phase spaces are physical, return differential probability evaluated on a phase space point. Zero otherwise.
3535
"""
3636
function differential_probability(phase_space_point::PhaseSpacePoint)
37-
if !_is_in_phasespace(phase_space_point)
38-
return zero(eltype(momentum(phase_space_point, QEDbase.Incoming(), 1)))
37+
if !QEDbase._is_in_phasespace(phase_space_point)
38+
return zero(eltype(momentum(phase_space_point, Incoming(), 1)))
3939
end
4040

4141
return unsafe_differential_probability(phase_space_point)

src/cross_section/total_cross_section.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"""
77
total_cross_section(in_psp::InPhaseSpacePoint)
88
9-
Return the total cross section for a given [`InPhaseSpacePoint`](@ref).
9+
Return the total cross section for a given `QEDcore.InPhaseSpacePoint`.
1010
"""
1111
function total_cross_section(in_psp::InPhaseSpacePoint)
12-
I = 1 / (4 * _incident_flux(in_psp))
13-
return I * _total_probability(in_psp)
12+
I = 1 / (4 * QEDbase._incident_flux(in_psp))
13+
return I * QEDbase._total_probability(in_psp)
1414
end

src/cross_section/total_probability.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"""
66
total_probability(in_psp::InPhaseSpacePoint)
77
8-
Return the total probability of a given [`InPhaseSpacePoint`](@ref).
8+
Return the total probability of a given `QEDcore.InPhaseSpacePoint`.
99
"""
1010
function total_probability(in_psp::InPhaseSpacePoint)
11-
return _total_probability(in_psp)
11+
return QEDbase._total_probability(in_psp)
1212
end

src/interfaces/model_interface.jl

-27
This file was deleted.

0 commit comments

Comments
 (0)