CP2K 2.4 (Revision 12889)
Classes | Functions | Variables

xc_rho_set_types Namespace Reference

contains the structure More...

Classes

struct  xc_rho_set_type
 represent a density, with all the representation and data needed to perform a functional evaluation More...

Functions

subroutine, public xc_rho_set_create (rho_set, local_bounds, rho_cutoff, drho_cutoff, tau_cutoff, error)
 allocates and does (minimal) initialization of a rho_set
subroutine, public xc_rho_set_retain (rho_set, error)
 retains the given rho_set
subroutine, public xc_rho_set_release (rho_set, pw_pool, error)
 releases the given rho_set
subroutine, public xc_rho_set_get (rho_set, can_return_null, rho, drho, norm_drho, rhoa, rhob, norm_drhoa, norm_drhob, drhoa_drhob, rho_1_3, rhoa_1_3, rhob_1_3, laplace_rho, laplace_rhoa, laplace_rhob, drhoa, drhob, rho_cutoff, drho_cutoff, tau_cutoff, tau, tau_a, tau_b, local_bounds, error)
 returns the various attributes of rho_set
subroutine xc_rho_set_clean (rho_set, pw_pool, error)
 cleans (releases) most of the data stored in the rho_set giving back what it can to the pw_pool
subroutine, public xc_rho_set_update (rho_set, rho_r, rho_g, tau, needs, xc_deriv_method_id, xc_rho_smooth_id, cell, pw_pool, error)
 updates the given rho set with the density given by rho_r (and rho_g). The rho set will contain the components specified in needs

Variables

LOGICAL, parameter, private debug_this_module = .FALSE.
CHARACTER(len=*), parameter,
private 
moduleN = 'xc_rho_set_types'
INTEGER, save last_rho_set_id = 0

Detailed Description

contains the structure

History
11.2003 created [fawzi]
Author:
fawzi

Function Documentation

subroutine xc_rho_set_types::xc_rho_set_clean ( TYPE(xc_rho_set_type),pointer  rho_set,
TYPE(pw_pool_type),pointer  pw_pool,
TYPE(cp_error_type),intent(inout)  error 
) [private]

cleans (releases) most of the data stored in the rho_set giving back what it can to the pw_pool

Parameters:
rho_setthe rho_set to be cleaned
pw_poolplace to give back 3d arrays,...
errorvariable to control error logging, stopping,... see module cp_error_handling
Author:
Fawzi Mohamed

Definition at line 484 of file xc_rho_set_types.f90.

Referenced by xc_rho_set_release(), and xc_rho_set_update().

Here is the caller graph for this function:

subroutine,public xc_rho_set_types::xc_rho_set_create ( TYPE(xc_rho_set_type),pointer  rho_set,
INTEGER,dimension(2, 3),intent(in)  local_bounds,
REAL(kind=dp),intent(in),optional  rho_cutoff,
REAL(kind=dp),intent(in),optional  drho_cutoff,
REAL(kind=dp),intent(in),optional  tau_cutoff,
TYPE(cp_error_type),intent(inout)  error 
)

allocates and does (minimal) initialization of a rho_set

Parameters:
rho_setthe structure to allocate
errorvariable to control error logging, stopping,... see module cp_error_handling

Definition at line 123 of file xc_rho_set_types.f90.

References CPPostcondition, error, and last_rho_set_id.

Referenced by xc_pot_saop::add_saop_pot(), qs_linres_methods::apply_op_2(), atom_xc::calculate_atom_vxc_lda(), atom_xc::calculate_atom_vxc_lsd(), qs_vxc_atom::calculate_vxc_atom(), qs_vxc_atom::calculate_xc_2nd_deriv_atom(), xc_pot_saop::gapw_add_atomic_saop_pot(), qs_kpp1_env_methods::kpp1_calc_k_p_p1(), and xc::xc_rho_set_and_dset_create().

Here is the caller graph for this function:

subroutine,public xc_rho_set_types::xc_rho_set_get ( TYPE(xc_rho_set_type),pointer  rho_set,
LOGICAL,intent(in),optional  can_return_null,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  rho,
TYPE(cp_3d_r_p_type),dimension(:),optional,pointer  drho,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  norm_drho,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  rhoa,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  rhob,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  norm_drhoa,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  norm_drhob,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  drhoa_drhob,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  rho_1_3,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  rhoa_1_3,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  rhob_1_3,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  laplace_rho,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  laplace_rhoa,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  laplace_rhob,
TYPE(cp_3d_r_p_type),dimension(:),optional,pointer  drhoa,
TYPE(cp_3d_r_p_type),dimension(:),optional,pointer  drhob,
REAL(kind=dp),intent(out),optional  rho_cutoff,
REAL(kind=dp),intent(out),optional  drho_cutoff,
REAL(kind=dp),intent(out),optional  tau_cutoff,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  tau,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  tau_a,
REAL(KIND=dp),dimension(:, :, :),optional,pointer  tau_b,
INTEGER,dimension(:, :),optional,pointer  local_bounds,
TYPE(cp_error_type),intent(inout)  error 
)

returns the various attributes of rho_set

Parameters:
rho_setthe object you whant info about
can_return_nullif true the object returned can be null, if false (the default) it stops with an error if a requested component is not associated
errorvariable to control error logging, stopping,... see module cp_error_handling

for the other components see the attributes of xc_rho_set

Definition at line 344 of file xc_rho_set_types.f90.

References CPAssert, and error.

Referenced by xc_b97::b97_lda_eval(), xc_b97::b97_lsd_eval(), xc_cs1::cs1_lda_eval(), xc_cs1::cs1_lsd_eval(), xc_hcth::hcth_lda_eval(), xc_ke_gga::ke_gga_lda_eval(), xc_ke_gga::ke_gga_lsd_eval(), xc_lyp_adiabatic::lyp_adiabatic_lda_eval(), xc_lyp_adiabatic::lyp_adiabatic_lsd_eval(), xc_lyp::lyp_lda_eval(), xc_lyp::lyp_lsd_eval(), xc_optx::optx_lda_eval(), xc_optx::optx_lsd_eval(), xc_perdew86::p86_lda_eval(), xc_pbe::pbe_lda_eval(), xc_pbe::pbe_lsd_eval(), xc_perdew_wang::perdew_wang_lda_eval(), xc_perdew_wang::perdew_wang_lsd_eval(), xc_perdew_zunger::pz_lda_eval(), xc_perdew_zunger::pz_lsd_eval(), xc_tfw::tfw_lda_eval(), xc_tfw::tfw_lsd_eval(), xc_thomas_fermi::thomas_fermi_lda_eval(), xc_thomas_fermi::thomas_fermi_lsd_eval(), xc_tpss::tpss_lda_eval(), xc_tpss::tpss_lsd_eval(), xc_vwn::vwn_lda_eval(), xc_vwn::vwn_lsd_eval(), xc_atom::vxc_of_r_new(), xc_xalpha::xalpha_lda_eval(), xc_xalpha::xalpha_lsd_eval(), xc_xbecke88::xb88_lda_eval(), xc_xbecke88_lr_adiabatic::xb88_lr_adiabatic_lda_eval(), xc_xbecke88_lr_adiabatic::xb88_lr_adiabatic_lsd_eval(), xc_xbecke88_long_range::xb88_lr_lda_eval(), xc_xbecke88_long_range::xb88_lr_lsd_eval(), xc_xbecke88::xb88_lsd_eval(), xc_xbecke_roussel::xbecke_roussel_lda_eval(), xc_xbecke_roussel::xbecke_roussel_lsd_eval(), xc_xbr_pbe_lda_hole_t_c_lr::xbr_pbe_lda_hole_tc_lr_lda_eval(), xc_xbr_pbe_lda_hole_t_c_lr::xbr_pbe_lda_hole_tc_lr_lsd_eval(), xc_atom::xc_2nd_deriv_of_r(), xc_derivatives::xc_functional_eval(), xc_exchange_gga::xgga_eval(), xc_xlda_hole_t_c_lr::xlda_hole_t_c_lr_lda_eval(), xc_xlda_hole_t_c_lr::xlda_hole_t_c_lr_lsd_eval(), xc_xpbe_hole_t_c_lr::xpbe_hole_t_c_lr_lda_eval(), xc_xpbe_hole_t_c_lr::xpbe_hole_t_c_lr_lsd_eval(), xc_xwpbe::xwpbe_lda_eval(), and xc_xwpbe::xwpbe_lsd_eval().

subroutine,public xc_rho_set_types::xc_rho_set_release ( TYPE(xc_rho_set_type),pointer  rho_set,
TYPE(pw_pool_type),optional,pointer  pw_pool,
TYPE(cp_error_type),intent(inout)  error 
)

releases the given rho_set

Parameters:
rho_setthe structure to release
pw_poolthe plae where to give back the arrays
errorvariable to control error logging, stopping,... see module cp_error_handling

Definition at line 201 of file xc_rho_set_types.f90.

References CPPostconditionNoFail, CPPreconditionNoFail, and xc_rho_set_clean().

Referenced by harris_force::harris_calc_nsc_force(), harris_force::harris_force_correction(), harris_force::harris_force_EVal(), and qs_kpp1_env_types::kpp1_release().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public xc_rho_set_types::xc_rho_set_retain ( TYPE(xc_rho_set_type),pointer  rho_set,
TYPE(cp_error_type),intent(inout)  error 
)

retains the given rho_set

Parameters:
rho_setthe object to retain
errorvariable to control error logging, stopping,... see module cp_error_handling

Definition at line 177 of file xc_rho_set_types.f90.

References CPPreconditionNoFail.

subroutine,public xc_rho_set_types::xc_rho_set_update ( TYPE(xc_rho_set_type),pointer  rho_set,
TYPE(pw_p_type),dimension(:),pointer  rho_r,
TYPE(pw_p_type),dimension(:),pointer  rho_g,
TYPE(pw_p_type),dimension(:),pointer  tau,
TYPE(xc_rho_cflags_type),intent(in)  needs,
INTEGER,intent(in)  xc_deriv_method_id,
INTEGER,intent(in)  xc_rho_smooth_id,
TYPE(cell_type),pointer  cell,
TYPE(pw_pool_type),pointer  pw_pool,
TYPE(cp_error_type),intent(inout)  error 
)

updates the given rho set with the density given by rho_r (and rho_g). The rho set will contain the components specified in needs

Parameters:
rho_setthe rho_set to update
rho_rthe new density (in r space)
rho_gthe new density (in g space, needed for some derivatives)
needsthe components of rho that are needed
cellcell parameters (to rescale the derivative)
pw_poolpool for the allocation of pw and cr3d
errorvariable to control error logging, stopping,... see module cp_error_handling

Definition at line 621 of file xc_rho_set_types.f90.

References cell, pw_types::COMPLEXDATA1D, CPAssert, CPPostcondition, error, pw_spline_utils::nn10_coeffs, pw_spline_utils::nn10_deriv_coeffs, pw_spline_utils::nn50_coeffs, pw_spline_utils::nn50_deriv_coeffs, pw_methods::pw_copy(), pw_spline_utils::pw_nn_deriv_r(), pw_spline_utils::pw_nn_smear_r(), pw_pool_types::pw_pool_create_cr3d(), pw_spline_utils::pw_spline2_deriv_g(), pw_spline_utils::pw_spline2_interpolate_values_g(), pw_spline_utils::pw_spline3_deriv_g(), pw_spline_utils::pw_spline3_interpolate_values_g(), pw_spline_utils::pw_spline_scale_deriv(), pw_spline_utils::spline2_coeffs, pw_spline_utils::spline2_deriv_coeffs, pw_spline_utils::spline3_coeffs, pw_spline_utils::spline3_deriv_coeffs, input_constants::xc_deriv_collocate, input_constants::xc_deriv_nn10_smooth, input_constants::xc_deriv_nn50_smooth, input_constants::xc_deriv_pw, input_constants::xc_deriv_spline2, input_constants::xc_deriv_spline2_smooth, input_constants::xc_deriv_spline3, input_constants::xc_deriv_spline3_smooth, xc_rho_cflags_types::xc_rho_cflags_equal(), input_constants::xc_rho_nn10, input_constants::xc_rho_nn50, input_constants::xc_rho_no_smooth, xc_rho_set_clean(), input_constants::xc_rho_spline2_smooth, and input_constants::xc_rho_spline3_smooth.

Here is the call graph for this function:


Variable Documentation

LOGICAL,parameter,private xc_rho_set_types::debug_this_module = .FALSE.

Definition at line 51 of file xc_rho_set_types.f90.

Definition at line 53 of file xc_rho_set_types.f90.

Referenced by xc_rho_set_create().

CHARACTER(len=*),parameter,private xc_rho_set_types::moduleN = 'xc_rho_set_types'

Definition at line 52 of file xc_rho_set_types.f90.