11 #include "./base/base_uses.f90"
17 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'integration_grid_types'
19 TYPE grid_batch_val_1d_type
21 REAL(KIND=
dp),
DIMENSION(:),
ALLOCATABLE :: val1d
22 END TYPE grid_batch_val_1d_type
24 TYPE grid_batch_val_2d_type
26 REAL(KIND=
dp),
DIMENSION(:, :),
ALLOCATABLE :: val2d
27 END TYPE grid_batch_val_2d_type
30 INTEGER,
DIMENSION(:),
ALLOCATABLE :: atom_list
31 REAL(KIND=
dp),
DIMENSION(:, :),
ALLOCATABLE :: atom_pos
34 TYPE grid_batch_info_type
38 TYPE(gnlist_type) :: gnlist
39 REAL(KIND=
dp),
DIMENSION(3) :: rcenter
40 REAL(KIND=
dp) :: radius
41 REAL(dp),
DIMENSION(:, :),
ALLOCATABLE :: rco
42 REAL(dp),
DIMENSION(:),
ALLOCATABLE :: weight
43 REAL(dp),
DIMENSION(:),
ALLOCATABLE :: wref
44 REAL(dp),
DIMENSION(:),
ALLOCATABLE :: wsum
45 END TYPE grid_batch_info_type
47 TYPE integration_grid_type
49 TYPE(grid_batch_info_type),
DIMENSION(:),
ALLOCATABLE :: grid_batch
50 END TYPE integration_grid_type
52 TYPE integration_grid_value_type
54 TYPE(grid_batch_val_1d_type),
DIMENSION(:),
ALLOCATABLE :: grid_val_1d
55 TYPE(grid_batch_val_2d_type),
DIMENSION(:),
ALLOCATABLE :: grid_val_2d
56 END TYPE integration_grid_value_type
75 TYPE(integration_grid_type),
POINTER :: int_grid
92 TYPE(integration_grid_type),
POINTER :: int_grid
96 IF (
ASSOCIATED(int_grid))
THEN
97 IF (
ALLOCATED(int_grid%grid_batch))
THEN
98 DO i = 1, int_grid%nbatch
99 IF (
ALLOCATED(int_grid%grid_batch(i)%rco))
DEALLOCATE (int_grid%grid_batch(i)%rco)
100 IF (
ALLOCATED(int_grid%grid_batch(i)%weight))
DEALLOCATE (int_grid%grid_batch(i)%weight)
101 IF (
ALLOCATED(int_grid%grid_batch(i)%wref))
DEALLOCATE (int_grid%grid_batch(i)%wref)
102 IF (
ALLOCATED(int_grid%grid_batch(i)%wsum))
DEALLOCATE (int_grid%grid_batch(i)%wsum)
104 IF (
ALLOCATED(int_grid%grid_batch(i)%gnlist%atom_list))
DEALLOCATE (int_grid%grid_batch(i)%gnlist%atom_list)
105 IF (
ALLOCATED(int_grid%grid_batch(i)%gnlist%atom_pos))
DEALLOCATE (int_grid%grid_batch(i)%gnlist%atom_pos)
107 DEALLOCATE (int_grid%grid_batch)
109 DEALLOCATE (int_grid)
111 CALL cp_abort(__location__, &
112 "The pointer int_grid is not associated and "// &
113 "cannot be deallocated")
127 TYPE(integration_grid_value_type),
POINTER :: int_grid
144 TYPE(integration_grid_value_type),
POINTER :: int_grid
148 IF (
ASSOCIATED(int_grid))
THEN
149 IF (
ALLOCATED(int_grid%grid_val_1d))
THEN
150 DO i = 1, int_grid%nbatch
151 IF (
ALLOCATED(int_grid%grid_val_1d(i)%val1d))
DEALLOCATE (int_grid%grid_val_1d(i)%val1d)
153 DEALLOCATE (int_grid%grid_val_1d)
155 IF (
ALLOCATED(int_grid%grid_val_2d))
THEN
156 DO i = 1, int_grid%nbatch
157 IF (
ALLOCATED(int_grid%grid_val_2d(i)%val2d))
DEALLOCATE (int_grid%grid_val_2d(i)%val2d)
159 DEALLOCATE (int_grid%grid_val_2d)
161 DEALLOCATE (int_grid)
163 CALL cp_abort(__location__, &
164 "The pointer int_grid is not associated and "// &
165 "cannot be deallocated")
subroutine, public deallocate_intgrid(int_grid)
Deallocate integration_grid_type.
subroutine, public allocate_intgrid_val(int_grid)
Initialize integration_grid_value_type.
subroutine, public deallocate_intgrid_val(int_grid)
Deallocate integration_grid_value_type.
subroutine, public allocate_intgrid(int_grid)
Initialize integration_grid_type.
Defines the basic variable types.
integer, parameter, public dp