FEDEM Solver
R8.0
Source code of the dynamics solver
|
Module with functions and subroutines for parsing solver input files. More...
Functions/Subroutines | |
subroutine | iucopytoscratch (itmp, chname, ierr) |
Copies a solver input file to a temporary scratch file. More... | |
subroutine | iuwritetoscratch (itmp, chmodel, ierr) |
Writes an input file to a temporary scratch file. More... | |
character(len=len(string)) function, private | iutoupper (string) |
Converts the text string to all uppercase. More... | |
integer function | iugetnumberofentries (file, string, ierr) |
Counts number of entries of a text string in a solver input file. More... | |
logical function | iusetposatfirstentry (file, string, ierr) |
Sets position at the first entry of a text string in a file. More... | |
logical function | iusetposatnextentry (file, string, ierr) |
Sets position at the next entry of a text string in a file. More... | |
integer function | iuchartoint (string, stringArray, ierr, startIndex) |
Searches for a text string in an array of strings. More... | |
Module with functions and subroutines for parsing solver input files.
This module contains various utility subroutines and functions used for parsing solver input files based on the namelist Fortran90 feature.
Bjorn Haugen
integer function inpututilities::iuchartoint | ( | character(len=*), intent(in) | string, |
character(len=*), dimension(:), intent(in) | stringArray, | ||
integer, intent(inout), optional | ierr, | ||
integer, intent(in), optional | startIndex | ||
) |
Searches for a text string in an array of strings.
[in] | string | The text string to search for |
[in] | stringArray | Array of text strings to search within |
ierr | Error flag | |
[in] | startIndex | Optional offset for the returned array index |
subroutine inpututilities::iucopytoscratch | ( | integer, intent(in) | itmp, |
character(len=*), intent(in) | chname, | ||
integer, intent(out) | ierr | ||
) |
Copies a solver input file to a temporary scratch file.
[in] | itmp | File unit number of the file to copy to |
[in] | chname | Name of the solver input file to copy from |
[out] | ierr | Error flag |
Any \r
character at the end of each line is removed on UNIX.
integer function inpututilities::iugetnumberofentries | ( | integer, intent(in) | file, |
character(len=*), intent(in) | string, | ||
integer, intent(out) | ierr | ||
) |
Counts number of entries of a text string in a solver input file.
[in] | file | File unit number of the file to count entries in |
[in] | string | The text string to count the number of entries of |
[in] | ierr | Error flag |
logical function inpututilities::iusetposatfirstentry | ( | integer, intent(in) | file, |
character(len=*), intent(in) | string, | ||
integer, intent(out), optional | ierr | ||
) |
Sets position at the first entry of a text string in a file.
[in] | file | File unit number of the file to set position for |
[in] | string | The text string to find the file position for |
ierr | Error flag |
logical function inpututilities::iusetposatnextentry | ( | integer, intent(in) | file, |
character(len=*), intent(in) | string, | ||
integer, intent(out), optional | ierr | ||
) |
Sets position at the next entry of a text string in a file.
[in] | file | File unit number of the file to set position for |
[in] | string | The text string to find the file position for |
ierr | Error flag |
|
private |
Converts the text string to all uppercase.
subroutine inpututilities::iuwritetoscratch | ( | integer, intent(in) | itmp, |
character(len=*), intent(in) | chmodel, | ||
integer, intent(out) | ierr | ||
) |
Writes an input file to a temporary scratch file.
[in] | itmp | File unit number of the file to write to |
[in] | chmodel | Character string containing the solver model to write |
[out] | ierr | Error flag |
This subroutine is used the model is passed to the solver through a long text string, and not via a solver input file. That is, when the actual solver input file has been parsed by some external process.