52 integer,
public :: n_c
53 real(real64),
allocatable,
public :: p(:,:)
54 real(real64),
allocatable,
public :: e(:)
62 type(kb_projector_t),
intent(inout) :: kb_p
63 type(submesh_t),
intent(in) :: sm
64 class(pseudopotential_t),
intent(in) :: pseudo
65 integer,
intent(in) :: l, lm
66 type(double_grid_t),
intent(in) :: dgrid
69 logical,
optional,
intent(in) :: fill
72 integer,
allocatable :: llv(:), mmv(:)
73 real(real64),
allocatable :: rcut(:)
78 kb_p%n_c = pseudo%ps%projectors_per_l(l+1)
80 safe_allocate(kb_p%p (1:kb_p%n_s, 1:max(kb_p%n_c,2)))
82 safe_allocate(kb_p%e (1:max(kb_p%n_c,2)))
87 else if (dgrid%enabled .and. kb_p%n_c > 0)
then
89 safe_allocate(llv(1:kb_p%n_c))
90 safe_allocate(mmv(1:kb_p%n_c))
91 safe_allocate(rcut(1:kb_p%n_c))
95 rcut(ic) = pseudo%ps%kb(l, ic)%x_threshold
98 llv, mmv, rcut, kb_p%p(:, 1:kb_p%n_c))
99 safe_deallocate_a(llv)
100 safe_deallocate_a(mmv)
101 safe_deallocate_a(rcut)
109 kb_p%e(ic) = pseudo%ps%h(l, ic, ic)
115 do ic = 0, kb_p%n_c/2-1
116 kb_p%e(2*ic+1) = kb_p%e(2*ic+1)*real(l+1, real64) /real(2*l+1, real64)
117 kb_p%e(2*ic+2) = kb_p%e(2*ic+2)*real(l, real64) /real(2*l+1, real64)
130 safe_deallocate_a(kb_p%p)
131 safe_deallocate_a(kb_p%e)
138#include "kb_projector_inc.F90"
141#include "complex.F90"
142#include "kb_projector_inc.F90"
The Ono-Hirose double-grid technique [T. Ono and K. Hirose, Phys. Rev. Lett. 82, 5016 (1999); Phys....
subroutine, public double_grid_transform(this, sm, nf, spl, ll, mm, rcut, feff, cart_dir, cache)
Evaluate a batch of localized functions f_jf(x) = spl_jf(r) * Y_{ll,mm}(x) (or a purely radial spl_jf...
real(real64), parameter, public m_zero
This module implements the underlying real-space grid.
subroutine, public zkb_project_ket(kb_p, dim, uvpsi, psi)
THREADSAFE.
subroutine, public kb_projector_init(kb_p, sm, pseudo, l, lm, dgrid, fill)
subroutine, public zkb_project_bra(mesh, sm, kb_p, dim, psi, uvpsi)
THREADSAFE.
subroutine, public dkb_project(mesh, sm, kb_p, dim, psi, ppsi)
dkb_project calculates the action of the projector kb_p on the psi wavefunction. The action of the pr...
subroutine, public kb_projector_end(kb_p)
subroutine, public dkb_project_bra(mesh, sm, kb_p, dim, psi, uvpsi)
THREADSAFE.
subroutine, public zkb_project(mesh, sm, kb_p, dim, psi, ppsi)
zkb_project calculates the action of the projector kb_p on the psi wavefunction. The action of the pr...
subroutine, public dkb_project_ket(kb_p, dim, uvpsi, psi)
THREADSAFE.
This module defines the meshes, which are used in Octopus.
/* To use the profiling module, call profiling_in and profiling_out with the label of the region as a...
integer, parameter, public proj_j_dependent
Fully-relativistic j-dependent pseudopotentials.
subroutine, public pseudopotential_real_nl_projector(spec, np, x, r, l, lm, i, uV)
This routine returns the non-local projector and its derivative, built using real spherical harmonics...