DAMASK with grid solvers  Revision: v2.0.3-2204-gdb1f2151
The Düsseldorf Advanced Material Simulation Kit with Grid Solvers
list Module Reference

linked list More...

Data Types

type  tpartitionedstring
 
type  tpartitionedstringlist
 

Functions/Subroutines

subroutine add (this, string)
 add element More...
 
subroutine show (this)
 prints all elements More...
 
subroutine free (this)
 empties list and frees associated memory More...
 
recursive subroutine finalize (this)
 empties list and frees associated memory More...
 
subroutine finalizearray (this)
 cleans entire array of linke lists More...
 
logical function keyexists (this, key)
 reports wether a given key (string value at first position) exists in the list More...
 
integer function countkeys (this, key)
 count number of key appearances More...
 
real(preal) function getfloat (this, key, defaultVal)
 gets float value of for a given key from a linked list More...
 
integer function getint (this, key, defaultVal)
 gets integer value of for a given key from a linked list More...
 
character(len=pstringlen) function getstring (this, key, defaultVal, raw)
 gets string value of for a given key from a linked list More...
 
real(preal) function, dimension(:), allocatable getfloats (this, key, defaultVal, requiredSize)
 gets array of float values of for a given key from a linked list More...
 
integer function, dimension(:), allocatable getints (this, key, defaultVal, requiredSize)
 gets array of integer values of for a given key from a linked list More...
 
character(len=pstringlen) function, dimension(:), allocatable getstrings (this, key, defaultVal, raw)
 gets array of string values of for a given key from a linked list More...
 

Detailed Description

linked list

Author
Martin Diehl, Max-Planck-Institut für Eisenforschung GmbH

Function/Subroutine Documentation

◆ add()

subroutine list::add ( class(tpartitionedstringlist), intent(in), target  this,
character(len=*), intent(in)  string 
)

add element

Adds a string together with the start/end position of chunks in this string. The new element is added at the end of the list. Empty strings are not added. All strings are converted to lower case. The data is not stored in the new element but in the current.

Definition at line 56 of file list.f90.

References io::io_isblank(), io::io_lc(), and io::io_stringpos().

+ Here is the call graph for this function:

◆ countkeys()

integer function list::countkeys ( class(tpartitionedstringlist), intent(in), target  this,
character(len=*), intent(in)  key 
)
private

count number of key appearances

traverses list and counts each occurrence of specified key

Definition at line 165 of file list.f90.

References io::io_stringvalue().

+ Here is the call graph for this function:

◆ finalize()

recursive subroutine list::finalize ( type(tpartitionedstringlist), intent(inout)  this)
private

empties list and frees associated memory

called when variable goes out of scope. Triggers chain reaction for list

Definition at line 111 of file list.f90.

Referenced by list::tpartitionedstringlist::finalizearray().

+ Here is the caller graph for this function:

◆ finalizearray()

subroutine list::finalizearray ( type(tpartitionedstringlist), dimension(:), intent(inout)  this)
private

cleans entire array of linke lists

called when variable goes out of scope and deallocates the list at each array entry

Definition at line 124 of file list.f90.

Referenced by list::tpartitionedstringlist::finalizearray().

+ Here is the caller graph for this function:

◆ free()

subroutine list::free ( class(tpartitionedstringlist), intent(inout)  this)
private

empties list and frees associated memory

explicit interface to reset list. Triggers final statement (and following chain reaction)

Definition at line 98 of file list.f90.

◆ getfloat()

real(preal) function list::getfloat ( class(tpartitionedstringlist), intent(in), target  this,
character(len=*), intent(in)  key,
real(preal), intent(in), optional  defaultVal 
)
private

gets float value of for a given key from a linked list

gets the last value if the key occurs more than once. If key is not found exits with error unless default is given

Definition at line 188 of file list.f90.

References io::io_error(), io::io_floatvalue(), and io::io_stringvalue().

+ Here is the call graph for this function:

◆ getfloats()

real(preal) function, dimension(:), allocatable list::getfloats ( class(tpartitionedstringlist), intent(in), target  this,
character(len=*), intent(in)  key,
real(preal), dimension(:), intent(in), optional  defaultVal,
integer, intent(in), optional  requiredSize 
)
private

gets array of float values of for a given key from a linked list

for cumulative keys, "()", values from all occurrences are return. Otherwise only all values from the last occurrence. If key is not found exits with error unless default is given.

Definition at line 299 of file list.f90.

References io::io_error(), io::io_floatvalue(), io::io_stringvalue(), and prec::preal.

+ Here is the call graph for this function:

◆ getint()

integer function list::getint ( class(tpartitionedstringlist), intent(in), target  this,
character(len=*), intent(in)  key,
integer, intent(in), optional  defaultVal 
)
private

gets integer value of for a given key from a linked list

gets the last value if the key occurs more than once. If key is not found exits with error unless default is given

Definition at line 220 of file list.f90.

References io::io_error(), io::io_intvalue(), and io::io_stringvalue().

+ Here is the call graph for this function:

◆ getints()

integer function, dimension(:), allocatable list::getints ( class(tpartitionedstringlist), intent(in), target  this,
character(len=*), intent(in)  key,
integer, dimension(:), intent(in), optional  defaultVal,
integer, intent(in), optional  requiredSize 
)
private

gets array of integer values of for a given key from a linked list

for cumulative keys, "()", values from all occurrences are return. Otherwise only all values from the last occurrence. If key is not found exits with error unless default is given.

Definition at line 344 of file list.f90.

References io::io_error(), io::io_intvalue(), and io::io_stringvalue().

+ Here is the call graph for this function:

◆ getstring()

character(len=pstringlen) function list::getstring ( class(tpartitionedstringlist), intent(in), target  this,
character(len=*), intent(in)  key,
character(len=*), intent(in), optional  defaultVal,
logical, intent(in), optional  raw 
)
private

gets string value of for a given key from a linked list

gets the last value if the key occurs more than once. If key is not found exits with error unless default is given. If raw is true, the the complete string is returned, otherwise the individual chunks are returned

Definition at line 253 of file list.f90.

References io::io_error(), and io::io_stringvalue().

+ Here is the call graph for this function:

◆ getstrings()

character(len=pstringlen) function, dimension(:), allocatable list::getstrings ( class(tpartitionedstringlist), intent(in), target  this,
character(len=*), intent(in)  key,
character(len=*), dimension(:), intent(in), optional  defaultVal,
logical, intent(in), optional  raw 
)
private

gets array of string values of for a given key from a linked list

for cumulative keys, "()", values from all occurrences are return. Otherwise only all values from the last occurrence. If key is not found exits with error unless default is given. If raw is true, the the complete string is returned, otherwise the individual chunks are returned

Definition at line 390 of file list.f90.

References io::io_error(), and io::io_stringvalue().

+ Here is the call graph for this function:

◆ keyexists()

logical function list::keyexists ( class(tpartitionedstringlist), intent(in), target  this,
character(len=*), intent(in)  key 
)
private

reports wether a given key (string value at first position) exists in the list

Definition at line 144 of file list.f90.

References io::io_stringvalue().

+ Here is the call graph for this function:

◆ show()

subroutine list::show ( class(tpartitionedstringlist), intent(in), target  this)
private

prints all elements

Strings are printed in order of insertion (FIFO)

Definition at line 80 of file list.f90.