This module provides some convenience functions to access complete vectors from a lua table at once.
It provides two generic interfaces, one for vectors inside tables, and one for vectors defined as global variables (get_config_val). Vectors might be accessed with a variable length, to be defined by the Lua table and allocated in the get_ routines or with a fixed length. For the variable length vectors, a maximal length has to be provided up to which the vector might be allocated. Otherwise the interfaces correspond to the scalar retrieval operations.
Use these routines to obtain a vector whose length is unknown.
Arrays will be allocated as needed to read the data from the Lua script with these routines. A maximal length has to be specified to limit the allocated memory by these routines (and make the interfaces distinguishable).
This routine obtains a vectorial quantity with variable length from a Lua table as a whole.
It is intented to ease the reading of vectors on the Fortran side by capsulating the parsing of the Lua table internally. For the dynamically sized array, which will be allocated, a upper limit to allocate has to be specified.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xdble_k), | intent(out), | allocatable | :: | val(:) |
Vector read from the Lua table, will have the same length as the table but not exceed maxlength, if provided. |
|
integer, | intent(out), | allocatable | :: | ErrCode(:) |
Error code describing problems encountered in each of the components. Will be allocated with the same length as the returned vector. If the complete vector is not given in the Lua script, and no default is provided, an zerosized array will be returned. |
|
integer, | intent(in) | :: | maxlength |
Maximal length to allocate for the vector. |
||
type(flu_State) | :: | L | ||||
integer, | intent(in), | optional | :: | thandle | ||
character(len=*), | intent(in), | optional | :: | key |
Name of the variable (vector) to read. |
|
integer, | intent(in), | optional | :: | pos |
Position of the (vector) to read. |
|
real(kind=xdble_k), | intent(in), | optional | :: | default(:) |
A default vector to use, if no proper definition is found. Components will be filled with the help of this default definition. |
This routine obtains a vectorial quantity with variable length from a Lua table as a whole.
It is intented to ease the reading of vectors on the Fortran side by capsulating the parsing of the Lua table internally. For the dynamically sized array, which will be allocated, a upper limit to allocate has to be specified.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xdble_k), | intent(out), | allocatable | :: | val(:) |
Vector read from the Lua table, will have the same length as the table but not exceed maxlength, if provided. |
|
integer, | intent(out), | allocatable | :: | ErrCode(:) |
Error code describing problems encountered in each of the components. Will be allocated with the same length as the returned vector. If the complete vector is not given in the Lua script, and no default is provided, an zerosized array will be returned. |
|
integer, | intent(in) | :: | maxlength |
Maximal length to allocate for the vector. |
||
type(flu_State) | :: | L | ||||
integer, | intent(in), | optional | :: | thandle | ||
character(len=*), | intent(in), | optional | :: | key |
Name of the variable (vector) to read. |
|
integer, | intent(in), | optional | :: | pos |
Position of the (vector) to read. |
|
real(kind=xdble_k), | intent(in), | optional | :: | default(:) |
A default vector to use, if no proper definition is found. Components will be filled with the help of this default definition. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xdble_k), | intent(out), | allocatable | :: | val(:) |
Vector read from the Lua table, will have the same length as the table but not exceed maxlength, if provided. |
|
integer, | intent(out), | allocatable | :: | ErrCode(:) |
Error code describing problems encountered in each of the components. Will be allocated with the same length as the returned vector. If the complete vector is not given in the Lua script, and no default is provided, an zerosized array will be returned. |
|
integer, | intent(in) | :: | maxlength |
Maximal length to allocate for the vector. |
||
type(flu_State) | :: | L | ||||
real(kind=xdble_k), | intent(in), | optional | :: | default(:) |
A default vector to use, if no proper definition is found. Components will be filled with the help of this default definition. |
Use these routines to obtain a vector of known length.
The given vector has to exist already and will be filled by values from the Lua table, as far as they exist. If the Lua table is longer than the available elements in the array only the first elements from the table will be stored in the array.
This routine obtains a vectorial quantity with fixed length from a Lua table as a whole.
It is intented to ease the reading of vectors on the Fortran side by capsulating the parsing of the Lua table internally. Components which are not found are filled with the data given in the default vector. For each component an error code will be returned to indicate the success when reading it. If the vector is not defined at all, all components will be indicated as non-existent. Components, which are neither defined in the Lua script, nor in the default will be marked with the aoterr_Fatal flag.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xdble_k), | intent(out) | :: | val(:) |
Vector read from the Lua table. |
||
integer, | intent(out) | :: | ErrCode(:) |
Error code describing problems encountered in each of the components. This array has to have the same length as val. |
||
type(flu_State) | :: | L | ||||
integer, | intent(in), | optional | :: | thandle | ||
character(len=*), | intent(in), | optional | :: | key |
Name of the variable (vector) to read. |
|
integer, | intent(in), | optional | :: | pos |
Position of the (vector) to read. |
|
real(kind=xdble_k), | intent(in), | optional | :: | default(:) |
A default vector to use, if no proper definition is found. Components will be filled with the help of this default definition. |
This routine obtains a vectorial quantity with fixed length from a Lua table as a whole.
It is intented to ease the reading of vectors on the Fortran side by capsulating the parsing of the Lua table internally. Components which are not found are filled with the data given in the default vector. For each component an error code will be returned to indicate the success when reading it. If the vector is not defined at all, all components will be indicated as non-existent. Components, which are neither defined in the Lua script, nor in the default will be marked with the aoterr_Fatal flag.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xdble_k), | intent(out) | :: | val(:) |
Vector read from the Lua table. |
||
integer, | intent(out) | :: | ErrCode(:) |
Error code describing problems encountered in each of the components. This array has to have the same length as val. |
||
type(flu_State) | :: | L | ||||
integer, | intent(in), | optional | :: | thandle | ||
character(len=*), | intent(in), | optional | :: | key |
Name of the variable (vector) to read. |
|
integer, | intent(in), | optional | :: | pos |
Position of the (vector) to read. |
|
real(kind=xdble_k), | intent(in), | optional | :: | default(:) |
A default vector to use, if no proper definition is found. Components will be filled with the help of this default definition. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xdble_k), | intent(out) | :: | val(:) |
Vector read from the Lua table. |
||
integer, | intent(out) | :: | ErrCode(:) |
Error code describing problems encountered in each of the components. This array has to have the same length as val. |
||
type(flu_State) | :: | L | ||||
real(kind=xdble_k), | intent(in), | optional | :: | default(:) |
A default vector to use, if no proper definition is found. Components will be filled with the help of this default definition. |
This routine obtains a vectorial quantity with variable length from a Lua table as a whole.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xdble_k), | intent(out), | allocatable | :: | val(:) |
Vector read from the Lua table, will have the same length as the table but not exceed maxlength, if provided. |
|
integer, | intent(out), | allocatable | :: | ErrCode(:) |
Error code describing problems encountered in each of the components. Will be allocated with the same length as the returned vector. If the complete vector is not given in the Lua script, and no default is provided, an zerosized array will be returned. |
|
integer, | intent(in) | :: | maxlength |
Maximal length to allocate for the vector. |
||
type(flu_State) | :: | L | ||||
integer, | intent(in), | optional | :: | thandle | ||
character(len=*), | intent(in), | optional | :: | key |
Name of the variable (vector) to read. |
|
integer, | intent(in), | optional | :: | pos |
Position of the (vector) to read. |
|
real(kind=xdble_k), | intent(in), | optional | :: | default(:) |
A default vector to use, if no proper definition is found. Components will be filled with the help of this default definition. |
This routine obtains a vectorial quantity with fixed length from a Lua table as a whole.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xdble_k), | intent(out) | :: | val(:) |
Vector read from the Lua table. |
||
integer, | intent(out) | :: | ErrCode(:) |
Error code describing problems encountered in each of the components. This array has to have the same length as val. |
||
type(flu_State) | :: | L | ||||
integer, | intent(in), | optional | :: | thandle | ||
character(len=*), | intent(in), | optional | :: | key |
Name of the variable (vector) to read. |
|
integer, | intent(in), | optional | :: | pos |
Position of the (vector) to read. |
|
real(kind=xdble_k), | intent(in), | optional | :: | default(:) |
A default vector to use, if no proper definition is found. Components will be filled with the help of this default definition. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xdble_k), | intent(out), | allocatable | :: | val(:) |
Vector read from the Lua table, will have the same length as the table but not exceed maxlength, if provided. |
|
integer, | intent(out), | allocatable | :: | ErrCode(:) |
Error code describing problems encountered in each of the components. Will be allocated with the same length as the returned vector. If the complete vector is not given in the Lua script, and no default is provided, an zerosized array will be returned. |
|
integer, | intent(in) | :: | maxlength |
Maximal length to allocate for the vector. |
||
type(flu_State) | :: | L | ||||
real(kind=xdble_k), | intent(in), | optional | :: | default(:) |
A default vector to use, if no proper definition is found. Components will be filled with the help of this default definition. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xdble_k), | intent(out) | :: | val(:) |
Vector read from the Lua table. |
||
integer, | intent(out) | :: | ErrCode(:) |
Error code describing problems encountered in each of the components. This array has to have the same length as val. |
||
type(flu_State) | :: | L | ||||
real(kind=xdble_k), | intent(in), | optional | :: | default(:) |
A default vector to use, if no proper definition is found. Components will be filled with the help of this default definition. |