TABLE OF CONTENTS


ABINIT/defs_wvltypes [ Modules ]

[ Top ] [ Modules ]

NAME

 defs_wvltypes

FUNCTION

 This module contains definitions of all structured datatypes for the
 wavelet part of the ABINIT package.

 List of datatypes :
 * wvl_projectors_type : structure to store projectors for wavelets calculations.
 * wvl_wf_type : structure to store wavefunctions for wavelets calculations.
 * wvl_data : container for all required wavelets data.

COPYRIGHT

 Copyright (C) 2001-2022 ABINIT group (DC)
 This file is distributed under the terms of the
 GNU General Public License, see ~abinit/COPYING
 or http://www.gnu.org/copyleft/gpl.txt .

TODO

SOURCE

23 #if defined HAVE_CONFIG_H
24 #include "config.h"
25 #endif
26 
27 #include "abi_common.h"
28 
29 
30 module defs_wvltypes
31 
32  use defs_basis
33  use m_abicore
34  use m_errors
35 
36 #if defined HAVE_BIGDFT
37  use BigDFT_API, only : atoms_data, locreg_descriptors, local_zone_descriptors, &
38       & DFT_PSP_projectors, GPU_pointers, rho_descriptors, &
39       & DFT_local_fields, DFT_wavefunction, energy_terms, &
40       & rholoc_objects,gaussian_basis,paw_objects,xc_info,coulomb_operator, &
41       & nullify_gaussian_basis,nullify_local_zone_descriptors,&
42       & nullify_orbitals_data,comms_cubic,comms_linear_null, &
43       & nullify_diis_objects,p2pComms_null,&
44       & nullify_GPU_pointers,nullify_locreg_descriptors,&
45       & nullify_atoms_data,nullify_rholoc_objects,nullify_paw_objects,&
46       & nullify_DFT_local_fields, DFT_PSP_projectors_null
47 
48 #endif
49 
50  implicit none

ABINIT/nullify_wvl_data [ Functions ]

[ Top ] [ Functions ]

NAME

  nullify_wvl_data

FUNCTION

  Nullify all wvl pointers

COPYRIGHT

  Copyright (C) 2013-2022 ABINIT group (T. Rangel)
  This file is distributed under the terms of the
  GNU General Public License, see ~abinit/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

INPUTS

  argin(sizein)=description

OUTPUT

  argout(sizeout)=description

SIDE EFFECTS

NOTES

SOURCE

252 subroutine nullify_wvl_data(wvl)
253 
254  implicit none
255 
256 !Arguments ------------------------------------
257  type(wvl_data) , intent(inout)  :: wvl
258 
259 ! *************************************************************************
260 
261 #if defined HAVE_BIGDFT
262  DBG_ENTER("COLL")
263 
264 !1)   wvl_projectors_type: projectors
265  wvl%projectors%nlpsp=DFT_PSP_projectors_null()
266 
267 !2)   wvl_wf_type: wfs
268 !2.1) DFT_wavefunction: ks
269  nullify(wvl%wfs%ks%psi)
270  nullify(wvl%wfs%ks%hpsi)
271  nullify(wvl%wfs%ks%psit)
272  nullify(wvl%wfs%ks%spsi)
273  nullify(wvl%wfs%ks%gaucoeffs)
274  nullify(wvl%wfs%ks%confdatarr)
275  nullify(wvl%wfs%ks%oldpsis)
276  nullify(wvl%wfs%ks%coeff)
277 !2.1.1) gaussian_basis: gbd
278  call nullify_gaussian_basis(wvl%wfs%ks%gbd)
279 !2.1.2) local_zone_descriptors: Lzd
280  call nullify_local_zone_descriptors(wvl%wfs%ks%Lzd)
281 !2.1.3) orbitals_data: orbs
282  call nullify_orbitals_data(wvl%wfs%ks%orbs)
283 !2.1.4) communications_arrays: comms
284  wvl%wfs%ks%comms=comms_cubic_null()
285 !2.1.5) diis_objects: diis
286  call nullify_diis_objects(wvl%wfs%ks%diis)
287 !2.1.6) p2pComms: comgp
288  wvl%wfs%ks%comgp = p2pComms_null()
289 !2.1.7) collective_comms: collcom
290  wvl%wfs%ks%collcom = comms_linear_null()
291 !2.1.8) collective_comms: collcom_sr
292  wvl%wfs%ks%collcom_sr = comms_linear_null()
293 
294 !2.2) GPU_pointers: GPU
295  call nullify_GPU_pointers(wvl%wfs%GPU)
296  wvl%wfs%GPU%OCLconv = .false.
297 
298 !3) wvl_internal_type: descr
299 !3.1) locreg_descriptors: Glr
300  call nullify_locreg_descriptors(wvl%descr%Glr)
301 !3.2) atoms_data: atoms
302  call nullify_atoms_data(wvl%descr%atoms)
303 !3.3) rholoc_objects: rholoc
304  call nullify_rholoc_objects(wvl%descr%rholoc)
305 !3.4) paw_objects: paw
306  call nullify_paw_objects(wvl%descr%paw)
307 
308 !4) wvl_denspot_type: den
309 !4.1) DFT_local_fields: denspot
310  call nullify_DFT_local_fields(wvl%den%denspot)
311 
312 !5) wvl_energy_terms: e
313 !there are no pointers here
314 
315  DBG_EXIT("COLL")
316 
317  contains

defs_wvltypes/coulomb_operator [ Types ]

[ Top ] [ defs_wvltypes ] [ Types ]

NAME

 coulomb_operator

FUNCTION

 This type contains the
 BigDFT information for kernels

SOURCE

192 type coulomb_operator
193    !this is a fake type when not compiled with BigDFT.
194    integer :: co
195 end type coulomb_operator

defs_wvltypes/wvl_data [ Types ]

[ Top ] [ defs_wvltypes ] [ Types ]

NAME

 wvl_data

FUNCTION

 This type is a container to limit the number of arguments in
 ABINIT, it should not contains attributes other than types
 created for wavelets.

SOURCE

210 type wvl_data
211    ! The data associated to projectors (computed from pseudo)
212    type(wvl_projectors_type) :: projectors
213    ! The data associated to the wavefunctions
214    type(wvl_wf_type) :: wfs
215    ! The pointers to internal BigDFT data structures
216    type(wvl_internal_type) :: descr
217    ! Densities and potentials
218    type(wvl_denspot_type) :: den
219    ! Energies
220    type(wvl_energy_terms) :: e
221 end type wvl_data

defs_wvltypes/wvl_denspot_type [ Types ]

[ Top ] [ defs_wvltypes ] [ Types ]

NAME

 wvl_denspot_type

FUNCTION

 This type contains the
 BigDFT information for
 Densities and potentials

SOURCE

153 type wvl_denspot_type
154 #if defined HAVE_BIGDFT
155    ! Densities and potentials, and related metadata, needed for their creation/application
156    type(DFT_local_fields) :: denspot
157 #endif
158    ! This is a pointer on the symmetry object present in atoms structure of BigDFT.
159    integer :: symObj
160 end type wvl_denspot_type

defs_wvltypes/wvl_energy_terms [ Types ]

[ Top ] [ defs_wvltypes ] [ Types ]

NAME

 wvl_energy_terms

FUNCTION

 This type contains the
 BigDFT information for energies

SOURCE

172 type wvl_energy_terms
173 #if defined HAVE_BIGDFT
174    !object for energies
175    type(energy_terms) :: energs
176 #else
177    integer :: energs
178 #endif
179 end type wvl_energy_terms

defs_wvltypes/wvl_internal_type [ Types ]

[ Top ] [ defs_wvltypes ] [ Types ]

NAME

 wvl_internal_type

FUNCTION

 This type is a gathering for all internal variables wavelets required. It is
 included in the datatypes strutcture.

NOTES

 If you modify this datatype, the copy, init/free routines are in wvl_utils.F90.

SOURCE

109 type wvl_internal_type
110   real(dp) :: h(3)
111   ! The hgrid values in each direction, after the application of the
112   ! boundary conditions. In free boundary conditions, the three values are equal.
113   real(dp) :: shift(3)
114   ! Shift applied by BigDFT on the atomic position (in cartesian coordinates).
115 
116   integer,allocatable :: npspcode_paw_init_guess(:)
117   ! This is for the initial guess in PAW pseudos, this
118   ! is only relevant for ABINIT and PAW
119 
120 #if defined HAVE_BIGDFT
121   type(locreg_descriptors) :: Glr
122   ! Contains the description of the global localisation region.
123 
124   type(atoms_data) :: atoms
125   ! A copy of the current dtset values.
126 
127   type(rholoc_objects) :: rholoc
128   ! Information for local density
129 
130   type(paw_objects) :: paw
131   ! Objects for PAW
132 #endif
133 
134   character(len=4) :: exctxpar
135   ! parallelisation scheme of the exact exchange operator
136   !   BC (Blocking Collective)
137   !   OP2P (Overlap Point-to-Point)
138   real(dp) :: exctxfac
139   ! Exact exchange coefficient to mix.
140 end type wvl_internal_type

defs_wvltypes/wvl_projectors_type [ Types ]

[ Top ] [ defs_wvltypes ] [ Types ]

NAME

 wvl_projectors_type

FUNCTION

 This type constains all physical data associated to
 projectors of a given system (Z and atomic positions).

SOURCE

62  type wvl_projectors_type
63 
64 #if defined HAVE_BIGDFT
65     type(DFT_PSP_projectors) :: nlpsp
66     !object containing the projectors as a sum of Gaussian functions
67     type(gaussian_basis),dimension(:),allocatable :: G
68 #else
69     integer :: nlpsp
70 #endif
71 
72  end type wvl_projectors_type

defs_wvltypes/wvl_wf_type [ Types ]

[ Top ] [ defs_wvltypes ] [ Types ]

NAME

 wvl_wf_type

FUNCTION

 This type constains all physical data associated to
 wavefunctions of a given system (Z and atomic positions).

SOURCE

84  type wvl_wf_type
85 #if defined HAVE_BIGDFT
86     type(DFT_wavefunction) :: ks
87 
88     ! Some GPU internals.
89     type(GPU_pointers) :: GPU
90 #else
91     ! To avoid having an empty type.
92     integer :: ks
93 #endif
94  end type wvl_wf_type

nullify_wvl_data/comms_cubic_null [ Functions ]

[ Top ] [ nullify_wvl_data ] [ Functions ]

NAME

  comms_cubic_null

FUNCTION

  Nullify comms