65 TYPE(t_region
),
POINTER :: regions(:)
71 INTEGER,
PARAMETER :: nvals_max = 2
73 CHARACTER(CHRLEN) :: rcsidentstring
74 CHARACTER(15) :: keysinit(nvals_max),keysinitmat
76 INTEGER ::
brbeg,brend,errorflag,ireg,irow1,irow2,ival,ncols,&
77 npclsini,nregions,nrows,
nvals
79 LOGICAL :: definedinit(nvals_max),definedinitmat
81 REAL(RFREAL) :: valsinit(nvals_max)
82 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: valsinitmat
90 rcsidentstring =
'$RCSfile: PLAG_ReadDisPartInitSection.F90,v $ $Revision: 1.9 $'
92 global => regions(1)%global
95 'PLAG_ReadDisPartInitSection.F90' )
101 nregions = global%nRegions
108 brbeg = lbound(regions,1)
109 brend = ubound(regions,1)
117 definedinit(:) = .false.
119 keysinit(2) =
'NPCLSRAND'
120 valsinit(:) = 0.0_rfreal
124 brbeg,brend,definedinit )
126 IF (definedinit(1) .EQV. .true.) &
127 global%initPlagFlag = nint(valsinit(1))
129 IF (definedinit(2) .EQV. .true.) &
130 regions(
brbeg:brend)%plagInput%nPclsIni = nint(valsinit(2))
136 IF ( definedinit(1) .EQV. .false. )
THEN
137 CALL
errorstop(global,err_val_undefined,__line__,
'DISPARTINIT-FLAG')
139 IF ( nint(valsinit(1)) == plag_init_fromscratch )
THEN
140 global%initPlagFlag = plag_init_fromscratch
141 ELSE IF ( nint(valsinit(1)) == plag_init_fromfile )
THEN
142 global%initPlagFlag = plag_init_fromfile
143 ELSE IF ( nint(valsinit(1)) == plag_init_fromhardcode )
THEN
144 global%initPlagFlag = plag_init_fromhardcode
145 ELSE IF ( nint(valsinit(1)) == plag_init_fromrandomstate )
THEN
146 global%initPlagFlag = plag_init_fromrandomstate
148 CALL
errorstop(global,err_reached_default,__line__)
152 IF ( ( nint(valsinit(1)) == plag_init_fromrandomstate ) .AND. &
153 ( definedinit(2) .EQV. .false. ) )
THEN
154 CALL
errorstop(global,err_val_undefined,__line__,
'DISPARTINIT-NPCLSRAND')
156 IF ( nint(valsinit(2)) >= 0 )
THEN
157 regions(
brbeg:brend)%plagInput%nPclsIni = nint(valsinit(2))
159 CALL
errorstop(global,err_reached_default,__line__)
168 SELECT CASE ( nint(valsinit(1)) )
175 CASE ( plag_init_fromscratch )
176 definedinitmat = .false.
177 keysinitmat =
'NUMBER'
181 valsinitmat,definedinitmat )
187 regions(
brbeg:brend)%plagInput%nPclsIni = nrows
189 IF (definedinitmat .EQV. .true.)
THEN
195 DO ireg =
brbeg,brend
196 ALLOCATE( regions(ireg)%plagInput%iniPosX(nrows),stat=errorflag )
197 global%error = errorflag
198 IF (global%error /= err_none)
THEN
199 CALL
errorstop( global, err_allocate,__line__ , &
200 'regions%plagInput%iniPosX' )
203 ALLOCATE( regions(ireg)%plagInput%iniPosY(nrows),stat=errorflag )
204 global%error = errorflag
205 IF (global%error /= err_none)
THEN
206 CALL
errorstop( global, err_allocate,__line__ , &
207 'regions%plagInput%iniPosY' )
210 ALLOCATE( regions(ireg)%plagInput%iniPosZ(nrows),stat=errorflag )
211 global%error = errorflag
212 IF (global%error /= err_none)
THEN
213 CALL
errorstop( global, err_allocate,__line__ , &
214 'regions%plagInput%iniPosZ' )
217 ALLOCATE( regions(ireg)%plagInput%iniDiam(nrows),stat=errorflag )
218 global%error = errorflag
219 IF (global%error /= err_none)
THEN
220 CALL
errorstop( global, err_allocate,__line__ ,&
221 'regions%plagInput%iniDiam' )
224 ALLOCATE( regions(ireg)%plagInput%iniTemp(nrows),stat=errorflag )
225 global%error = errorflag
226 IF (global%error /= err_none)
THEN
227 CALL
errorstop( global, err_allocate,__line__ , &
228 'regions%plagInput%iniTemp' )
231 ALLOCATE( regions(ireg)%plagInput%iniSpLoad(nrows),stat=errorflag )
232 global%error = errorflag
233 IF (global%error /= err_none)
THEN
234 CALL
errorstop( global, err_allocate,__line__ , &
235 'regions%plagInput%iniSpLoad' )
238 ALLOCATE( regions(ireg)%plagInput%iniVelX(nrows),stat=errorflag )
239 global%error = errorflag
240 IF (global%error /= err_none)
THEN
241 CALL
errorstop( global, err_allocate,__line__ , &
242 'regions%plagInput%iniVelX' )
245 ALLOCATE( regions(ireg)%plagInput%iniVelY(nrows),stat=errorflag )
246 global%error = errorflag
247 IF (global%error /= err_none)
THEN
248 CALL
errorstop( global, err_allocate,__line__ , &
249 'regions%plagInput%iniVelY' )
252 ALLOCATE( regions(ireg)%plagInput%iniVelZ(nrows),stat=errorflag )
253 global%error = errorflag
254 IF (global%error /= err_none)
THEN
255 CALL
errorstop( global, err_allocate,__line__ , &
256 'regions%plagInput%iniVelZ' )
264 DO ireg =
brbeg,brend
265 regions(ireg)%plagInput%iniPosX =
REAL(crazy_value_int,kind=rfreal)
266 regions(ireg)%plagInput%iniPosY =
REAL(crazy_value_int,kind=rfreal)
267 regions(ireg)%plagInput%iniPosZ =
REAL(crazy_value_int,kind=rfreal)
268 regions(ireg)%plagInput%iniDiam =
REAL(crazy_value_int,kind=rfreal)
269 regions(ireg)%plagInput%iniTemp =
REAL(crazy_value_int,kind=rfreal)
270 regions(ireg)%plagInput%iniSpLoad =
REAL(crazy_value_int,kind=rfreal)
271 regions(ireg)%plagInput%iniVelX =
REAL(crazy_value_int,kind=rfreal)
272 regions(ireg)%plagInput%iniVelY =
REAL(crazy_value_int,kind=rfreal)
273 regions(ireg)%plagInput%iniVelZ =
REAL(crazy_value_int,kind=rfreal)
281 npclsini = regions(ireg)%plagInput%nPclsIni
284 regions(ireg)%plagInput%iniPosX(ival) = valsinitmat(ival,1)
285 regions(ireg)%plagInput%iniPosY(ival) = valsinitmat(ival,2)
286 regions(ireg)%plagInput%iniPosZ(ival) = valsinitmat(ival,3)
287 regions(ireg)%plagInput%iniDiam(ival) = abs(valsinitmat(ival,4))
288 regions(ireg)%plagInput%iniTemp(ival) = abs(valsinitmat(ival,5))
289 regions(ireg)%plagInput%iniSpLoad(ival) = abs(valsinitmat(ival,6))
290 regions(ireg)%plagInput%iniVelX(ival) = valsinitmat(ival,7)
291 regions(ireg)%plagInput%iniVelY(ival) = valsinitmat(ival,8)
292 regions(ireg)%plagInput%iniVelZ(ival) = valsinitmat(ival,9)
302 CASE ( plag_init_fromrandomstate )
303 definedinitmat = .false.
304 keysinitmat =
'NUMBER'
308 valsinitmat,definedinitmat )
310 IF (definedinitmat .EQV. .true.)
THEN
312 IF ( nrows /= 2 )
THEN
313 CALL
errorstop(global,err_val_undefined,__line__,
'DISPARTINIT-Random nRows')
320 DO ireg =
brbeg,brend
321 regions(ireg)%plagInput%iniRandDiamMax =
REAL(crazy_value_int,kind=rfreal)
322 regions(ireg)%plagInput%iniRandDiamMin =
REAL(crazy_value_int,kind=rfreal)
323 regions(ireg)%plagInput%iniRandTempMax =
REAL(crazy_value_int,kind=rfreal)
324 regions(ireg)%plagInput%iniRandTempMin =
REAL(crazy_value_int,kind=rfreal)
325 regions(ireg)%plagInput%iniRandSploadMax =
REAL(crazy_value_int,kind=rfreal)
326 regions(ireg)%plagInput%iniRandSploadMin =
REAL(crazy_value_int,kind=rfreal)
327 regions(ireg)%plagInput%iniRandXMax =
REAL(crazy_value_int,kind=rfreal)
328 regions(ireg)%plagInput%iniRandXMin =
REAL(crazy_value_int,kind=rfreal)
329 regions(ireg)%plagInput%iniRandYMax =
REAL(crazy_value_int,kind=rfreal)
330 regions(ireg)%plagInput%iniRandYMin =
REAL(crazy_value_int,kind=rfreal)
331 regions(ireg)%plagInput%iniRandZMax =
REAL(crazy_value_int,kind=rfreal)
332 regions(ireg)%plagInput%iniRandZMin =
REAL(crazy_value_int,kind=rfreal)
333 regions(ireg)%plagInput%iniRandUMax =
REAL(crazy_value_int,kind=rfreal)
334 regions(ireg)%plagInput%iniRandUMin =
REAL(crazy_value_int,kind=rfreal)
335 regions(ireg)%plagInput%iniRandVMax =
REAL(crazy_value_int,kind=rfreal)
336 regions(ireg)%plagInput%iniRandVMin =
REAL(crazy_value_int,kind=rfreal)
337 regions(ireg)%plagInput%iniRandWMax =
REAL(crazy_value_int,kind=rfreal)
338 regions(ireg)%plagInput%iniRandWMin =
REAL(crazy_value_int,kind=rfreal)
351 regions(ireg)%plagInput%iniRandXMin = valsinitmat(irow1,1)
352 regions(ireg)%plagInput%iniRandYMin = valsinitmat(irow1,2)
353 regions(ireg)%plagInput%iniRandZMin = valsinitmat(irow1,3)
354 regions(ireg)%plagInput%iniRandDiamMin = abs(valsinitmat(irow1,4))
355 regions(ireg)%plagInput%iniRandTempMin = abs(valsinitmat(irow1,5))
356 regions(ireg)%plagInput%iniRandSploadMin = abs(valsinitmat(irow1,6))
357 regions(ireg)%plagInput%iniRandUMin = valsinitmat(irow1,7)
358 regions(ireg)%plagInput%iniRandVMin = valsinitmat(irow1,8)
359 regions(ireg)%plagInput%iniRandWMin = valsinitmat(irow1,9)
360 regions(ireg)%plagInput%iniRandXMax = valsinitmat(irow2,1)
361 regions(ireg)%plagInput%iniRandYMax = valsinitmat(irow2,2)
362 regions(ireg)%plagInput%iniRandZMax = valsinitmat(irow2,3)
363 regions(ireg)%plagInput%iniRandDiamMax = abs(valsinitmat(irow2,4))
364 regions(ireg)%plagInput%iniRandTempMax = abs(valsinitmat(irow2,5))
365 regions(ireg)%plagInput%iniRandSploadMax = abs(valsinitmat(irow2,6))
366 regions(ireg)%plagInput%iniRandUMax = valsinitmat(irow2,7)
367 regions(ireg)%plagInput%iniRandVMax = valsinitmat(irow2,8)
368 regions(ireg)%plagInput%iniRandWMax = valsinitmat(irow2,9)
372 CALL
errorstop(global,err_missing_value,__line__)
383 DEALLOCATE( valsinitmat, stat=errorflag )
384 global%error = errorflag
385 IF (global%error /= err_none)
THEN
386 CALL
errorstop( global, err_deallocate,__line__ ,
'valsInitMat' )
subroutine plag_readdispartinitsection(regions)
subroutine registerfunction(global, funName, fileName)
subroutine readlistsection(global, fileID, key, nCols, nRows, vals, defined)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE brbeg
subroutine readsection(global, fileID, nvals, keys, vals, defined)
subroutine readregionsection(global, fileID, nvals, keys, vals, brbeg, brend, defined)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE USE ModDataTypes USE nvals
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)