Documentation for module xc_derivative_types

Provides types for the management of the xc-functionals and their derivatives.

source: xc_derivative_types.F
Loading...

public Types:

xc_derivative_type
represent a derivative of a functional
xc_derivative_p_type
represent a pointer to a derivative (to have arrays of derivatives)

public Subroutines/Functions:

allocates and initializes a derivative type
returns various information on the given derivative
allocates and initializes a derivative type

public Types:

TYPE :: xc_derivative_p_type

represent a pointer to a derivative (to have arrays of derivatives)


POINTER :: deriv the pointer to the derivative

TYPE :: xc_derivative_type

represent a derivative of a functional


INTEGER
:: ref_count ...
INTEGER
:: id_nr ...
:: desc ...
CHARACTER(max_label_length),
DIMENSION(:), POINTER :: split_desc ...
REAL(dp),
DIMENSION(:,:,:), POINTER :: deriv_data ...

SUBROUTINExc_derivative_create(derivative, desc, cr3d_ptr)

allocates and initializes a derivative type

Arguments:
POINTER
:: derivative the object to create
CHARACTER(*),
INTENT(in)
:: desc the derivative description
REAL(dp),
POINTER
:: cr3d_ptr(:,:,:) the data array (the ownership of it passes to the derivative type), the array is not zeroed

SUBROUTINExc_derivative_get(deriv, desc, split_desc, order, deriv_data, accept_null_data)

returns various information on the given derivative

Arguments:
POINTER
:: deriv thederivative you whant information about
INTENT(out),
OPTIONAL
:: desc a string that describes the derivative (empty string for the function itself, otherwise a string of the form "(rho)(rho)(norm_drhoa)")
CHARACTER(max_label_length),
OPTIONAL, POINTER
:: split_desc(:) the same as desc but with an array of strings, and a derivative coordinate in each string (the previous example would become (/"rho","rho","norm_drhoa"/)
INTEGER,
INTENT(out),
OPTIONAL
:: order the order of the derivative
REAL(dp),
OPTIONAL, POINTER
:: deriv_data(:,:,:) the 3d real array with the derivative
LOGICAL,
INTENT(in),
OPTIONAL
:: accept_null_data if deriv_data can be unassociated (defaults to no)

SUBROUTINExc_derivative_release(derivative, pw_pool)

allocates and initializes a derivative type

Arguments:
POINTER
:: derivative the object to create
OPTIONAL, POINTER
:: pw_pool if given gives back the cr3d array %deriv_data back to it instead of deallocating it