Étienne Polack
Étienne Polack
SCF accuracy ```julia is_converged=DFTK.ScfConvergenceDensity(1e-12), determine_diagtol=DFTK.ScfDiagtol(diagtol_max=1e-12), ```
In an older version of the code there was the line ```julia δψk[:, n] .+= ψk[:, m] .* αmn .* (dot(ψk[:, m], δHψ[ik][:, n]) - (n == m) * δεF)...
I have a very strange issue with the tests with this commit. In `tests/PlaneWaveBasis.jl`, the line ```julia @test all(Gplusk_vectors_cart(basis, kpt) .== map(q -> model.recip_lattice * q, Gplusk_vectors(basis, kpt))) ``` fails...
I checked master and I do not have this issue.
The test I added `Fixed Fermi level` seems very simple. Should I check returned values instead or is it okay to be that broad?
`isapprox` problem seems related to `StaticArrays`. MWE so far ```julia using StaticArrays const Mat3{T} = SMatrix{3, 3, T, 9} where {T} struct NOK{T
And putting `@noinline` before `recip_...` functions solves it.
I don't think I can remove the structures. The problem really happens when adding an union element.
No problem either when I do not cast the `recip_lattice` field.
And with less type abstract types ```julia using StaticArrays const Mat3 = SMatrix{3, 3, Float64, 9} struct NOK recip_lattice::Mat3 fixed_fermi_level::Union{Float64, Nothing} end struct OK recip_lattice::Mat3 fixed_fermi_level::Nothing end struct OK2 recip_lattice...