Module defining convenient index retrieval functions on various arrays.
interface to retrieve the index of an element in an array.
Function to locate the index of a given character in a character array. Iterates over the elements and returns on the first hit, if no match was found zero is returned.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name | the name to search for |
||
character(len=*), | intent(in) | :: | array(:) | array with the names to search in |
index of first match
Function to locate the indices of an array of characters in another character array. Returns the indices of the first hit, it no match was found zero is returned.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | names(:) | the names to search for |
||
character(len=*), | intent(in) | :: | array(:) | array in which to sarch in |
index of first matches
Transforms a given array of state variables to subblock indices.
If odd
is .true.
returns the odd indices, otherwise the even indices.
If edge
equals "left"
, returns the indices corresponding to the left boundary
block, if edge
equals "right"
returns indices for the right boundary block.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | variables(:) | array of state vector variable names |
||
character(len=*), | intent(in) | :: | state_vector(:) | state vector to consider |
||
integer, | intent(in) | :: | dim_subblock | dimension of the subblock |
||
logical, | intent(in) | :: | odd | uses odd indices if .true. and even if .false. |
||
character(len=*), | intent(in) | :: | edge | which edge to consider, |
integer array containing the corresponding subblock indices
Function to locate the index of a given character in a character array. Iterates over the elements and returns on the first hit, if no match was found zero is returned.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | name | the name to search for |
||
character(len=*), | intent(in) | :: | array(:) | array with the names to search in |
index of first match
Function to locate the indices of an array of characters in another character array. Returns the indices of the first hit, it no match was found zero is returned.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | names(:) | the names to search for |
||
character(len=*), | intent(in) | :: | array(:) | array in which to sarch in |
index of first matches
Transforms a given array of state variables to subblock indices.
If odd
is .true.
returns the odd indices, otherwise the even indices.
If edge
equals "left"
, returns the indices corresponding to the left boundary
block, if edge
equals "right"
returns indices for the right boundary block.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | variables(:) | array of state vector variable names |
||
character(len=*), | intent(in) | :: | state_vector(:) | state vector to consider |
||
integer, | intent(in) | :: | dim_subblock | dimension of the subblock |
||
logical, | intent(in) | :: | odd | uses odd indices if .true. and even if .false. |
||
character(len=*), | intent(in) | :: | edge | which edge to consider, |
integer array containing the corresponding subblock indices