72 SUBROUTINE readsection( global,fileID,nvals,keys,vals,defined )
80 INTEGER :: fileid,
nvals
81 CHARACTER(*) :: keys(
nvals)
82 LOGICAL :: defined(
nvals)
83 REAL(RFREAL) :: vals(
nvals)
90 CHARACTER(256) ::
line
92 INTEGER :: errorflag, nc
104 READ(fileid,
'(A256)',iostat=errorflag)
line
105 global%error = errorflag
106 IF (global%error /= 0) CALL
errorstop( global,err_file_read,__line__ )
107 IF (
line(1:1) ==
'#')
EXIT
110 IF (.NOT. (defined(ival) .eqv. .true.))
THEN
111 nc = len_trim(keys(ival))
112 IF (
line(1:nc) == trim(keys(ival)))
THEN
113 READ(
line(nc+1:256),*) vals(ival)
114 defined(ival) = .true.
138 INTEGER :: fileid,
nvals
139 CHARACTER(*) :: keys(
nvals)
140 LOGICAL :: defined(
nvals)
141 CHARACTER(*) :: vals(
nvals)
148 CHARACTER(256) ::
line
150 INTEGER :: errorflag, nc,
iend
155 'ReadInputUtil.F90' )
162 READ(fileid,
'(A256)',iostat=errorflag)
line
163 global%error = errorflag
164 IF (global%error /= 0) CALL
errorstop( global,err_file_read,__line__ )
165 IF (
line(1:1) ==
'#')
EXIT
168 IF (.NOT. (defined(ival).eqv..true.))
THEN
169 nc = len_trim(keys(ival))
170 IF (
line(1:nc) == trim(keys(ival)))
THEN
174 defined(ival) = .true.
190 SUBROUTINE readbothsection( global,fileID,nvals,nStrVals,keys,strKeys, &
191 vals,strvals,defined,strdefined )
199 INTEGER :: fileid,
nvals, nstrvals
200 CHARACTER(*) :: keys(
nvals), strkeys(nstrvals)
201 LOGICAL :: defined(
nvals), strdefined(nstrvals)
202 REAL(RFREAL) :: vals(
nvals)
203 CHARACTER(*) :: strvals(nstrvals)
210 CHARACTER(256) ::
line
212 INTEGER :: errorflag, nc,
iend
217 'ReadInputUtil.F90' )
222 strdefined(:) = .false.
225 READ(fileid,
'(A256)',iostat=errorflag)
line
226 global%error = errorflag
227 IF (global%error /= 0) CALL
errorstop( global,err_file_read,__line__ )
228 IF (
line(1:1) ==
'#')
EXIT o
231 IF (.NOT. (defined(ival).eqv..true.))
THEN
232 nc = len_trim(keys(ival))
233 IF (
line(1:nc) == trim(keys(ival)))
THEN
234 READ(
line(nc+1:256),*) vals(ival)
235 defined(ival) = .true.
242 IF (.NOT. (strdefined(ival).eqv..true.))
THEN
243 nc = len_trim(strkeys(ival))
244 IF (
line(1:nc) == trim(strkeys(ival)))
THEN
247 strvals(ival)=adjustl(
line(nc+1:
iend))
248 strdefined(ival) = .true.
266 brbeg,brend,defined )
275 CHARACTER(*) :: keys(
nvals)
276 LOGICAL :: defined(
nvals)
277 REAL(RFREAL) :: vals(
nvals)
284 CHARACTER(256) ::
line
286 INTEGER :: errorflag, nc
291 'ReadInputUtil.F90' )
296 brend = global%nRegions
301 READ(fileid,
'(A256)',iostat=errorflag)
line
302 global%error = errorflag
303 IF (global%error /= 0) CALL
errorstop( global,err_file_read,__line__ )
304 IF (
line(1:1) ==
'#')
EXIT
306 IF (
line(1:5) ==
'BLOCK')
THEN
308 brend =
min(brend,global%nRegions)
310 IF (brend <= 0 ) brend = global%nRegions
314 nc = len_trim(keys(ival))
315 IF (
line(1:nc) == trim(keys(ival)))
THEN
316 READ(
line(nc+1:256),*) vals(ival)
317 defined(ival) = .true.
333 vals,strvals,
brbeg,brend,defined,strdefined )
341 INTEGER :: fileid,
nvals, nstrvals,
brbeg, brend
342 CHARACTER(*) :: keys(
nvals), strkeys(nstrvals)
343 LOGICAL :: defined(
nvals), strdefined(nstrvals)
344 REAL(RFREAL) :: vals(
nvals)
345 CHARACTER(*) :: strvals(nstrvals)
352 CHARACTER(256) ::
line
354 INTEGER :: errorflag, nc,
iend
359 'ReadInputUtil.F90' )
364 brend = global%nRegions
367 strdefined(:) = .false.
370 READ(fileid,
'(A256)',iostat=errorflag)
line
371 global%error = errorflag
372 IF (global%error /= 0) CALL
errorstop( global,err_file_read,__line__ )
373 IF (
line(1:1) ==
'#')
EXIT o
375 IF (
line(1:5) ==
'BLOCK')
THEN
377 brend =
min(brend,global%nRegions)
379 IF (brend <= 0 ) brend = global%nRegions
385 IF (.NOT. (defined(ival).eqv..true.))
THEN
386 nc = len_trim(keys(ival))
387 IF (
line(1:nc) == trim(keys(ival)))
THEN
388 READ(
line(nc+1:256),*) vals(ival)
389 defined(ival) = .true.
396 IF (.NOT. (strdefined(ival).eqv..true.))
THEN
397 nc = len_trim(strkeys(ival))
398 IF (
line(1:nc) == trim(strkeys(ival)))
THEN
401 strvals(ival)=adjustl(
line(nc+1:
iend))
402 strdefined(ival) = .true.
437 INTEGER ::
brbeg, brend
440 CHARACTER(*) :: keys(
nvals), fname
442 CHARACTER(*) :: bcname
444 LOGICAL :: defined(
nvals)
445 REAL(RFREAL) :: vals(
nvals)
452 CHARACTER(256) ::
line
454 INTEGER :: errorflag, nc
459 'ReadInputUtil.F90' )
465 brend = global%nRegions
474 IF (
nvals /= 0 )
THEN
483 READ(fileid,
'(A256)',iostat=errorflag)
line
484 global%error = errorflag
485 IF (global%error /= 0) CALL
errorstop( global,err_file_read,__line__ )
486 IF (
line(1:1) ==
'#')
EXIT
489 IF (
line(1:5) ==
'BLOCK')
THEN
491 brend =
min(brend,global%nRegions)
493 IF (brend <= 0 ) brend = global%nRegions
495 ELSE IF (
line(1:5) ==
'PATCH')
THEN
498 IF (
line(1:5) ==
'PATCH')
THEN
504 ELSE IF (
line(1:7) ==
'DISTRIB')
THEN
505 READ(
line(8:256),*) distrib
506 distrib =
max(distrib,0)
507 distrib =
min(distrib,1)
509 ELSE IF (
line(1:4) ==
'FILE')
THEN
510 READ(
line(5:256),*) fname
513 ELSE IF (
line(1:4) ==
'NAME')
THEN
514 READ(
line(5:chrlen),*) bcname
515 bcname = adjustl(bcname)
516 ELSE IF (
line(1:4) ==
'FILE')
THEN
517 fname = adjustl(
line(5:chrlen))
521 nc = len_trim(keys(ival))
522 IF (
line(1:nc) == trim(keys(ival)))
THEN
523 READ(
line(nc+1:256),*) vals(ival)
524 defined(ival) = .true.
539 SUBROUTINE readlistsection( global,fileID,key,nCols,nRows,vals,defined )
547 INTEGER :: fileid, ncols, nrows
550 REAL(RFREAL),
POINTER :: vals(:,:)
557 CHARACTER(256) ::
line
559 INTEGER :: errorflag, nc
564 'ReadInputUtil.F90' )
574 READ(fileid,
'(A256)',err=10,
end=10)
line
575 IF (
line(1:1) ==
'#')
EXIT
577 IF (
line(1:nc) == trim(
key))
THEN
578 READ(
line(nc+1:256),*,err=10,
end=10) nrows
580 ALLOCATE( vals(nrows,ncols),stat=errorflag )
581 global%error = errorflag
582 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
583 vals(:,:) = 0.0_rfreal
585 READ(fileid,*,err=10,
end=10) (vals(ival,
n),
n=1,ncols)
598 CALL
errorstop( global,err_file_read,__line__ )
608 vals,strvals,defined )
616 INTEGER :: fileid, ncols, nrows
619 REAL(RFREAL),
POINTER :: vals(:,:)
620 CHARACTER(*),
POINTER :: strvals(:)
627 CHARACTER(256) ::
line
629 INTEGER :: errorflag, nc
634 'ReadInputUtil.F90' )
644 READ(fileid,
'(A256)',err=10,
end=10)
line
645 IF (
line(1:1) ==
'#')
EXIT
647 IF (
line(1:nc) == trim(
key))
THEN
648 READ(
line(nc+1:256),*,err=10,
end=10) nrows
650 ALLOCATE( vals(nrows,ncols),stat=errorflag )
651 global%error = errorflag
652 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
653 vals(:,:) = 0.0_rfreal
654 ALLOCATE( strvals(nrows),stat=errorflag )
655 global%error = errorflag
656 IF (global%error /= 0) CALL
errorstop( global,err_allocate,__line__ )
659 READ(fileid,*,err=10,
end=10) strvals(ival),(vals(ival,
n),
n=1,ncols)
660 strvals(ival) = adjustl(strvals(ival))
673 CALL
errorstop( global,err_file_read,__line__ )
subroutine readbothsection(global, fileID, nvals, nStrVals, keys, strKeys, vals, strVals, defined, strDefined)
subroutine readbothregionsection(global, fileID, nvals, nStrVals, keys, strKeys, vals, strVals, brbeg, brend, defined, strDefined)
CImg< T > & line(const unsigned int y0)
Get a line.
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine readstringsection(global, fileID, nvals, keys, vals, defined)
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 readprefixedlistsection(global, fileID, key, nCols, nRows, vals, strVals, defined)
subroutine readpatchsection(global, fileID, nvals, keys, vals, brbeg, brend, prbeg, prend, distrib, profType, fname, 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 knode iend
**********************************************************************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 prend
subroutine readsection(global, fileID, nvals, keys, 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 USE ModDataTypes USE prbeg
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
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)