21 USE deallocate_structures
28 TYPE (type_coreprof
),
POINTER :: coreprof(:)
29 TYPE (type_coretransp
),
POINTER :: coretransp_in(:)
30 TYPE (type_coretransp
),
POINTER :: coretransp_out(:)
32 INTEGER,
PARAMETER :: nslice = 1
37 INTEGER :: nimp_tr, iimp
38 INTEGER,
ALLOCATABLE :: nzimp_tr(:)
40 INTEGER,
ALLOCATABLE :: ncomp_tr(:)
41 INTEGER,
ALLOCATABLE :: ntype_tr(:)
43 INTEGER :: flag_bnd(2)
44 INTEGER :: istart, iend
52 nrho_prof =
SIZE(coreprof(1)%rho_tor)
53 nrho_tr =
SIZE(coretransp_in(1)%VALUES(1)%rho_tor)
56 CALL
get_comp_dimensions(coretransp_in(1)%COMPOSITIONS, nnucl_tr, nion_tr, nimp_tr, nzimp_tr, nneut_tr, ntype_tr, ncomp_tr)
65 IF ((coreprof(1)%rho_tor(1).GE.coretransp_in(1)%VALUES(1)%rho_tor(1)).AND. &
66 (coreprof(1)%rho_tor(nrho_prof).LE.coretransp_in(1)%VALUES(1)%rho_tor(nrho_tr)))
THEN
67 ALLOCATE (coretransp_out(1))
68 CALL copy_cpo(coretransp_in(1), coretransp_out(1))
73 IF ((coreprof(1)%rho_tor(nrho_prof).GT.coretransp_in(1)%VALUES(1)%rho_tor(nrho_tr)))
THEN
77 IF ((coreprof(1)%rho_tor(1).LT.coretransp_in(1)%VALUES(1)%rho_tor(1)))
THEN
84 CALL
allocate_coretransp_cpo(nslice, nrho_tr, nnucl_tr, nion_tr, nimp_tr, nzimp_tr, nneut_tr, ntype_tr, ncomp_tr, coretransp_out)
85 CALL copy_cpo(coretransp_in(1)%COMPOSITIONS, coretransp_out(1)%COMPOSITIONS)
90 IF (flag_bnd(1).EQ.1)
THEN
92 coretransp_out(1)%VALUES(1)%rho_tor(1) = coreprof(1)%rho_tor(1)
93 coretransp_out(1)%VALUES(1)%rho_tor_norm(1) = coreprof(1)%rho_tor(1)/coreprof(1)%rho_tor(nrho_prof)
94 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ni_transp%diff_eff)) &
95 coretransp_out(1)%VALUES(1)%ni_transp%diff_eff(1,:,:) = coretransp_in(1)%VALUES(1)%ni_transp%diff_eff(1,:,:)
96 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ni_transp%vconv_eff)) &
97 coretransp_out(1)%VALUES(1)%ni_transp%vconv_eff(1,:,:) = coretransp_in(1)%VALUES(1)%ni_transp%vconv_eff(1,:,:)
98 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ne_transp%diff_eff)) &
99 coretransp_out(1)%VALUES(1)%ne_transp%diff_eff(1,:) = coretransp_in(1)%VALUES(1)%ne_transp%diff_eff(1,:)
100 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ne_transp%vconv_eff)) &
101 coretransp_out(1)%VALUES(1)%ne_transp%vconv_eff(1,:) = coretransp_in(1)%VALUES(1)%ne_transp%vconv_eff(1,:)
102 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ti_transp%diff_eff)) &
103 coretransp_out(1)%VALUES(1)%ti_transp%diff_eff(1,:) = coretransp_in(1)%VALUES(1)%ti_transp%diff_eff(1,:)
104 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ti_transp%vconv_eff)) &
105 coretransp_out(1)%VALUES(1)%ti_transp%vconv_eff(1,:) = coretransp_in(1)%VALUES(1)%ti_transp%vconv_eff(1,:)
106 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%te_transp%diff_eff)) &
107 coretransp_out(1)%VALUES(1)%te_transp%diff_eff(1) = coretransp_in(1)%VALUES(1)%te_transp%diff_eff(1)
108 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%te_transp%vconv_eff)) &
109 coretransp_out(1)%VALUES(1)%te_transp%vconv_eff(1) = coretransp_in(1)%VALUES(1)%te_transp%vconv_eff(1)
110 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%vtor_transp%diff_eff)) &
111 coretransp_out(1)%VALUES(1)%vtor_transp%diff_eff(1,:) = coretransp_in(1)%VALUES(1)%vtor_transp%diff_eff(1,:)
112 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%vtor_transp%vconv_eff)) &
113 coretransp_out(1)%VALUES(1)%vtor_transp%vconv_eff(1,:) = coretransp_in(1)%VALUES(1)%vtor_transp%vconv_eff(1,:)
114 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%sigma)) &
115 coretransp_out(1)%VALUES(1)%sigma(1) = coretransp_in(1)%VALUES(1)%sigma(1)
117 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%NZ_TRANSP))
THEN
119 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff)) &
120 coretransp_out(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff(1,:) = coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff(1,:)
121 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff)) &
122 coretransp_out(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff(1,:) = coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff(1,:)
126 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%TZ_TRANSP))
THEN
128 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%TZ_TRANSP(iimp)%diff_eff)) &
129 coretransp_out(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff(1,:) = coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff(1,:)
130 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%TZ_TRANSP(iimp)%vconv_eff)) &
131 coretransp_out(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff(1,:) = coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff(1,:)
138 IF (flag_bnd(2).EQ.1)
THEN
140 coretransp_out(1)%VALUES(1)%rho_tor(nrho_tr) = coreprof(1)%rho_tor(nrho_prof)
141 coretransp_out(1)%VALUES(1)%rho_tor_norm(nrho_tr) = coreprof(1)%rho_tor(nrho_prof)/coreprof(1)%rho_tor(nrho_prof)
142 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ni_transp%diff_eff)) &
143 coretransp_out(1)%VALUES(1)%ni_transp%diff_eff(nrho_tr,:,:) = coretransp_in(1)%VALUES(1)%ni_transp%diff_eff(nrho_tr-istart-iend,:,:)
144 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ni_transp%vconv_eff)) &
145 coretransp_out(1)%VALUES(1)%ni_transp%vconv_eff(nrho_tr,:,:) = coretransp_in(1)%VALUES(1)%ni_transp%vconv_eff(nrho_tr-istart-iend,:,:)
146 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ne_transp%diff_eff)) &
147 coretransp_out(1)%VALUES(1)%ne_transp%diff_eff(nrho_tr,:) = coretransp_in(1)%VALUES(1)%ne_transp%diff_eff(nrho_tr-istart-iend,:)
148 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ne_transp%vconv_eff)) &
149 coretransp_out(1)%VALUES(1)%ne_transp%vconv_eff(nrho_tr,:) = coretransp_in(1)%VALUES(1)%ne_transp%vconv_eff(nrho_tr-istart-iend,:)
150 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ti_transp%diff_eff)) &
151 coretransp_out(1)%VALUES(1)%ti_transp%diff_eff(nrho_tr,:) = coretransp_in(1)%VALUES(1)%ti_transp%diff_eff(nrho_tr-istart-iend,:)
152 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ti_transp%vconv_eff)) &
153 coretransp_out(1)%VALUES(1)%ti_transp%vconv_eff(nrho_tr,:) = coretransp_in(1)%VALUES(1)%ti_transp%vconv_eff(nrho_tr-istart-iend,:)
154 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%te_transp%diff_eff)) &
155 coretransp_out(1)%VALUES(1)%te_transp%diff_eff(nrho_tr) = coretransp_in(1)%VALUES(1)%te_transp%diff_eff(nrho_tr-istart-iend)
156 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%te_transp%vconv_eff)) &
157 coretransp_out(1)%VALUES(1)%te_transp%vconv_eff(nrho_tr) = coretransp_in(1)%VALUES(1)%te_transp%vconv_eff(nrho_tr-istart-iend)
158 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%vtor_transp%diff_eff)) &
159 coretransp_out(1)%VALUES(1)%vtor_transp%diff_eff(nrho_tr,:) = coretransp_in(1)%VALUES(1)%vtor_transp%diff_eff(nrho_tr-istart-iend,:)
160 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%vtor_transp%vconv_eff)) &
161 coretransp_out(1)%VALUES(1)%vtor_transp%vconv_eff(nrho_tr,:) = coretransp_in(1)%VALUES(1)%vtor_transp%vconv_eff(nrho_tr-istart-iend,:)
162 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%sigma)) &
163 coretransp_out(1)%VALUES(1)%sigma(nrho_tr) = coretransp_in(1)%VALUES(1)%sigma(nrho_tr-istart-iend)
165 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%NZ_TRANSP))
THEN
167 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff)) &
168 coretransp_out(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff(nrho_tr,:) = coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff(nrho_tr-istart-iend,:)
169 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff)) &
170 coretransp_out(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff(nrho_tr,:) = coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff(nrho_tr-istart-iend,:)
174 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%TZ_TRANSP))
THEN
176 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%TZ_TRANSP(iimp)%diff_eff)) &
177 coretransp_out(1)%VALUES(1)%TZ_TRANSP(iimp)%diff_eff(nrho_tr,:) = coretransp_in(1)%VALUES(1)%TZ_TRANSP(iimp)%diff_eff(nrho_tr-istart-iend,:)
178 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%TZ_TRANSP(iimp)%vconv_eff)) &
179 coretransp_out(1)%VALUES(1)%TZ_TRANSP(iimp)%vconv_eff(nrho_tr,:) = coretransp_in(1)%VALUES(1)%TZ_TRANSP(iimp)%vconv_eff(nrho_tr-istart-iend,:)
185 DO irho = istart+1, nrho_tr-iend
186 coretransp_out(1)%VALUES(1)%rho_tor(irho) = coretransp_in(1)%VALUES(1)%rho_tor(irho-istart)
187 coretransp_out(1)%VALUES(1)%rho_tor_norm(irho) = coretransp_in(1)%VALUES(1)%rho_tor(irho-istart)/coreprof(1)%rho_tor(nrho_prof)
188 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ni_transp%diff_eff)) &
189 coretransp_out(1)%VALUES(1)%ni_transp%diff_eff(irho,:,:) = coretransp_in(1)%VALUES(1)%ni_transp%diff_eff(irho-istart,:,:)
190 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ni_transp%vconv_eff)) &
191 coretransp_out(1)%VALUES(1)%ni_transp%vconv_eff(irho,:,:) = coretransp_in(1)%VALUES(1)%ni_transp%vconv_eff(irho-istart,:,:)
192 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ne_transp%diff_eff)) &
193 coretransp_out(1)%VALUES(1)%ne_transp%diff_eff(irho,:) = coretransp_in(1)%VALUES(1)%ne_transp%diff_eff(irho-istart,:)
194 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ne_transp%vconv_eff)) &
195 coretransp_out(1)%VALUES(1)%ne_transp%vconv_eff(irho,:) = coretransp_in(1)%VALUES(1)%ne_transp%vconv_eff(irho-istart,:)
196 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ti_transp%diff_eff)) &
197 coretransp_out(1)%VALUES(1)%ti_transp%diff_eff(irho,:) = coretransp_in(1)%VALUES(1)%ti_transp%diff_eff(irho-istart,:)
198 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%ti_transp%vconv_eff)) &
199 coretransp_out(1)%VALUES(1)%ti_transp%vconv_eff(irho,:) = coretransp_in(1)%VALUES(1)%ti_transp%vconv_eff(irho-istart,:)
200 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%te_transp%diff_eff)) &
201 coretransp_out(1)%VALUES(1)%te_transp%diff_eff(irho) = coretransp_in(1)%VALUES(1)%te_transp%diff_eff(irho-istart)
202 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%te_transp%vconv_eff)) &
203 coretransp_out(1)%VALUES(1)%te_transp%vconv_eff(irho) = coretransp_in(1)%VALUES(1)%te_transp%vconv_eff(irho-istart)
204 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%vtor_transp%diff_eff)) &
205 coretransp_out(1)%VALUES(1)%vtor_transp%diff_eff(irho,:) = coretransp_in(1)%VALUES(1)%vtor_transp%diff_eff(irho-istart,:)
206 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%vtor_transp%vconv_eff)) &
207 coretransp_out(1)%VALUES(1)%vtor_transp%vconv_eff(irho,:) = coretransp_in(1)%VALUES(1)%vtor_transp%vconv_eff(irho-istart,:)
208 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%sigma)) &
209 coretransp_out(1)%VALUES(1)%sigma(irho) = coretransp_in(1)%VALUES(1)%sigma(irho-istart)
211 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%NZ_TRANSP))
THEN
213 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff)) &
214 coretransp_out(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff(irho,:) = coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%diff_eff(irho-istart,:)
215 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff)) &
216 coretransp_out(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff(irho,:) = coretransp_in(1)%VALUES(1)%NZ_TRANSP(iimp)%vconv_eff(irho-istart,:)
220 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%TZ_TRANSP))
THEN
222 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%TZ_TRANSP(iimp)%diff_eff)) &
223 coretransp_out(1)%VALUES(1)%TZ_TRANSP(iimp)%diff_eff(irho,:) = coretransp_in(1)%VALUES(1)%TZ_TRANSP(iimp)%diff_eff(irho-istart,:)
224 IF(
ASSOCIATED(coretransp_in(1)%VALUES(1)%TZ_TRANSP(iimp)%vconv_eff)) &
225 coretransp_out(1)%VALUES(1)%TZ_TRANSP(iimp)%vconv_eff(irho,:) = coretransp_in(1)%VALUES(1)%TZ_TRANSP(iimp)%vconv_eff(irho-istart,:)
233 IF(
ALLOCATED (nzimp_tr))
THEN
234 DEALLOCATE (nzimp_tr)
236 IF(
ALLOCATED (ncomp_tr))
THEN
237 DEALLOCATE (ncomp_tr)
239 IF(
ALLOCATED (ntype_tr))
THEN
240 DEALLOCATE (ntype_tr)
subroutine get_comp_dimensions(COMPOSITIONS, NNUCL, NION, NIMP, NZIMP, NNEUT, NTYPE, NCOMP)
subroutine check_transport_bound(COREPROF, CORETRANSP_IN, CORETRANSP_OUT)
This module contains routines for allocation/deallocation if CPOs used in ETS.
subroutine allocate_coretransp_cpo(NSLICE, NRHO, NNUCL, NION, NIMP, NZIMP, NNEUT, NTYPE, NCOMP, CORETRANSP)
This routine allocates CORETRANSP CPO.