Octopus
projector_matrix_oct_m Module Reference

Data Types

type  projector_matrix_t
 A set of projectors defined on a submesh. More...
 

Functions/Subroutines

subroutine, public projector_matrix_allocate (this, nprojs, sphere, has_mix_matrix, is_cmplx, complex_mix, nspin_channels)
 
subroutine, public projector_matrix_deallocate (this, owns_data)
 
subroutine, public projector_matrix_build_aug_ylm (this, lmaxq)
 Build (once, lazily) the cached real spherical harmonics Y_LM at the sphere points. More...
 

Function/Subroutine Documentation

◆ projector_matrix_allocate()

subroutine, public projector_matrix_oct_m::projector_matrix_allocate ( type(projector_matrix_t), intent(out)  this,
integer, intent(in)  nprojs,
type(submesh_t), intent(in)  sphere,
logical, intent(in)  has_mix_matrix,
logical, intent(in), optional  is_cmplx,
logical, intent(in), optional  complex_mix,
integer, intent(in), optional  nspin_channels 
)

Definition at line 159 of file projector_matrix.F90.

◆ projector_matrix_deallocate()

subroutine, public projector_matrix_oct_m::projector_matrix_deallocate ( type(projector_matrix_t), intent(inout)  this,
logical, intent(in), optional  owns_data 
)
Parameters
[in]owns_dataWhether this matrix owns its projector/aug_ylm arrays. Instances that alias the arrays of a donor instance pass .false. so the shared data survives them.

Definition at line 214 of file projector_matrix.F90.

◆ projector_matrix_build_aug_ylm()

subroutine, public projector_matrix_oct_m::projector_matrix_build_aug_ylm ( type(projector_matrix_t), intent(inout)  this,
integer, intent(in)  lmaxq 
)

Build (once, lazily) the cached real spherical harmonics Y_LM at the sphere points.

The ultrasoft augmentation/screening sums need Y_LM(r_hat) at the (fixed-during-SCF) sphere points, for L = 0..lmaxq, M = -L..L, indexed lm = L*(L+1)+M+1. They depend only on the sphere geometry, so they are computed once and reused by update_dij, the augmentation density and the forces. Does nothing if the cache is already present (it is freed when the projectors are rebuilt, or after each call with USPPSaveMemory).

Definition at line 261 of file projector_matrix.F90.