DAMASK with grid solvers  Revision: v2.0.3-2204-gdb1f2151
The Düsseldorf Advanced Material Simulation Kit with Grid Solvers
IO.f90
Go to the documentation of this file.
1 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/IO.f90"
2 # 1 "<built-in>"
3 # 1 "<command-line>"
4 # 1 "/home/damask_user/GitLabCI_Pipeline_4301/DAMASK/src/IO.f90"
5 !--------------------------------------------------------------------------------------------------
11 !--------------------------------------------------------------------------------------------------
12 module io
13  use prec
14 
15  implicit none
16  private
17  character(len=*), parameter, public :: &
18  io_eof = '#EOF#', & !< end of file string
19  io_whitespace = achar(44)//achar(32)//achar(9)//achar(10)//achar(13)
20  character, parameter, public :: &
21  io_eol = new_line('DAMASK'), &
22  io_comment = '#'
23  character(len=*), parameter, private :: &
24  io_divider = '───────────────────'//&
25  '───────────────────'//&
26  '───────────────────'//&
27  '────────────'
28  public :: &
29  io_init, &
30  io_read_ascii, &
32  io_isblank, &
33  io_gettag, &
34  io_stringpos, &
36  io_floatvalue, &
37  io_intvalue, &
38  io_lc, &
39  io_error, &
41 
42 contains
43 
44 
45 !--------------------------------------------------------------------------------------------------
47 !--------------------------------------------------------------------------------------------------
48 subroutine io_init
49 
50  write(6,'(/,a)') ' <<<+- IO init -+>>>'; flush(6)
51 
52  call unittest
53 
54 end subroutine io_init
55 
56 
57 !--------------------------------------------------------------------------------------------------
59 !--------------------------------------------------------------------------------------------------
60 function io_read_ascii(fileName) result(fileContent)
61 
62  character(len=*), intent(in) :: filename
63 
64  character(len=pStringLen), dimension(:), allocatable :: filecontent
65  character(len=pStringLen) :: line
66  character(len=:), allocatable :: rawdata
67  integer :: &
68  filelength, &
69  fileunit, &
70  startpos, endpos, &
71  mytotallines, & !< # lines read from file
72  l, &
73  mystat
74  logical :: warned
75 
76 !--------------------------------------------------------------------------------------------------
77 ! read data as stream
78  inquire(file = filename, size=filelength)
79  if (filelength == 0) then
80  allocate(filecontent(0))
81  return
82  endif
83  open(newunit=fileunit, file=filename, access='stream',&
84  status='old', position='rewind', action='read',iostat=mystat)
85  if(mystat /= 0) call io_error(100,ext_msg=trim(filename))
86  allocate(character(len=fileLength)::rawdata)
87  read(fileunit) rawdata
88  close(fileunit)
89 
90 !--------------------------------------------------------------------------------------------------
91 ! count lines to allocate string array
92  mytotallines = 1
93  do l=1, len(rawdata)
94  if (rawdata(l:l) == io_eol) mytotallines = mytotallines+1
95  enddo
96  allocate(filecontent(mytotallines))
97 
98 !--------------------------------------------------------------------------------------------------
99 ! split raw data at end of line
100  warned = .false.
101  startpos = 1
102  l = 1
103  do while (l <= mytotallines)
104  endpos = merge(startpos + scan(rawdata(startpos:),io_eol) - 2,len(rawdata),l /= mytotallines)
105  if (endpos - startpos > pstringlen-1) then
106  line = rawdata(startpos:startpos+pstringlen-1)
107  if (.not. warned) then
108  call io_warning(207,ext_msg=trim(filename),el=l)
109  warned = .true.
110  endif
111  else
112  line = rawdata(startpos:endpos)
113  endif
114  startpos = endpos + 2 ! jump to next line start
115 
116  filecontent(l) = line
117  l = l + 1
118  enddo
119 
120 end function io_read_ascii
121 
122 
123 !--------------------------------------------------------------------------------------------------
126 !--------------------------------------------------------------------------------------------------
127 integer function io_open_binary(fileName,mode)
128 
129  character(len=*), intent(in) :: filename
130  character, intent(in), optional :: mode
131 
132  character :: m
133  integer :: ierr
134 
135  if (present(mode)) then
136  m = mode
137  else
138  m = 'r'
139  endif
140 
141  if (m == 'w') then
142  open(newunit=io_open_binary, file=trim(filename),&
143  status='replace',access='stream',action='write',iostat=ierr)
144  if (ierr /= 0) call io_error(100,ext_msg='could not open file (w): '//trim(filename))
145  elseif(m == 'r') then
146  open(newunit=io_open_binary, file=trim(filename),&
147  status='old', access='stream',action='read', iostat=ierr)
148  if (ierr /= 0) call io_error(100,ext_msg='could not open file (r): '//trim(filename))
149  else
150  call io_error(100,ext_msg='unknown access mode: '//m)
151  endif
152 
153 end function io_open_binary
154 
155 
156 !--------------------------------------------------------------------------------------------------
158 !--------------------------------------------------------------------------------------------------
159 logical pure function io_isblank(string)
160 
161  character(len=*), intent(in) :: string
162 
163  integer :: posnonblank
164 
165  posnonblank = verify(string,io_whitespace)
166  io_isblank = posnonblank == 0 .or. posnonblank == scan(string,io_comment)
167 
168 end function io_isblank
169 
170 
171 !--------------------------------------------------------------------------------------------------
173 !--------------------------------------------------------------------------------------------------
174 pure function io_gettag(string,openChar,closeChar)
175 
176  character(len=*), intent(in) :: string
177  character, intent(in) :: openchar, & !< indicates beginning of tag
178  closechar
179  character(len=:), allocatable :: io_gettag
180 
181  integer :: left,right
182 
183  left = scan(string,openchar)
184  right = merge(scan(string,closechar), &
185  left + merge(scan(string(left+1:),openchar),0,len(string) > left), &
186  openchar /= closechar)
187 
188  foundtag: if (left == verify(string,io_whitespace) .and. right > left) then
189  io_gettag = string(left+1:right-1)
190  else foundtag
191  io_gettag = ''
192  endif foundtag
193 
194 end function io_gettag
195 
196 
197 !--------------------------------------------------------------------------------------------------
202 !--------------------------------------------------------------------------------------------------
203 pure function io_stringpos(string)
204 
205  character(len=*), intent(in) :: string
206  integer, dimension(:), allocatable :: io_stringpos
207 
208  integer :: left, right
209 
210  allocate(io_stringpos(1), source=0)
211  right = 0
212 
213  do while (verify(string(right+1:),io_whitespace)>0)
214  left = right + verify(string(right+1:),io_whitespace)
215  right = left + scan(string(left:),io_whitespace) - 2
216  if ( string(left:left) == io_comment) exit
217  io_stringpos = [io_stringpos,left,right]
218  io_stringpos(1) = io_stringpos(1)+1
219  endofstring: if (right < left) then
220  io_stringpos(io_stringpos(1)*2+1) = len_trim(string)
221  exit
222  endif endofstring
223  enddo
224 
225 end function io_stringpos
226 
227 
228 !--------------------------------------------------------------------------------------------------
230 !--------------------------------------------------------------------------------------------------
231 function io_stringvalue(string,chunkPos,myChunk)
232 
233  character(len=*), intent(in) :: string
234  integer, dimension(:), intent(in) :: chunkpos
235  integer, intent(in) :: mychunk
236  character(len=:), allocatable :: io_stringvalue
237 
238  validchunk: if (mychunk > chunkpos(1) .or. mychunk < 1) then
239  io_stringvalue = ''
240  call io_error(110,el=mychunk,ext_msg='IO_stringValue: "'//trim(string)//'"')
241  else validchunk
242  io_stringvalue = string(chunkpos(mychunk*2):chunkpos(mychunk*2+1))
243  endif validchunk
244 
245 end function io_stringvalue
246 
247 
248 !--------------------------------------------------------------------------------------------------
250 !--------------------------------------------------------------------------------------------------
251 integer function io_intvalue(string,chunkPos,myChunk)
252 
253  character(len=*), intent(in) :: string
254  integer, dimension(:), intent(in) :: chunkpos
255  integer, intent(in) :: mychunk
256 
257  io_intvalue = verifyintvalue(io_stringvalue(string,chunkpos,mychunk))
258 
259 end function io_intvalue
260 
261 
262 !--------------------------------------------------------------------------------------------------
264 !--------------------------------------------------------------------------------------------------
265 real(pReal) function io_floatvalue(string,chunkPos,myChunk)
266 
267  character(len=*), intent(in) :: string
268  integer, dimension(:), intent(in) :: chunkpos
269  integer, intent(in) :: mychunk
270 
271  io_floatvalue = verifyfloatvalue(io_stringvalue(string,chunkpos,mychunk))
272 
273 end function io_floatvalue
274 
275 
276 !--------------------------------------------------------------------------------------------------
278 !--------------------------------------------------------------------------------------------------
279 pure function io_lc(string)
280 
281  character(len=*), intent(in) :: string
282  character(len=len(string)) :: io_lc
283 
284  character(len=*), parameter :: lower = 'abcdefghijklmnopqrstuvwxyz'
285  character(len=len(LOWER)), parameter :: upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
286 
287  integer :: i,n
288 
289  do i=1,len(string)
290  n = index(upper,string(i:i))
291  if(n/=0) then
292  io_lc(i:i) = lower(n:n)
293  else
294  io_lc(i:i) = string(i:i)
295  endif
296  enddo
297 
298 end function io_lc
299 
300 
301 !--------------------------------------------------------------------------------------------------
303 !--------------------------------------------------------------------------------------------------
304 subroutine io_error(error_ID,el,ip,g,instance,ext_msg)
305 
306  integer, intent(in) :: error_id
307  integer, optional, intent(in) :: el,ip,g,instance
308  character(len=*), optional, intent(in) :: ext_msg
309 
310  external :: quit
311  character(len=pStringLen) :: msg
312  character(len=pStringLen) :: formatstring
313 
314  select case (error_id)
315 
316 !--------------------------------------------------------------------------------------------------
317 ! internal errors
318  case (0)
319  msg = 'internal check failed:'
320 
321 !--------------------------------------------------------------------------------------------------
322 ! file handling errors
323  case (100)
324  msg = 'could not open file:'
325  case (101)
326  msg = 'write error for file:'
327  case (102)
328  msg = 'could not read file:'
329  case (103)
330  msg = 'could not assemble input files'
331  case (106)
332  msg = 'working directory does not exist:'
333 
334 !--------------------------------------------------------------------------------------------------
335 ! file parsing errors
336  case (110)
337  msg = 'invalid chunk selected'
338  case (111)
339  msg = 'invalid character for int:'
340  case (112)
341  msg = 'invalid character for float:'
342 
343 !--------------------------------------------------------------------------------------------------
344 ! lattice error messages
345  case (130)
346  msg = 'unknown lattice structure encountered'
347  case (131)
348  msg = 'hex lattice structure with invalid c/a ratio'
349  case (132)
350  msg = 'trans_lattice_structure not possible'
351  case (133)
352  msg = 'transformed hex lattice structure with invalid c/a ratio'
353  case (134)
354  msg = 'negative lattice parameter'
355  case (135)
356  msg = 'zero entry on stiffness diagonal'
357  case (136)
358  msg = 'zero entry on stiffness diagonal for transformed phase'
359  case (137)
360  msg = 'not defined for lattice structure'
361  case (138)
362  msg = 'not enough interaction parameters given'
363 
364 !--------------------------------------------------------------------------------------------------
365 ! errors related to the parsing of material.config
366  case (140)
367  msg = 'key not found'
368  case (141)
369  msg = 'number of chunks in string differs'
370  case (142)
371  msg = 'empty list'
372  case (143)
373  msg = 'no value found for key'
374  case (144)
375  msg = 'negative number systems requested'
376  case (145)
377  msg = 'too many systems requested'
378  case (146)
379  msg = 'number of values does not match'
380  case (147)
381  msg = 'not supported anymore'
382  case (148)
383  msg = 'Nconstituents mismatch between homogenization and microstructure'
384 
385 !--------------------------------------------------------------------------------------------------
386 ! material error messages and related messages in mesh
387  case (150)
388  msg = 'index out of bounds'
389  case (151)
390  msg = 'microstructure has no constituents'
391  case (153)
392  msg = 'sum of phase fractions differs from 1'
393  case (154)
394  msg = 'homogenization index out of bounds'
395  case (155)
396  msg = 'microstructure index out of bounds'
397  case (157)
398  msg = 'invalid texture transformation specified'
399  case (160)
400  msg = 'no entries in config part'
401  case (161)
402  msg = 'config part found twice'
403  case (165)
404  msg = 'homogenization configuration'
405  case (170)
406  msg = 'no homogenization specified via State Variable 2'
407  case (180)
408  msg = 'no microstructure specified via State Variable 3'
409  case (190)
410  msg = 'unknown element type:'
411  case (191)
412  msg = 'mesh consists of more than one element type'
413 
414 !--------------------------------------------------------------------------------------------------
415 ! plasticity error messages
416  case (200)
417  msg = 'unknown elasticity specified:'
418  case (201)
419  msg = 'unknown plasticity specified:'
420 
421  case (210)
422  msg = 'unknown material parameter:'
423  case (211)
424  msg = 'material parameter out of bounds:'
425 
426 !--------------------------------------------------------------------------------------------------
427 ! numerics error messages
428  case (300)
429  msg = 'unknown numerics parameter:'
430  case (301)
431  msg = 'numerics parameter out of bounds:'
432 
433 !--------------------------------------------------------------------------------------------------
434 ! math errors
435  case (400)
436  msg = 'matrix inversion error'
437  case (401)
438  msg = 'error in Eigenvalue calculation'
439  case (402)
440  msg = 'invalid orientation specified'
441 
442 !-------------------------------------------------------------------------------------------------
443 ! homogenization errors
444  case (500)
445  msg = 'unknown homogenization specified'
446 
447 !--------------------------------------------------------------------------------------------------
448 ! user errors
449  case (600)
450  msg = 'Ping-Pong not possible when using non-DAMASK elements'
451  case (601)
452  msg = 'Ping-Pong needed when using non-local plasticity'
453  case (602)
454  msg = 'invalid selection for debug'
455 
456 !-------------------------------------------------------------------------------------------------
457 ! errors related to the grid solver
458  case (809)
459  msg = 'initializing FFTW'
460  case (810)
461  msg = 'FFTW plan creation'
462  case (831)
463  msg = 'mask consistency violated in grid load case'
464  case (832)
465  msg = 'ill-defined L (line partly defined) in grid load case'
466  case (834)
467  msg = 'negative time increment in grid load case'
468  case (835)
469  msg = 'non-positive increments in grid load case'
470  case (836)
471  msg = 'non-positive result frequency in grid load case'
472  case (837)
473  msg = 'incomplete loadcase'
474  case (838)
475  msg = 'mixed boundary conditions allow rotation'
476  case (839)
477  msg = 'non-positive restart frequency in grid load case'
478  case (841)
479  msg = 'missing header length info in grid mesh'
480  case (842)
481  msg = 'incomplete information in grid mesh header'
482  case (843)
483  msg = 'microstructure count mismatch'
484  case (846)
485  msg = 'rotation for load case rotation ill-defined (R:RT != I)'
486  case (891)
487  msg = 'unknown solver type selected'
488  case (892)
489  msg = 'unknown filter type selected'
490  case (894)
491  msg = 'MPI error'
492 
493 
494 !-------------------------------------------------------------------------------------------------
495 ! general error messages
496  case default
497  msg = 'unknown error number...'
498 
499  end select
500 
501  !$OMP CRITICAL (write2out)
502  write(0,'(/,a)') ' ┌'//io_divider//'┐'
503  write(0,'(a,24x,a,40x,a)') ' │','error', '│'
504  write(0,'(a,24x,i3,42x,a)') ' │',error_id, '│'
505  write(0,'(a)') ' ├'//io_divider//'┤'
506  write(formatstring,'(a,i6.6,a,i6.6,a)') '(1x,a4,a',max(1,len_trim(msg)),',',&
507  max(1,72-len_trim(msg)-4),'x,a)'
508  write(0,formatstring) '│ ',trim(msg), '│'
509  if (present(ext_msg)) then
510  write(formatstring,'(a,i6.6,a,i6.6,a)') '(1x,a4,a',max(1,len_trim(ext_msg)),',',&
511  max(1,72-len_trim(ext_msg)-4),'x,a)'
512  write(0,formatstring) '│ ',trim(ext_msg), '│'
513  endif
514  if (present(el)) &
515  write(0,'(a19,1x,i9,44x,a3)') ' │ at element ',el, '│'
516  if (present(ip)) &
517  write(0,'(a19,1x,i9,44x,a3)') ' │ at IP ',ip, '│'
518  if (present(g)) &
519  write(0,'(a19,1x,i9,44x,a3)') ' │ at constituent',g, '│'
520  if (present(instance)) &
521  write(0,'(a19,1x,i9,44x,a3)') ' │ at instance ',instance, '│'
522  write(0,'(a,69x,a)') ' │', '│'
523  write(0,'(a)') ' └'//io_divider//'┘'
524  flush(0)
525  call quit(9000+error_id)
526  !$OMP END CRITICAL (write2out)
527 
528 end subroutine io_error
529 
530 
531 !--------------------------------------------------------------------------------------------------
533 !--------------------------------------------------------------------------------------------------
534 subroutine io_warning(warning_ID,el,ip,g,ext_msg)
535 
536  integer, intent(in) :: warning_id
537  integer, optional, intent(in) :: el,ip,g
538  character(len=*), optional, intent(in) :: ext_msg
539 
540  character(len=pStringLen) :: msg
541  character(len=pStringLen) :: formatstring
542 
543  select case (warning_id)
544  case (1)
545  msg = 'unknown key'
546  case (34)
547  msg = 'invalid restart increment given'
548  case (35)
549  msg = 'could not get $DAMASK_NUM_THREADS'
550  case (40)
551  msg = 'found spectral solver parameter'
552  case (42)
553  msg = 'parameter has no effect'
554  case (43)
555  msg = 'main diagonal of C66 close to zero'
556  case (47)
557  msg = 'no valid parameter for FFTW, using FFTW_PATIENT'
558  case (50)
559  msg = 'not all available slip system families are defined'
560  case (51)
561  msg = 'not all available twin system families are defined'
562  case (52)
563  msg = 'not all available parameters are defined'
564  case (53)
565  msg = 'not all available transformation system families are defined'
566  case (101)
567  msg = 'crystallite debugging off'
568  case (201)
569  msg = 'position not found when parsing line'
570  case (207)
571  msg = 'line truncated'
572  case (600)
573  msg = 'crystallite responds elastically'
574  case (601)
575  msg = 'stiffness close to zero'
576  case (650)
577  msg = 'polar decomposition failed'
578  case (700)
579  msg = 'unknown crystal symmetry'
580  case (850)
581  msg = 'max number of cut back exceeded, terminating'
582  case default
583  msg = 'unknown warning number'
584  end select
585 
586  !$OMP CRITICAL (write2out)
587  write(6,'(/,a)') ' ┌'//io_divider//'┐'
588  write(6,'(a,24x,a,38x,a)') ' │','warning', '│'
589  write(6,'(a,24x,i3,42x,a)') ' │',warning_id, '│'
590  write(6,'(a)') ' ├'//io_divider//'┤'
591  write(formatstring,'(a,i6.6,a,i6.6,a)') '(1x,a4,a',max(1,len_trim(msg)),',',&
592  max(1,72-len_trim(msg)-4),'x,a)'
593  write(6,formatstring) '│ ',trim(msg), '│'
594  if (present(ext_msg)) then
595  write(formatstring,'(a,i6.6,a,i6.6,a)') '(1x,a4,a',max(1,len_trim(ext_msg)),',',&
596  max(1,72-len_trim(ext_msg)-4),'x,a)'
597  write(6,formatstring) '│ ',trim(ext_msg), '│'
598  endif
599  if (present(el)) &
600  write(6,'(a19,1x,i9,44x,a3)') ' │ at element ',el, '│'
601  if (present(ip)) &
602  write(6,'(a19,1x,i9,44x,a3)') ' │ at IP ',ip, '│'
603  if (present(g)) &
604  write(6,'(a19,1x,i9,44x,a3)') ' │ at constituent',g, '│'
605  write(6,'(a,69x,a)') ' │', '│'
606  write(6,'(a)') ' └'//io_divider//'┘'
607  flush(6)
608  !$OMP END CRITICAL (write2out)
609 
610 end subroutine io_warning
611 
612 
613 !--------------------------------------------------------------------------------------------------
614 ! internal helper functions
615 
616 !--------------------------------------------------------------------------------------------------
618 !--------------------------------------------------------------------------------------------------
619 integer function verifyintvalue(string)
620 
621  character(len=*), intent(in) :: string
622 
623  integer :: readstatus
624  character(len=*), parameter :: validchars = '0123456789+- '
625 
626  valid: if (verify(string,validchars) == 0) then
627  read(string,*,iostat=readstatus) verifyintvalue
628  if (readstatus /= 0) call io_error(111,ext_msg=string)
629  else valid
630  verifyintvalue = 0
631  call io_error(111,ext_msg=string)
632  endif valid
633 
634 end function verifyintvalue
635 
636 
637 !--------------------------------------------------------------------------------------------------
639 !--------------------------------------------------------------------------------------------------
640 real(pReal) function verifyfloatvalue(string)
641 
642  character(len=*), intent(in) :: string
643 
644  integer :: readstatus
645  character(len=*), parameter :: validchars = '0123456789eE.+- '
646 
647  valid: if (verify(string,validchars) == 0) then
648  read(string,*,iostat=readstatus) verifyfloatvalue
649  if (readstatus /= 0) call io_error(112,ext_msg=string)
650  else valid
651  verifyfloatvalue = 0.0_preal
652  call io_error(112,ext_msg=string)
653  endif valid
654 
655 end function verifyfloatvalue
656 
657 
658 !--------------------------------------------------------------------------------------------------
660 !--------------------------------------------------------------------------------------------------
661 subroutine unittest
662 
663  integer, dimension(:), allocatable :: chunkPos
664  character(len=:), allocatable :: str
665 
666  if(dneq(1.0_preal, verifyfloatvalue('1.0'))) call io_error(0,ext_msg='verifyFloatValue')
667  if(dneq(1.0_preal, verifyfloatvalue('1e0'))) call io_error(0,ext_msg='verifyFloatValue')
668  if(dneq(0.1_preal, verifyfloatvalue('1e-1'))) call io_error(0,ext_msg='verifyFloatValue')
669 
670  if(3112019 /= verifyintvalue( '3112019')) call io_error(0,ext_msg='verifyIntValue')
671  if(3112019 /= verifyintvalue(' 3112019')) call io_error(0,ext_msg='verifyIntValue')
672  if(-3112019 /= verifyintvalue('-3112019')) call io_error(0,ext_msg='verifyIntValue')
673  if(3112019 /= verifyintvalue('+3112019 ')) call io_error(0,ext_msg='verifyIntValue')
674 
675  if(any([1,1,1] /= io_stringpos('a'))) call io_error(0,ext_msg='IO_stringPos')
676  if(any([2,2,3,5,5] /= io_stringpos(' aa b'))) call io_error(0,ext_msg='IO_stringPos')
677 
678  str=' 1.0 xxx'
679  chunkpos = io_stringpos(str)
680  if(dneq(1.0_preal,io_floatvalue(str,chunkpos,1))) call io_error(0,ext_msg='IO_floatValue')
681 
682  str='M 3112019 F'
683  chunkpos = io_stringpos(str)
684  if(3112019 /= io_intvalue(str,chunkpos,2)) call io_error(0,ext_msg='IO_intValue')
685 
686  if(.not. io_isblank(' ')) call io_error(0,ext_msg='IO_isBlank/1')
687  if(.not. io_isblank(' #isBlank')) call io_error(0,ext_msg='IO_isBlank/2')
688  if( io_isblank(' i#s')) call io_error(0,ext_msg='IO_isBlank/3')
689 
690 end subroutine unittest
691 
692 end module io
io::io_divider
character(len= *), parameter, private io_divider
Definition: IO.f90:23
io::io_gettag
pure character(len=:) function, allocatable, public io_gettag(string, openChar, closeChar)
get tagged content of string
Definition: IO.f90:175
io::verifyintvalue
integer function verifyintvalue(string)
returns verified integer value in given string
Definition: IO.f90:620
io::io_stringpos
pure integer function, dimension(:), allocatable, public io_stringpos(string)
locates all whitespace-separated chunks in given string and returns array containing number them and ...
Definition: IO.f90:204
io::io_read_ascii
character(len=pstringlen) function, dimension(:), allocatable, public io_read_ascii(fileName)
reads an entire ASCII file into an array
Definition: IO.f90:61
io::io_error
subroutine, public io_error(error_ID, el, ip, g, instance, ext_msg)
write error statements to standard out and terminate the Marc/spectral run with exit #9xxx
Definition: IO.f90:305
io::io_eol
character, parameter, public io_eol
end of line character
Definition: IO.f90:20
io::io_comment
character, parameter, public io_comment
Definition: IO.f90:20
io::io_init
subroutine, public io_init
does nothing.
Definition: IO.f90:49
prec
setting precision for real and int type
Definition: prec.f90:13
prec::pstringlen
integer, parameter pstringlen
default string length
Definition: prec.f90:27
io::io_warning
subroutine, public io_warning(warning_ID, el, ip, g, ext_msg)
writes warning statement to standard out
Definition: IO.f90:535
io
input/output functions, partly depending on chosen solver
Definition: IO.f90:12
quit
subroutine quit(stop_id)
quit subroutine
Definition: quit.f90:12
io::io_isblank
logical pure function, public io_isblank(string)
identifies strings without content
Definition: IO.f90:160
io::io_whitespace
character(len= *), parameter, public io_whitespace
whitespace characters
Definition: IO.f90:17
io::io_intvalue
integer function, public io_intvalue(string, chunkPos, myChunk)
reads integer value at myChunk from string
Definition: IO.f90:252
io::io_eof
character(len= *), parameter, public io_eof
end of file string
Definition: IO.f90:17
io::verifyfloatvalue
real(preal) function verifyfloatvalue(string)
returns verified float value in given string
Definition: IO.f90:641
io::unittest
subroutine unittest
check correctness of some IO functions
Definition: IO.f90:662
io::io_open_binary
integer function, public io_open_binary(fileName, mode)
opens an existing file for reading or a new file for writing.
Definition: IO.f90:128
io::io_lc
pure character(len=len(string)) function, public io_lc(string)
changes characters in string to lower case
Definition: IO.f90:280
io::io_stringvalue
character(len=:) function, allocatable, public io_stringvalue(string, chunkPos, myChunk)
reads string value at myChunk from string
Definition: IO.f90:232
io::io_floatvalue
real(preal) function, public io_floatvalue(string, chunkPos, myChunk)
reads float value at myChunk from string
Definition: IO.f90:266