aot_extdouble_vector_module Module

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.


Uses

  • module~~aot_extdouble_vector_module~~UsesGraph module~aot_extdouble_vector_module aot_extdouble_vector_module module~aot_extdouble_top_module aot_extdouble_top_module module~aot_extdouble_vector_module->module~aot_extdouble_top_module module~aot_table_ops_module aot_table_ops_module module~aot_extdouble_vector_module->module~aot_table_ops_module module~aot_top_module aot_top_module module~aot_extdouble_vector_module->module~aot_top_module module~flu_binding flu_binding module~aot_extdouble_vector_module->module~flu_binding module~aot_extdouble_top_module->module~flu_binding module~aot_err_module aot_err_module module~aot_extdouble_top_module->module~aot_err_module module~aot_table_ops_module->module~aot_top_module module~aot_table_ops_module->module~flu_binding module~flu_kinds_module flu_kinds_module module~aot_table_ops_module->module~flu_kinds_module module~aot_top_module->module~aot_extdouble_top_module module~aot_top_module->module~flu_binding module~aot_top_module->module~aot_err_module module~aot_quadruple_top_module aot_quadruple_top_module module~aot_top_module->module~aot_quadruple_top_module module~aot_top_module->module~flu_kinds_module iso_c_binding iso_c_binding module~flu_binding->iso_c_binding module~dump_lua_fif_module dump_lua_fif_module module~flu_binding->module~dump_lua_fif_module module~flu_binding->module~flu_kinds_module module~lua_fif lua_fif module~flu_binding->module~lua_fif module~lua_parameters lua_parameters module~flu_binding->module~lua_parameters module~aot_err_module->module~flu_binding module~aot_quadruple_top_module->module~flu_binding module~aot_quadruple_top_module->module~aot_err_module module~dump_lua_fif_module->iso_c_binding module~lua_fif->iso_c_binding module~lua_fif->module~lua_parameters module~lua_parameters->iso_c_binding

Used by

  • module~~aot_extdouble_vector_module~~UsedByGraph module~aot_extdouble_vector_module aot_extdouble_vector_module module~aot_vector_module aot_vector_module module~aot_vector_module->module~aot_extdouble_vector_module module~aotus_module aotus_module module~aotus_module->module~aot_vector_module module~aot_path_module aot_path_module module~aot_path_module->module~aotus_module

Interfaces

public interface aot_get_val

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).

  • private subroutine get_table_extdouble_vvect(val, ErrCode, maxlength, L, thandle, key, pos, default)

    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.

    Arguments

    Type IntentOptional 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.

public interface aot_table_get_val

  • private subroutine get_table_extdouble_vvect(val, ErrCode, maxlength, L, thandle, key, pos, default)

    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.

    Arguments

    Type IntentOptional 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.

public interface aot_top_get_val

  • private subroutine get_top_extdouble_vvect(val, ErrCode, maxlength, L, default)

    Arguments

    Type IntentOptional 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.

public interface aot_get_val

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.

  • private subroutine get_table_extdouble_v(val, ErrCode, L, thandle, key, pos, default)

    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.

    Arguments

    Type IntentOptional 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.

public interface aot_table_get_val

  • private subroutine get_table_extdouble_v(val, ErrCode, L, thandle, key, pos, default)

    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.

    Arguments

    Type IntentOptional 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.

public interface aot_top_get_val

  • private subroutine get_top_extdouble_v(val, ErrCode, L, default)

    Arguments

    Type IntentOptional 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.


Subroutines

private subroutine get_table_extdouble_vvect(val, ErrCode, maxlength, L, thandle, key, pos, default)

This routine obtains a vectorial quantity with variable length from a Lua table as a whole.

Read more…

Arguments

Type IntentOptional 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.

private subroutine get_table_extdouble_v(val, ErrCode, L, thandle, key, pos, default)

This routine obtains a vectorial quantity with fixed length from a Lua table as a whole.

Read more…

Arguments

Type IntentOptional 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.

private subroutine get_top_extdouble_vvect(val, ErrCode, maxlength, L, default)

Arguments

Type IntentOptional 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.

private subroutine get_top_extdouble_v(val, ErrCode, L, default)

Arguments

Type IntentOptional 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.