18 USE dbcsr_api,
ONLY: dbcsr_p_type
29 #include "./base/base_uses.f90"
33 PUBLIC :: qs_p_env_type
36 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
37 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_p_env_types'
59 LOGICAL :: orthogonal_orbitals
60 TYPE(qs_kpp1_env_type),
POINTER :: kpp1_env => null()
61 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: kpp1 => null()
62 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: kpp1_admm => null()
63 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: p1 => null()
64 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: p1_admm => null()
65 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: w1 => null()
66 TYPE(cp_fm_type),
DIMENSION(:),
POINTER :: m_epsilon => null()
67 TYPE(cp_fm_type),
DIMENSION(:),
POINTER :: psi0d => null()
68 TYPE(cp_fm_type),
DIMENSION(:),
POINTER :: S_psi0 => null()
69 TYPE(cp_fm_type),
DIMENSION(:),
POINTER :: Smo_inv => null()
70 TYPE(qs_rho_type),
POINTER :: rho1 => null()
71 TYPE(qs_rho_type),
POINTER :: rho1_xc => null()
72 TYPE(qs_rho_type),
POINTER :: rho1_admm => null()
73 INTEGER,
DIMENSION(2) :: n_mo, &
76 TYPE(hartree_local_type),
POINTER :: hartree_local => null()
77 TYPE(local_rho_type),
POINTER :: local_rho_set => null()
78 TYPE(local_rho_type),
POINTER :: local_rho_set_admm => null()
81 TYPE(cp_fm_type),
DIMENSION(:),
POINTER :: PS_psi0 => null()
84 LOGICAL :: new_preconditioner
85 TYPE(preconditioner_type),
DIMENSION(:),
POINTER :: preconditioner => null()
87 END TYPE qs_p_env_type
100 TYPE(qs_p_env_type) :: p_env
104 IF (
ASSOCIATED(p_env%kpp1_env))
THEN
106 DEALLOCATE (p_env%kpp1_env)
107 NULLIFY (p_env%kpp1_env)
109 CALL cp_fm_release(p_env%S_psi0)
110 CALL cp_fm_release(p_env%m_epsilon)
111 CALL cp_fm_release(p_env%psi0d)
112 CALL cp_fm_release(p_env%Smo_inv)
113 IF (
ASSOCIATED(p_env%rho1_xc))
THEN
115 DEALLOCATE (p_env%rho1_xc)
117 IF (
ASSOCIATED(p_env%rho1))
THEN
119 DEALLOCATE (p_env%rho1)
121 IF (
ASSOCIATED(p_env%rho1_admm))
THEN
123 DEALLOCATE (p_env%rho1_admm)
130 IF (
ASSOCIATED(p_env%local_rho_set))
THEN
133 IF (
ASSOCIATED(p_env%hartree_local))
THEN
136 IF (
ASSOCIATED(p_env%local_rho_set_admm))
THEN
139 IF (
ASSOCIATED(p_env%PS_psi0))
THEN
140 CALL cp_fm_release(p_env%PS_psi0)
142 IF (
ASSOCIATED(p_env%preconditioner))
THEN
143 DO ip = 1,
SIZE(p_env%preconditioner, 1)
146 DEALLOCATE (p_env%preconditioner)
DBCSR operations in CP2K.
represent a full matrix distributed on many processors
subroutine, public hartree_local_release(hartree_local)
...
subroutine, public destroy_preconditioner(preconditioner_env)
...
basis types for the calculation of the perturbation of density theory.
subroutine, public kpp1_release(kpp1_env)
releases a kpp1_env (see doc/ReferenceCounting.html)
subroutine, public local_rho_set_release(local_rho_set)
...
basis types for the calculation of the perturbation of density theory.
subroutine, public p_env_release(p_env)
relases the given p_env (see doc/ReferenceCounting.html)
superstucture that hold various representations of the density and keeps track of which ones are vali...
subroutine, public qs_rho_release(rho_struct)
releases a rho_struct by decreasing the reference count by one and deallocating if it reaches 0 (to b...