Skip to content

Commit 1f9a228

Browse files
author
Uwe Hernandez Acosta
committed
bump version of EletronicStructureModels to 0.2, fixed tests, removed patches
1 parent 9633b05 commit 1f9a228

File tree

5 files changed

+8
-24
lines changed

5 files changed

+8
-24
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
2525

2626
[compat]
2727
Distributions = "0.25.117"
28-
ElectronicStructureModels = "0.1"
28+
ElectronicStructureModels = "0.2"
2929
HDF5 = "0.17.2"
3030
LinearAlgebra = "1.10"
3131
LogExpFunctions = "0.3.29"

src/max_finder/quantile_reduction.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ function _findmax(method::QuantileReductionMethod, weights::AbstractVector)
1515
return weight
1616
end
1717
end
18-
return
18+
return sorted_weights[end]
1919
end

src/patch_QEDcore.jl

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,6 @@ end
2020
coordinate_symbols(in_psl::TwoBodyRestSystem) = coordinate_symbols(in_psl.coord)
2121
@inline coord_index(c_sym, coord_syms)::Int64 = findfirst(x -> x == c_sym, coord_syms)
2222

23-
function QEDcore.PhaseSpacePoint(
24-
p::AbstractProcessDefinition,
25-
m::AbstractModelDefinition,
26-
psl::AbstractPhaseSpaceLayout,
27-
coords::Tuple,
28-
)
29-
30-
in_dim = phase_space_dimension(p, m, in_phase_space_layout(psl))
31-
out_dim = phase_space_dimension(p, m, psl)
32-
return PhaseSpacePoint(
33-
p,
34-
m,
35-
psl,
36-
ntuple(i -> coords[i], in_dim),
37-
ntuple(i -> coords[in_dim + i], out_dim),
38-
)
39-
end
4023

4124
# PSL for heads-on collision
4225

test/setups/probing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const FIELD = DistributionBasedField(PHOTONDIST)
2828

2929
# MEDIUM
3030
const NE = 1.0e21u"cm^(-3)"
31-
const MATTERMODEL = IdealElectronSystem{ZeroTemperature}(NE)
31+
const MATTERMODEL = IdealElectronSystem(NE, ZeroTemperatureApprox())
3232
const SCREENING = Screening()
3333
const MEDIUM = InteractingElectronSystem(MATTERMODEL, SCREENING)
3434

test/test-max_finder.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ using QEDbase
88
using QEDprocesses
99
using XRTSProbing
1010

11-
RNG = Xoshiro(137)
11+
#RNG = Xoshiro(137)
12+
RNG = Random.Xoshiro(0xade95f7911a5ed27, 0x6afdf5bc148e56ef, 0x889de92d3feffd84, 0x3434b2628160aa75, 0x0769af4118a58ebb)
1213
ATOL = sqrt(eps())
1314
RTOL = sqrt(eps())
1415

@@ -22,7 +23,7 @@ const MAXITER = 50
2223

2324
const QUANTILES = (0.01, 0.001, 0.0001)
2425

25-
const OMEGAS = (rand(RNG), 1.0e2 * rand(RNG), rand(RNG), 1.0e3 * rand(RNG), 1.0e4 * rand(RNG))
26+
const OMEGAS = (rand(RNG), 1.0e2 * rand(RNG), 1.0e3 * rand(RNG), 1.0e4 * rand(RNG))
2627

2728

2829
@testset "om: $om" for om in OMEGAS
@@ -34,12 +35,12 @@ const OMEGAS = (rand(RNG), 1.0e2 * rand(RNG), rand(RNG), 1.0e3 * rand(RNG), 1.0e
3435

3536
train!(RNG, VP, MAXITER, NCALLS)
3637

37-
@testset "p: %p" for p in QUANTILES
38+
@testset "p: $p" for p in QUANTILES
3839
test_max_finder = QuantileReductionMethod(p, Int(1.0e6))
3940

4041
test_max_weight = XRTSProbing.findmax(RNG, DCSCACHED, test_max_finder, VP)
4142

42-
@testset "n: %n" for n in (Int(2.0e5), Int(1.0e6))
43+
@testset "n: $n" for n in (Int(1.0e6),)
4344
# groundtruth
4445
samples, jac = XRTSProbing._generate_coords(RNG, VP, n)
4546
weights = sort(@. DCSCACHED(samples) * jac)

0 commit comments

Comments
 (0)