15 #include "./base/base_uses.f90"
21 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'tip_scan_types'
27 INTEGER :: num_scan_points
28 REAL(KIND=
dp),
DIMENSION(3) :: ref_point
29 REAL(KIND=
dp),
DIMENSION(:, :), &
30 ALLOCATABLE :: tip_pos
31 CHARACTER(LEN=default_string_length) :: tip_cube_file
32 TYPE(pw_r3d_rs_type),
POINTER :: tip_pw_r
33 TYPE(pw_c1d_gs_type),
POINTER :: tip_pw_g
34 END TYPE scanning_type
46 TYPE(scanning_type),
INTENT(INOUT) :: scan_info
47 TYPE(section_vals_type),
POINTER :: input_section
49 CHARACTER(LEN=default_string_length) :: schar
50 INTEGER :: ii, ix, iy, iz, nx, ny, nz
51 INTEGER,
DIMENSION(:),
POINTER :: ilist
52 REAL(kind=
dp) :: dx, dy, dz
53 REAL(kind=
dp),
DIMENSION(:),
POINTER :: rlist, rpoint
70 cpassert(
SIZE(ilist) >= 1)
71 cpassert(
SIZE(rlist) >= 1)
75 cpassert(
SIZE(ilist) >= 1)
76 cpassert(
SIZE(rlist) >= 1)
80 cpassert(
SIZE(ilist) >= 1)
81 cpassert(
SIZE(rlist) >= 1)
85 cpassert(
SIZE(ilist) >= 2)
86 cpassert(
SIZE(rlist) >= 2)
92 cpassert(
SIZE(ilist) >= 2)
93 cpassert(
SIZE(rlist) >= 2)
99 cpassert(
SIZE(ilist) >= 2)
100 cpassert(
SIZE(rlist) >= 2)
106 cpassert(
SIZE(ilist) >= 3)
107 cpassert(
SIZE(rlist) >= 3)
115 cpabort(
"Invalid Scan Type")
118 scan_info%ref_point(1:3) = rpoint(1:3)
119 scan_info%num_scan_points = nx*ny*nz
120 ALLOCATE (scan_info%tip_pos(3, nx*ny*nz))
121 rpoint(1) = rpoint(1) - 0.5_dp*(nx - 1)*dx
122 rpoint(2) = rpoint(2) - 0.5_dp*(ny - 1)*dy
123 rpoint(3) = rpoint(3) - 0.5_dp*(nz - 1)*dz
130 scan_info%tip_pos(1, ii) = rpoint(1) + (ix - 1)*dx
131 scan_info%tip_pos(2, ii) = rpoint(2) + (iy - 1)*dy
132 scan_info%tip_pos(3, ii) = rpoint(3) + (iz - 1)*dz
139 scan_info%tip_cube_file = schar
141 NULLIFY (scan_info%tip_pw_r)
142 NULLIFY (scan_info%tip_pw_g)
152 TYPE(scanning_type),
INTENT(INOUT) :: scan_info
154 scan_info%num_scan_points = 0
155 scan_info%ref_point = 0.0_dp
156 IF (
ALLOCATED(scan_info%tip_pos))
THEN
157 DEALLOCATE (scan_info%tip_pos)
159 IF (
ASSOCIATED(scan_info%tip_pw_r))
THEN
160 CALL scan_info%tip_pw_r%release()
161 DEALLOCATE (scan_info%tip_pw_r)
163 IF (
ASSOCIATED(scan_info%tip_pw_g))
THEN
164 CALL scan_info%tip_pw_g%release()
165 DEALLOCATE (scan_info%tip_pw_g)
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
subroutine, public release_scanning_type(scan_info)
...
subroutine, public read_scanning_section(scan_info, input_section)
...