23#include "./base/base_uses.f90"
28 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
29 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_diis_types'
45 INTEGER :: nbuffer = -1
47 TYPE(
cp_fm_type),
DIMENSION(:, :),
POINTER :: error => null()
48 TYPE(
cp_fm_type),
DIMENSION(:, :),
POINTER :: param => null()
49 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: b_matrix => null()
61 INTEGER :: nbuffer = -1
65 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: b_matrix => null()
76 INTEGER :: nbuffer = -1
79 TYPE(
cp_cfm_type),
DIMENSION(:, :, :),
POINTER :: param => null()
80 TYPE(
cp_cfm_type),
DIMENSION(:, :, :),
POINTER :: error => null()
81 COMPLEX(KIND=dp),
DIMENSION(:, :),
POINTER :: b_matrix => null()
96 IF (
ALLOCATED(diis_buffer%overlap_copy_plan))
DEALLOCATE (diis_buffer%overlap_copy_plan)
97 IF (
ASSOCIATED(diis_buffer%b_matrix))
THEN
98 DEALLOCATE (diis_buffer%b_matrix)
118 IF (
ASSOCIATED(diis_buffer%b_matrix))
THEN
119 DEALLOCATE (diis_buffer%b_matrix)
121 IF (
ASSOCIATED(diis_buffer%error))
THEN
122 DO j = 1,
SIZE(diis_buffer%error, 2)
123 DO i = 1,
SIZE(diis_buffer%error, 1)
125 DEALLOCATE (diis_buffer%error(i, j)%matrix)
128 DEALLOCATE (diis_buffer%error)
130 IF (
ASSOCIATED(diis_buffer%param))
THEN
131 DO j = 1,
SIZE(diis_buffer%param, 2)
132 DO i = 1,
SIZE(diis_buffer%param, 1)
134 DEALLOCATE (diis_buffer%param(i, j)%matrix)
137 DEALLOCATE (diis_buffer%param)
150 IF (
ASSOCIATED(diis_buffer%b_matrix))
THEN
151 DEALLOCATE (diis_buffer%b_matrix)
153 IF (
ASSOCIATED(diis_buffer%smat))
THEN
154 DO i = 1,
SIZE(diis_buffer%smat)
157 DEALLOCATE (diis_buffer%smat)
159 IF (
ASSOCIATED(diis_buffer%error))
THEN
160 DO k = 1,
SIZE(diis_buffer%error, 3)
161 DO j = 1,
SIZE(diis_buffer%error, 2)
162 DO i = 1,
SIZE(diis_buffer%error, 1)
167 DEALLOCATE (diis_buffer%error)
169 IF (
ASSOCIATED(diis_buffer%param))
THEN
170 DO k = 1,
SIZE(diis_buffer%param, 3)
171 DO j = 1,
SIZE(diis_buffer%param, 2)
172 DO i = 1,
SIZE(diis_buffer%param, 1)
177 DEALLOCATE (diis_buffer%param)
Represents a complex full matrix distributed on many processors.
subroutine, public cp_cfm_release(matrix)
Releases a full matrix.
subroutine, public dbcsr_release(matrix)
...
DBCSR operations in CP2K.
represent a full matrix distributed on many processors
Defines the basic variable types.
integer, parameter, public dp
buffer for the diis of the scf
subroutine, public qs_diis_b_release_kp(diis_buffer)
releases the given diis KP buffer
subroutine, public qs_diis_b_release(diis_buffer)
releases the given diis buffer (see doc/ReferenceCounting.html)
subroutine, public qs_diis_b_release_sparse(diis_buffer)
releases the given diis buffer (see doc/ReferenceCounting.html)
Represent a complex full matrix.
build arrau of pointers to diis buffers in the k-point (complex full matrices) case
build array of pointers to diis buffers for sparse matrix case
keeps a buffer with the previous values of s,p,k