17#include "../base/base_uses.f90"
23 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'xc_derivative_types'
33 INTEGER,
DIMENSION(:),
POINTER :: split_desc => null()
34 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER,
CONTIGUOUS :: deriv_data => null()
60 INTEGER,
DIMENSION(:),
INTENT(in) :: desc
61 REAL(kind=
dp),
CONTIGUOUS,
DIMENSION(:, :, :), &
65 derivative%deriv_data => r3d_ptr
80 IF (
PRESENT(pw_pool))
THEN
81 IF (
ASSOCIATED(pw_pool))
THEN
82 CALL pw_pool%give_back_cr3d(derivative%deriv_data)
85 IF (
ASSOCIATED(derivative%deriv_data))
THEN
86 DEALLOCATE (derivative%deriv_data)
88 IF (
ASSOCIATED(derivative%split_desc))
DEALLOCATE (derivative%split_desc)
102 order, deriv_data, accept_null_data)
104 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: split_desc
105 INTEGER,
INTENT(out),
OPTIONAL :: order
106 REAL(kind=
dp),
DIMENSION(:, :, :),
OPTIONAL, &
107 POINTER :: deriv_data
108 LOGICAL,
INTENT(in),
OPTIONAL :: accept_null_data
110 LOGICAL :: my_accept_null_data
112 my_accept_null_data = .false.
113 IF (
PRESENT(accept_null_data)) my_accept_null_data = accept_null_data
115 IF (
PRESENT(split_desc)) split_desc => deriv%split_desc
116 IF (
PRESENT(deriv_data))
THEN
117 deriv_data => deriv%deriv_data
118 IF (.NOT. my_accept_null_data)
THEN
119 cpassert(
ASSOCIATED(deriv_data))
122 IF (
PRESENT(order)) order =
SIZE(deriv%split_desc)
Defines the basic variable types.
integer, parameter, public dp
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
Module with functions to handle derivative descriptors. derivative description are strings have the f...
subroutine, public create_split_desc(desc, split_desc)
...
Provides types for the management of the xc-functionals and their derivatives.
subroutine, public xc_derivative_get(deriv, split_desc, order, deriv_data, accept_null_data)
returns various information on the given derivative
subroutine, public xc_derivative_release(derivative, pw_pool)
allocates and initializes a derivative type
subroutine, public xc_derivative_create(derivative, desc, r3d_ptr)
allocates and initializes a derivative type
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
represent a pointer to a derivative (to have arrays of derivatives)
represent a derivative of a functional