From 126984099afc23a444a79afd5c761ff51fb03589 Mon Sep 17 00:00:00 2001 From: "Michael F. Herbst" Date: Wed, 17 May 2023 22:11:20 +0200 Subject: [PATCH] XC fixes --- src/terms/xc.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/terms/xc.jl b/src/terms/xc.jl index 3efb3af9ef..249e3c8fc0 100644 --- a/src/terms/xc.jl +++ b/src/terms/xc.jl @@ -382,7 +382,7 @@ function apply_kernel(term::TermXc, basis::PlaneWaveBasis{T}, δρ; ρ, kwargs.. terms = kernel_terms(term.functionals, density) δV = zero(ρ) # [ix, iy, iz, iσ] - Vρρ = to_device.(basis.architecture, reshape(terms.Vρρ, n_spin, n_spin, basis.fft_size...)) + Vρρ = to_device(basis.architecture, reshape(terms.Vρρ, n_spin, n_spin, basis.fft_size...)) @views for s in 1:n_spin, t in 1:n_spin # LDA term δV[:, :, :, s] .+= Vρρ[s, t, :, :, :] .* δρ[t, :, :, :] end @@ -422,9 +422,9 @@ function add_kernel_gradient_correction!(δV, terms, density, perturbation, cros δρ = perturbation.ρ_real ∇δρ = perturbation.∇ρ_real δσ = cross_derivatives[:δσ] - Vρσ = to_device.(basis.architecture, reshape(terms.Vρσ, n_spin, spin_σ, basis.fft_size...)) - Vσσ = to_device.(basis.architecture, reshape(terms.Vσσ, spin_σ, spin_σ, basis.fft_size...)) - Vσ = to_device.(basis.architecture, reshape(terms.Vσ, spin_σ, basis.fft_size...)) + Vρσ = to_device(basis.architecture, reshape(terms.Vρσ, n_spin, spin_σ, basis.fft_size...)) + Vσσ = to_device(basis.architecture, reshape(terms.Vσσ, spin_σ, spin_σ, basis.fft_size...)) + Vσ = to_device(basis.architecture, reshape(terms.Vσ, spin_σ, basis.fft_size...)) T = eltype(ρ) tσ = DftFunctionals.spinindex_σ