FileReadingUtilities Module

Extracts the string at the left of the =, which corresponds to the keyword for an input value.

Extracts the string within the quotes in an input file

"Read" the "value" of an real number declared after an = sign in an inputLine

"Read" the "value" of an real array declared after an = sign in an inputLine, e.g. rArray(1:2) = [3.0,4.0]

"Read" the "value" of an integer number declared after an = sign in an inputLine

"Read" the "value" of an integer array declared after an = sign in an inputLine, e.g. iArray(1:2) = [3,4]

Extracts the string within the quotes in an input file

"Read" the "value" of an logical declared after an = sign in an inputLine



Functions

public function GetKeyword(inputLine)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value character(len=line_length)

public function GetValueAsString(inputLine)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value character(len=line_length)

public function GetRealValue(inputLine) result(real_value)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: inputLine

Return Value real(kind=RP)

public function GetRealArray(inputLine) result(x)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value real(kind=RP), DIMENSION(2)

public function GetIntValue(inputLine)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value integer

public function GetIntArray(inputLine) result(N)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value integer, DIMENSION(2)

public function GetStringValue(inputLine)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value character(len=line_length)

public function GetLogicalValue(inputLine)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value logical

public function RemovePath(inputLine)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value character(len=line_length)

public function getPath(inputLine)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value character(len=line_length)

public function getFileName(inputLine)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value character(len=line_length)

public function getFileExtension(inputLine)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: inputLine

Return Value character(len=line_length)

public function getIntArrayFromString(line) result(array)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: line

Return Value integer, allocatable, (:)

public function getRealArrayFromString(line) result(array)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: line

Return Value real(kind=RP), allocatable, (:)


Subroutines

public subroutine PreprocessInputLine(line)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout) :: line

public subroutine getCharArrayFromString(line, linelength, array)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: line
integer :: linelength
character(len=linelength), allocatable :: array(:)

public subroutine getRealArrayFromStringNoCommas(line, array)

Arguments

Type IntentOptional Attributes Name
character(len=4096), intent(in) :: line
real(kind=RP), allocatable :: array(:)

public subroutine getRealArrayFromStringNoCommasMulitpleSpaces(line, array)

Arguments

Type IntentOptional Attributes Name
character(len=1024), intent(in) :: line
real(kind=RP), allocatable :: array(:)