TABLE OF CONTENTS


defs_wvltypes/wvl_descr_free [ Functions ]

[ Top ] [ defs_wvltypes ] [ Functions ]

NAME

 wvl_descr_free

FUNCTION

 Free the wvl%atoms% datastructure (deallocate or nullify)

INPUTS

 wvl <type(wvl_internal_type)>=internal variables for wavelets

OUTPUT

 wvl <type(wvl_internal_type)>=internal variables for wavelets

PARENTS

      gstate,wvl_memory

CHILDREN

      deallocate_atoms_data,f_free_ptr

SOURCE

22 #if defined HAVE_CONFIG_H
23 #include "config.h"
24 #endif
25 
26 #include "abi_common.h"
27 
28 subroutine wvl_descr_free(wvl)
29 
30  use m_profiling_abi
31  use defs_wvltypes
32 #if defined HAVE_BIGDFT
33  use BigDFT_API, only : deallocate_atoms_data
34  use dynamic_memory
35 #endif
36 
37 !This section has been created automatically by the script Abilint (TD).
38 !Do not modify the following lines by hand.
39 #undef ABI_FUNC
40 #define ABI_FUNC 'wvl_descr_free'
41 !End of the abilint section
42 
43   implicit none
44 
45 !Arguments ------------------------------------
46 !scalars
47   type(wvl_internal_type), intent(inout) :: wvl
48 !arrays
49 
50 !Local variables-------------------------------
51 !scalars
52 
53 ! *********************************************************************
54 
55 #if defined HAVE_BIGDFT
56 !These arrays are pointers on memory handled by ABINIT.
57  nullify(wvl%atoms%astruct%sym%irrzon)
58  nullify(wvl%atoms%astruct%sym%phnons)
59  if (associated(wvl%atoms%nlccpar)) then
60    call f_free_ptr(wvl%atoms%nlccpar)
61  end if
62  call deallocate_atoms_data(wvl%atoms)
63 #endif
64  if(allocated(wvl%npspcode_paw_init_guess)) then
65    ABI_DEALLOCATE(wvl%npspcode_paw_init_guess)
66  end if
67 end subroutine wvl_descr_free