Fortran Interface

Work in progress

Functions

function ygguint(integer x)

Initialize a ygguint instance.

Interface members:

ygguint1 init_ygguint1(integer(kind=1) x)
ygguint2 init_ygguint2(integer(kind=2) x)
ygguint4 init_ygguint4(integer(kind=4) x)
ygguint8 init_ygguint8(integer(kind=8) x)

Parameters

x[in] Integer that unsigned integer object should be initialized with. The kind of input integer will determine the precision of the unsigned int object.

Returns

A ygguint instance.

subroutine display_null(yggnull x)

Display a null object (for completeness).

Parameters

x[in] Instance to display.

logical ygg_init()
subroutine ygglog_info(character fmt[])

Write a log message at the INFO level.

Parameters

fmt[in] Log message.

subroutine ygglog_debug(character fmt[])

Write a log message at the DEBUG level.

Parameters

fmt[in] Log message.

subroutine ygglog_error(character fmt[])

Write a log message at the ERROR level. This will also cause the calling model to return an error code on exit.

Parameters

fmt[in] Log message.

yggcomm ygg_output(character name[])

Constructor for an output comm. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable.

Parameters

name[in] Name of the channel.

Returns

Output comm structure.

yggcomm ygg_input(character name[])

Constructor for an input comm. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable.

Parameters

name[in] Name of the channel.

Returns

Input comm structure.

yggcomm ygg_output_type(character name[], yggdtype datatype)

Constructor for an output comm that will send a specific data type. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable and a structure defining the datatype of outgoing messages.

Parameters
  • name[in] Name of the channel.

  • datatype[in] Data structure containing type information.

Returns

Output comm structure.

yggcomm ygg_input_type(character name[], yggdtype datatype)

Constructor for an input comm that will receive a specific data type. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable and a structure defining the datatype of incoming messages.

Parameters
  • name[in] Name of the channel.

  • datatype[in] Data structure containing type information.

Returns

Input comm structure.

yggcomm ygg_output_fmt(character name[], character fmt[])

Constructor for an output comm with a type specified via a C-style format string. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable and a format string.

Parameters
  • name[in] Name of the channel.

  • fmt[in] C-style format string that should be used to determine the type of data that will be sent.

Returns

Output comm structure.

yggcomm ygg_input_fmt(character name[], character fmt[])

Constructor for an input comm with a type specified via a C-style format string. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable and a format string.

Parameters
  • name[in] Name of the channel.

  • fmt[in] C-style format string that should be used to determine the type of data that will be received.

Returns

Input comm structure.

yggcomm ygg_ascii_file_output(character name[])

Constructor for an ASCII file output comm. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm sends string output line-by-line.

Parameters

name[in] Name of the channel.

Returns

Output comm structure.

yggcomm ygg_ascii_file_input(character name[])

Constructor for an ASCII file input comm. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm receives string input line-by-line.

Parameters

name[in] Name of the channel.

Returns

Input comm structure.

yggcomm ygg_ascii_table_output(character name[], character format_str[])

Constructor for an ASCII table output comm. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable and a format string. This type of comm outputs table rows one at a time and formats them using the provided format_str.

Parameters
  • name[in] Name of the channel.

  • format_str[in] C-style format string that should be used to format table rows.

Returns

Output comm structure.

yggcomm ygg_ascii_table_input(character name[])

Constructor for an ASCII table input comm. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable and a format string. This type of comm receives table rows one at a time.

Parameters

name[in] Name of the channel.

Returns

Input comm structure.

yggcomm ygg_ascii_array_output(character name[], character format_str[])

Constructor for an ASCII table array output comm. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable and a format string. This type of comm outputs table columns as arrays and formats rows using the provided format_str.

Parameters
  • name[in] Name of the channel.

  • format_str[in] C-style format string that should be used to format table rows.

Returns

Output comm structure.

yggcomm ygg_ascii_array_input(character name[])

Constructor for an ASCII table array input comm. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable and a format string. This type of comm receives table columns as arrays.

Parameters

name[in] Name of the channel.

Returns

Input comm structure.

yggcomm ygg_ply_output(character name[])

Constructor for an output comm that sends Ply data. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm only sends Ply data contained in yggply structures.

Parameters

name[in] Name of the channel.

Returns

Output comm structure.

yggcomm ygg_ply_input(character name[])

Constructor for an input comm that receives Ply data. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm only receives Ply data into yggply structures.

Parameters

name[in] Name of the channel.

Returns

Input comm structure.

yggcomm ygg_obj_output(character name[])

Constructor for an output comm that sends Obj data. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm only sends Obj data contained in yggobj structures.

Parameters

name[in] Name of the channel.

Returns

Output comm structure.

yggcomm ygg_obj_input(character name[])

Constructor for an input comm that receives Obj data. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm only receives Obj data into yggobj structures.

Parameters

name[in] Name of the channel.

Returns

Input comm structure.

yggcomm ygg_generic_output(character name[])

Constructor for an output comm that sends generic data. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm can send any type of data as long as it is wrapped in an ygggeneric structure.

Parameters

name[in] Name of the channel.

Returns

Output comm structure.

yggcomm ygg_generic_input(character name[])

Constructor for an input comm that receives generic data. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm can receive any type of data into an ygggeneric structure.

Parameters

name[in] Name of the channel.

Returns

Input comm structure.

yggcomm ygg_any_output(character name[])

Constructor for an output comm that sends generic data. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm can send any type of data as long as it is wrapped in an ygggeneric structure.

Parameters

name[in] Name of the channel.

Returns

Output comm structure.

yggcomm ygg_any_input(character name[])

Constructor for an input comm that receives generic data. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm can receive any type of data into an ygggeneric structure.

Parameters

name[in] Name of the channel.

Returns

Input comm structure.

yggcomm ygg_json_array_output(character name[])

Constructor for an output comm that sends JSON arrays of generic data. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm can send any type of data as long as it is wrapped in an ygggeneric structure.

Parameters

name[in] Name of the channel.

Returns

Output comm structure.

yggcomm ygg_json_array_input(character name[])

Constructor for an input comm that receives JSON arrays of generic data. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm can receive any type of data into an ygggeneric structure.

Parameters

name[in] Name of the channel.

Returns

Input comm structure.

yggcomm ygg_json_object_output(character name[])

Constructor for an output comm that sends JSON objects of generic data. Create a yggcomm structure for an output channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm can send any type of data as long as it is wrapped in an ygggeneric structure.

Parameters

name[in] Name of the channel.

Returns

Output comm structure.

yggcomm ygg_json_object_input(character name[])

Constructor for an input comm that receives JSON objects of generic data. Create a yggcomm structure for an input channel based on a provided name that is used to locate a particular comm address stored in an environment variable. This type of comm can receive any type of data into an ygggeneric structure.

Parameters

name[in] Name of the channel.

Returns

Input comm structure.

yggcomm ygg_rpc_client(character name[], character out_fmt_in[], character in_fmt_in[])

Constructor for a client-side RPC comm. Create a yggcomm structure for the client side of an RPC channel based on a provided name that is used to locate a particular comm address stored in an environment variable. Types can be specified by format strings.

Parameters
  • name[in] Name of the channel.

  • out_fmt_in[in] C-style format string defining how client requests (outgoing messages) should be formatted.

  • in_fmt_in[in] C-style format string defining how client responses (incoming messages) should be parsed.

Returns

Client comm structure.

yggcomm ygg_rpc_server(character name[], character in_fmt_in[], character out_fmt_in[])

Constructor for a server-side RPC comm. Create a yggcomm structure for the server side of an RPC channel based on a provided name that is used to locate a particular comm address stored in an environment variable. Types can be specified by format strings.

Parameters
  • name[in] Name of the channel.

  • in_fmt_in[in] C-style format string defining how requests (incoming messages) should be parsed.

  • out_fmt_in[in] C-style format string defining how responses (outgoing messages) should be formatted.

Returns

Server comm structure.

yggcomm ygg_rpc_client_type(character name[], yggdtype out_type_in, yggdtype in_type_in)

Constructor for a client-side RPC comm with explicit datatypes. Create a yggcomm structure for the client side of an RPC channel based on a provided name that is used to locate a particular comm address stored in an environment variable. Types can be specified by datatype structures.

Parameters
  • name[in] Name of the channel.

  • out_type_in[in] Datatype structure containing information on the type of data that requests (outgoing messages) will contain.

  • in_type_in[in] Datatype structure containing information on the type of data that responses (incoming messages) will contain.

Returns

Client comm structure.

yggcomm ygg_rpc_server_type(character name[], yggdtype in_type_in, yggdtype out_type_in)

Constructor for a server-side RPC comm with explicit datatypes. Create a yggcomm structure for the server side of an RPC channel based on a provided name that is used to locate a particular comm address stored in an environment variable. Types can be specified by datatype structures.

Parameters
  • name[in] Name of the channel.

  • in_type_in[in] Datatype structure containing information on the type of data that requests (incoming messages) will contain.

  • out_type_in[in] Datatype structure containing information on the type of data that responses (outgoing messages) will contain.

Returns

Server comm structure.

yggcomm ygg_timesync(character name[], character units[])

Constructor for a timesync comm. Create a yggcomm structure for a timesync channel based on a provided name that is used to locate a particular comm address stored in an environment variable.

Parameters
  • name[in] Name of the channel.

  • units[in] Units that outgoing time steps will be in.

Returns

Timesync comm structure.

yggdtype create_dtype_empty(logical use_generic)

Create an empty data type.

Parameters

use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_python(c_ptr pyobj, logical use_generic)

Create a data type based on a Python dictionary.

Parameters
  • pyobj[in] A Python dictionary containing data type information.

  • use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_direct(logical use_generic)

Create a direct data type for handling byte messages.

Parameters

use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_default(character typename[], logical use_generic)

Create a data type for one of the simple JSON data types (e.g. number, integer, string).

Parameters
  • typename[in] Name of the JSON data type that the type object should be initialized for.

  • use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_scalar(character subtype[], integer precision, character units[], logical use_generic)

Create a data type for handling scalars with fixed precision.

Parameters
  • subtype[in] Name of the scalar data type. (e.g. int, uint, float, complex, bytes, unicode)

  • precision[in] Precision (in bits) of the scalar type.

  • units[in] Units that should be associated with this data type.

  • use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_1darray(character subtype[], integer precision, integer length, character units[], logical use_generic)

Create a data type for handling 1D arrays with fixed precision.

Parameters
  • subtype[in] Name of the 1D array element data type (e.g. int, uint, float, complex, bytes, unicode).

  • precision[in] Precision (in bits) of the array element type.

  • length[in] Number of elements in arrays of this type.

  • units[in] Units that should be associated with this data type.

  • use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_ndarray(character subtype[], integer precision, integer ndim, integer shape[], character units[], logical use_generic)

Create a data type for handling 1D arrays with fixed precision.

Parameters
  • subtype[in] Name of the 1D array element data type (e.g. int, uint, float, complex, bytes, unicode).

  • precision[in] Precision (in bits) of the array element type.

  • ndim[in] Number of dimensions in arrays of this type.

  • shape[in] Size of arrays of this type in each dimension.

  • units[in] Units that should be associated with this data type.

  • use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_json_array(integer nitems, yggdtype items[], logical use_generic)

Create a data type for handling JSON arrays.

Parameters
  • nitems[in] The number of items that will be in the arrays.

  • items[in] Data types for each element in the arrays.

  • use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_json_object(integer nitems, character keys[][], yggdtype values[], logical use_generic)

Create a data type for handling JSON object.

Parameters
  • nitems[in] The number of items that will be in the objects.

  • keys[in] The keys that will be in the objects.

  • values[in] Data types for the values associated with the keys.

  • use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_ply(logical use_generic)

Create a data type for handling Ply meshes.

Parameters

use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_obj(logical use_generic)

Create a data type for handling Obj meshes.

Parameters

use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_format(character format_str[], integer as_array, logical use_generic)

Create a data type based on a C-style format string.

Parameters
  • format_str[in] A C-style format string.

  • as_array[in] If True, the data type will expect arrays (one for each field in the format string). If False, the data type will expect scalars.

  • use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_pyobj(character typename[], logical use_generic)

Create a data type for handling Python objects.

Parameters
  • typename[in] Type of Python object. (e.g. instance or class)

  • use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_schema(logical use_generic)

Create a data type for handling schemas.

Parameters

use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

yggdtype create_dtype_any(logical use_generic)

Create a data type for any data type.

Parameters

use_generic[in] True if the data type should expect generic datatypes.

Returns

A data type object.

logical ygg_send(yggcomm ygg_q, character data[], integer data_len)

Send raw bytes data from a character array.

Parameters
  • ygg_q[in] Output/RPC/Timesync comm.

  • data[in] Array of bytes to send.

  • data_len[in] Number of bytes from data to send.

Returns

flag Success (.true.) or failure (.false.) of the send.

logical ygg_recv(yggcomm ygg_q, character data[], integer data_len)

Receive raw bytes data into a character array that cannot be resized.

Parameters
  • ygg_q[in] Input/RPC/Timesync comm.

  • data[in] Array to receive bytes into.

  • data_len[in] Variable where the size of the received message should be stored.

Returns

flag Success (.true.) or failure (.false.) of the receive.

logical ygg_send_nolimit(yggcomm ygg_q, yggchar_r data, integer data_len)

Send raw bytes data from a character array.

Parameters
  • ygg_q[in] Output/RPC/Timesync comm.

  • data[in] Array of bytes to send.

  • data_len[in] Number of bytes from data to send.

Returns

flag Success (.true.) or failure (.false.) of the send.

logical ygg_recv_nolimit(yggcomm ygg_q, yggchar_r data, integer data_len)

Receive raw bytes data into a character array that can be resized.

Parameters
  • ygg_q[in] Input/RPC/Timesync comm.

  • data[in] Array to receive bytes into.

  • data_len[in] Variable where the size of the received message should be stored.

Returns

flag Success (.true.) or failure (.false.) of the receive.

logical ygg_send_var(yggcomm ygg_q, yggptr args)

Send one or more variables.

Interface members:

logical ygg_send_var_sing(yggcomm ygg_q, yggptr args)
logical ygg_send_var_mult(yggcomm ygg_q, yggptr args)

Parameters
  • ygg_q[in] Output/RPC/Timesync comm.

  • args[in] One or more variables to send.

Returns

flag Success (.true.) or failure (.false.) of the send.

logical ygg_rpc_call(yggcomm ygg_q, yggptr oargs, yggptr iargs)

Send a request and receive a response into one or more variables that cannot be resized.

Interface members:

logical ygg_rpc_call_1v1(yggcomm ygg_q, yggptr oargs, yggptr iargs)
logical ygg_rpc_call_1vm(yggcomm ygg_q, yggptr oargs, yggptr iargs)
logical ygg_rpc_call_mv1(yggcomm ygg_q, yggptr oargs, yggptr iargs)
logical ygg_rpc_call_mult(yggcomm ygg_q, yggptr oargs, yggptr iargs)

Parameters
  • ygg_q[in] RPC/Timesync comm.

  • oargs[in] One or more variables to send in the request.

  • iargs[inout] One or more variables to receive the response into that cannot be resized.

Returns

flag Success (.true.) or failure (.false.) of the call.

logical ygg_rpc_call_realloc(yggcomm ygg_q, yggptr oargs, yggptr iargs)

Send a request and receive a response into one or more variables that can be resized.

Interface members:

logical ygg_rpc_call_realloc_1v1(yggcomm ygg_q, yggptr oargs, yggptr iargs)
logical ygg_rpc_call_realloc_1vm(yggcomm ygg_q, yggptr oargs, yggptr iargs)
logical ygg_rpc_call_realloc_mv1(yggcomm ygg_q, yggptr oargs, yggptr iargs)
logical ygg_rpc_call_realloc_mult(yggcomm ygg_q, yggptr oargs, yggptr iargs)

Parameters
  • ygg_q[in] RPC/Timesync comm.

  • oargs[in] One or more variables to send in the request.

  • iargs[inout] One or more variables to receive the response into that can be resized.

Returns

flag Success (.true.) or failure (.false.) of the call.

logical ygg_recv_var(yggcomm ygg_q, yggptr args)

Receive data into one or more variables that cannot be resized.

Interface members:

logical ygg_recv_var_sing(yggcomm ygg_q, yggptr args)
logical ygg_recv_var_mult(yggcomm ygg_q, yggptr args)

Parameters
  • ygg_q[in] Output/RPC/Timesync comm.

  • args[inout] One or more variables to receive into.

Returns

flag Success (.true.) or failure (.false.) of the send.

logical ygg_recv_var_realloc(yggcomm ygg_q, yggptr args)

Receive data into one or more variables that can be resized.

Interface members:

logical ygg_recv_var_realloc_sing(yggcomm ygg_q, yggptr args)
logical ygg_recv_var_realloc_mult(yggcomm ygg_q, yggptr args)

Parameters
  • ygg_q[in] Output/RPC/Timesync comm.

  • args[inout] One or more variables to receive into.

Returns

flag Success (.true.) or failure (.false.) of the send.

yggply init_ply()

Initialize a ply mesh instance.

Returns

A ply mesh.

subroutine free_ply(yggply p)

Free a ply mesh instance.

Parameters

p[in] The ply mesh to free.

yggply copy_ply(yggply p)

Copy a ply mesh instance.

Parameters

p[in] The ply mesh to copy.

Returns

A copy of the mesh.

subroutine display_ply_indent(yggply p, character indent[])

Display the contents of a ply mesh with a certain indentation.

Parameters
  • p[in] The ply mesh to display.

  • indent[in] The indentation to use for each line.

subroutine display_ply(yggply p)

Display the contents of a ply mesh.

Parameters

p[in] The ply mesh to display.

yggobj init_obj()

Initialize an obj mesh instance.

Returns

An obj mesh.

subroutine free_obj(yggobj p)

Free an obj mesh instance.

Parameters

p[in] The obj mesh to free.

yggobj copy_obj(yggobj p)

Copy an obj mesh instance.

Parameters

p[in] The obj mesh to copy.

Returns

A copy of the mesh.

subroutine display_obj_indent(yggobj p, character indent[])

Display the contents of a obj mesh with a certain indentation.

Parameters
  • p[in] The obj mesh to display.

  • indent[in] The indentation to use for each line.

subroutine display_obj(yggobj p)

Display the contents of a obj mesh.

Parameters

p[in] The obj mesh to display.

ygggeneric init_generic()

Initialize a generic object.

Returns

A new generic object.

ygggeneric init_generic_array()

Initialize an array of generic objects.

Returns

A new generic object array.

ygggeneric init_generic_map()

Initialize a mapping of generic objects.

Returns

A new generic object map.

ygggeneric create_generic(yggdtype type_class, yggptr data)

Create a generic object from a type and some data.

Parameters
  • type_class[in] The data type associated with the data pointer.

  • data[in] A pointer to data of an arbitrary type defined by type_class.

Returns

A new generic object containing the provided data.

subroutine free_generic(ygggeneric x)

Free a generic object.

Parameters

x[in] A generic object to free.

logical is_generic_init(ygggeneric x)

Check if a generic object has been initialized.

Parameters

x[in] A generic object.

Returns

.true. if the object has been initialized, .false. otherwise.

ygggeneric copy_generic(ygggeneric src)

Copy a generic object.

Parameters

src[in] A generic object to copy.

Returns

A copy of src.

subroutine display_generic(ygggeneric x)

Display a generic object.

Parameters

x[in] A generic object to display.

integer add_generic_array(ygggeneric arr, ygggeneric x)

Add an element to the end of an array of generic elements.

Parameters
  • arr[in] Array to add element to.

  • x[in] Element to add.

Returns

A flag that is 1 if there is an error and 0 otherwise.

integer set_generic_array(ygggeneric arr, integer i, ygggeneric x)

Set an element in the array at a given index to a new value.

Parameters
  • arr[in] Array to add element to.

  • i[in] Index where element should be added.

  • x[in] Element to add.

Returns

A flag that is 1 if there is an error and 0 otherwise.

integer get_generic_array(ygggeneric arr, integer i, ygggeneric x)

Get an element from an array.

Parameters
  • arr[in] Array to get element from.

  • i[in] Index of element to get.

  • x[out] Pointer to address where element should be stored.

Returns

A flag that is 1 if there is an error and 0 otherwise.

integer set_generic_object(ygggeneric arr, character k[], ygggeneric x)

Set an element in the object at for a given key to a new value.

Parameters
  • arr[in] Object to add element to.

  • k[in] Key where element should be added.

  • x[in] Element to add.

Returns

A flag that is 1 if there is an error and 0 otherwise.

integer get_generic_object(ygggeneric arr, character k[], ygggeneric x)

Get an element from an object.

Parameters
  • arr[in] Object to get element from.

  • k[in] Key of element to return.

  • x[out] Pointer to address where element should be stored.

Returns

A flag that is 1 if there is an error and 0 otherwise.

yggpython init_python()

Initialize a Python object.

Returns

A Python object.

subroutine free_python(yggpython x)

Free a Python object.

Parameters

x[in] The Python object to free.

yggpython copy_python(yggpython x)

Copy a Python object.

Parameters

x[in] The Python object to copy.

Returns

A copy of the Python object.

subroutine display_python(yggpython x)

Display a Python object.

Parameters

x[in] The Python object to display.

integer generic_array_get_size(ygggeneric x)

Get the number of elements in an array object.

Parameters

x[in] Generic object that is presumed to contain an array.

Returns

Number of elements in array.

c_ptr generic_array_get_item(ygggeneric x, integer index, character typename[])

Get an item from an array for types that don’t require additional parameters.

Parameters
  • x[in] Generic object that is presumed to contain an array.

  • index[in] Index for value that should be returned.

  • typename[in] Type of value expected.

Returns

Pointer to data for array item.

integer generic_array_get_item_nbytes(ygggeneric x, integer index)

Get the size of an item from an array in bytes.

Parameters
  • x[in] Generic object that is presumed to contain an array.

  • index[in] Index for value that the size should be returned for.

Returns

Size of the item in bytes.

c_ptr generic_array_get_scalar(ygggeneric x, integer index, character subtype[], integer precision)

Get a scalar item from an array.

Parameters
  • x[in] Generic object that is presumed to contain an array.

  • index[in] Index for value that should be returned.

  • subtype[in] Type of scalar value expected.

  • precision[in] Precision (in bits) of scalar value expected.

Returns

Pointer to data for the array item.

integer generic_array_get_1darray(ygggeneric x, integer index, character subtype[], integer precision, c_ptr data)

Get a 1D array item from an array.

Parameters
  • x[in] Generic object that is presumed to contain an array.

  • index[in] Index for value that should be returned.

  • subtype[in] Type of 1D array expected.

  • precision[in] Precision (in bits) of array expected.

  • data[out] Pointer to memory that should be reallocated to store the 1D array.

Returns

The number of elements in the array.

integer generic_array_get_ndarray(ygggeneric x, integer index, character subtype[], integer precision, c_ptr data)

Get an ND array item from an array.

Parameters
  • x[in] Generic object that is presumed to contain an array.

  • index[in] Index for value that should be returned.

  • subtype[in] Type of ND array expected.

  • precision[in] Precision (in bits) of array expected.

  • data[out] Pointer to memory that should be reallocated to store the ND array.

Returns

The shape of the ND array (size in each dimension).

subroutine generic_array_set_item(ygggeneric x, integer index, character typename[], c_ptr val)

Set an item in an array for types that don’t require additional information.

Parameters
  • x[in] Generic object that is presumed to contain an array.

  • index[in] Index for value that should be set.

  • typename[in] Type of value being set.

  • val[in] Pointer to data that item should be set to.

subroutine generic_array_set_scalar(ygggeneric x, integer index, c_ptr val, character subtype[], integer precision, character units_in[])

Set a scalar value in an array.

Parameters
  • x[in] Generic object that is presumed to contain an array.

  • index[in] Index for value that should be set.

  • val[in] Pointer to scalar data.

  • subtype[in] Subtype of scalar in value.

  • precision[in] Precision of scalar in value.

  • units_in[in] Units of value.

subroutine generic_array_set_1darray(ygggeneric x, integer index, c_ptr val, character subtype[], integer precision, integer length, character units_in[])

Set a 1d array value in an array.

Parameters
  • x[in] Generic object that is presumed to contain an array.

  • index[in] Index for value that should be set.

  • val[in] Pointer to array data.

  • subtype[in] Subtype of array expected.

  • precision[in] Precision of array that is expected.

  • length[in] Number of elements in value.

  • units_in[in] Units of value.

subroutine generic_array_set_ndarray(ygggeneric x, integer index, c_ptr data, character subtype[], integer precision, integer shape[], character units_in[])

Set a nd array value from an array.

Parameters
  • x[in] Generic object that is presumed to contain an array.

  • index[in] Index for value that should be set.

  • data[in] Pointer to array data.

  • subtype[in] Subtype of array in value.

  • precision[in] Precision of array that is in value.

  • shape[in] Pointer to array containing the size of the array in each dimension.

  • units_in[in] const char* Units that should be added to the array.

integer generic_map_get_size(ygggeneric x)

Get the number of elements in an map object.

Parameters

x[in] Generic object that is presumed to contain a map.

Returns

Number of elements in map.

subroutine generic_map_get_keys(ygggeneric x, character keys[][])

Get the keys in a map object.

Parameters
  • x[in] Generic object that is presumed to contain a map.

  • keys[out] Pointer to memory where array of keys should be stored.

Returns

Number of keys in map.

c_ptr generic_map_get_item(ygggeneric x, character key[], character typename[])

Get an item from a map for types that don’t require additional parameters.

Parameters
  • x[in] Generic object that is presumed to contain a map.

  • key[in] Key string for value that should be returned.

  • typename[in] Type of value expected.

Returns

Pointer to data for map item.

integer generic_map_get_item_nbytes(ygggeneric x, character key[])

Get the size of an item from a map in bytes.

Parameters
  • x[in] Generic object that is presumed to contain a map.

  • key[in] Key for value that the size should be returned for.

Returns

Size of the item in bytes.

c_ptr generic_map_get_scalar(ygggeneric x, character key[], character subtype[], integer precision)

Get a scalar value from a map.

Parameters
  • x[in] Generic object that is presumed to contain a map.

  • key[in] Key string for value that should be returned.

  • subtype[in] Subtype of scalar expected.

  • precision[in] Precision of scalar that is expected.

Returns

Pointer to scalar data.

integer generic_map_get_1darray(ygggeneric x, character key[], character subtype[], integer precision, c_ptr data)

Get a 1d array value from a map.

Parameters
  • x[in] Generic object that is presumed to contain a map.

  • key[in] Key string for value that should be returned.

  • subtype[in] Subtype of array expected.

  • precision[in] Precision of array that is expected.

  • data[out] Pointer to pointer that should be reallocated to store the data.

Returns

Number of elements in the data.

integer generic_map_get_ndarray(ygggeneric x, character key[], character subtype[], integer precision, c_ptr data)

Get a nd array value from a map.

Parameters
  • x[in] Generic object that is presumed to contain a map.

  • key[in] Key string for value that should be returned.

  • subtype[in] Subtype of array expected.

  • precision[in] Precision of array that is expected.

  • data[out] Pointer to array that should be reallocated to store the data.

Returns

Shape of the array (size in each dimension).

subroutine generic_map_set_item(ygggeneric x, character key[], character typename[], c_ptr val)

Set an item from a map for types that don’t require additional parameters.

Parameters
  • x[in] Generic object that is presumed to contain a map.

  • key[in] Key string for value that should be set.

  • typename[in] Type of value being set.

  • val[in] Pointer to data that item should be set to.

subroutine generic_map_set_scalar(ygggeneric x, character key[], c_ptr val, character subtype[], integer precision, character units_in[])

Set a scalar value in a map.

Parameters
  • x[in] Generic object that is presumed to contain a map.

  • key[in] Key string for value that should be set.

  • val[in] Pointer to scalar data.

  • subtype[in] Subtype of scalar in value.

  • precision[in] Precision of scalar in value.

  • units_in[in] Units of value.

subroutine generic_map_set_1darray(ygggeneric x, character key[], c_ptr val, character subtype[], integer precision, integer length, character units_in[])

Set a 1d array value in a map.

Parameters
  • x[in] Generic object that is presumed to contain a map.

  • key[in] Key string for value that should be set.

  • val[in] Pointer to array data.

  • subtype[in] Subtype of array expected.

  • precision[in] Precision of array that is expected.

  • length[in] Number of elements in value.

  • units_in[in] Units of value.

subroutine generic_map_set_ndarray(ygggeneric x, character key[], c_ptr data, character subtype[], integer precision, integer shape[], character units_in[])

Set a nd array value in a map.

Parameters
  • x[in] Generic object that is presumed to contain a map.

  • key[in] Key string for value that should be set.

  • data[in] Pointer to array data.

  • subtype[in] Subtype of array in value.

  • precision[in] Precision of array that is in value.

  • shape[in] Pointer to array containing the size of the array in each dimension.

  • units_in[in] Units that should be added to the array.

struct yggcomm

Wrapper for a C comm object.

Public Members

c_ptr comm

C comm object.

struct yggdtype

Wrapper for a C data type.

Public Members

c_ptr ptr

C data type.

struct yggchar_r

Wrapper for a reallocatable character array.

Public Members

character x[]

Wrapped array.

struct c_long_1d

Wrapper for a reallocatable 1D array of c_long.

Public Members

integer< kind=c_long > x []

Wrapped array.

struct unsigned1_1d

Wrapper for a reallocatable 1D array of 1 byte unsigned integers.

Public Members

integer< kind=1 > x []

Wrapped array.

struct unsigned2_1d

Wrapper for a reallocatable 1D array of 2 byte unsigned integers.

Public Members

integer< kind=2 > x []

Wrapped array.

struct unsigned4_1d

Wrapper for a reallocatable 1D array of 4 byte unsigned integers.

Public Members

integer< kind=4 > x []

Wrapped array.

struct unsigned8_1d

Wrapper for a reallocatable 1D array of 8 byte unsigned integers.

Public Members

integer< kind=8 > x []

Wrapped array.

struct integer_1d

Wrapper for a reallocatable 1D array of 1 byte integers.

Public Members

integer x[]

Wrapped array.

struct integer2_1d

Wrapper for a reallocatable 1D array of 2 byte integers.

Public Members

integer< kind=2 > x []

Wrapped array.

struct integer4_1d

Wrapper for a reallocatable 1D array of 4 byte integers.

Public Members

integer< kind=4 > x []

Wrapped array.

struct integer8_1d

Wrapper for a reallocatable 1D array of 8 byte integers.

Public Members

integer< kind=8 > x []

Wrapped array.

struct real_1d

Wrapper for a reallocatable 1D array of real.

Public Members

real x[]

Wrapped array.

struct real4_1d

Wrapper for a reallocatable 1D array of 4 byte real.

Public Members

real< kind=4 > x []

Wrapped array.

struct real8_1d

Wrapper for a reallocatable 1D array of 8 byte real.

Public Members

real< kind=8 > x []

Wrapped array.

struct real16_1d

Wrapper for a reallocatable 1D array of 16 byte real.

Public Members

real< kind=16 > x []

Wrapped array.

struct complex_1d

Wrapper for a reallocatable 1D array of complex.

Public Members

complex x[]

Wrapped array.

struct complex4_1d

Wrapper for a reallocatable 1D array of 4 byte complex.

Public Members

complex< kind=4 > x []

Wrapped array.

struct complex8_1d

Wrapper for a reallocatable 1D array of 8 byte complex.

Public Members

complex< kind=8 > x []

Wrapped array.

struct complex16_1d

Wrapper for a reallocatable 1D array of 16 byte complex.

Public Members

complex< kind=16 > x []

Wrapped array.

struct logical_1d

Wrapper for a reallocatable 1D array of logical.

Public Members

logical x[]

Wrapped array.

struct logical1_1d

Wrapper for a reallocatable 1D array of 1 byte logical.

Public Members

logical< kind=1 > x []

Wrapped array.

struct logical2_1d

Wrapper for a reallocatable 1D array of 2 byte logical.

Public Members

logical< kind=2 > x []

Wrapped array.

struct logical4_1d

Wrapper for a reallocatable 1D array of 4 byte logical.

Public Members

logical< kind=4 > x []

Wrapped array.

struct logical8_1d

Wrapper for a reallocatable 1D array of 8 byte logical.

Public Members

logical< kind=8 > x []

Wrapped array.

struct character_1d

Wrapper for a reallocatable 1D array of character arrays.

Public Members

yggchar_r x[]

Wrapped array.

struct unsigned1_nd

Wrapper for a reallocatable ND array of 1 byte unsigned integer.

Public Members

integer< kind=1 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct unsigned2_nd

Wrapper for a reallocatable ND array of 2 byte unsigned integer.

Public Members

integer< kind=2 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct unsigned4_nd

Wrapper for a reallocatable ND array of 4 byte unsigned integer.

Public Members

integer< kind=4 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct unsigned8_nd

Wrapper for a reallocatable ND array of 8 byte unsigned integer.

Public Members

integer< kind=8 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct c_long_nd

Wrapper for a reallocatable ND array of c_long.

Public Members

integer< kind=c_long > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct integer_nd

Wrapper for a reallocatable ND array of integer.

Public Members

integer x[]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct integer2_nd

Wrapper for a reallocatable ND array of 2 byte integer.

Public Members

integer< kind=2 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct integer4_nd

Wrapper for a reallocatable ND array of 4 byte integer.

Public Members

integer< kind=4 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct integer8_nd

Wrapper for a reallocatable ND array of 8 byte integer.

Public Members

integer< kind=8 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct real_nd

Wrapper for a reallocatable ND array of real.

Public Members

real x[]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct real4_nd

Wrapper for a reallocatable ND array of 4 byte real.

Public Members

real< kind=4 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct real8_nd

Wrapper for a reallocatable ND array of 8 byte real.

Public Members

real< kind=8 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct real16_nd

Wrapper for a reallocatable ND array of 16 byte real.

Public Members

real< kind=16 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct complex_nd

Wrapper for a reallocatable ND array of complex.

Public Members

complex x[]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct complex4_nd

Wrapper for a reallocatable ND array of 4 byte complex.

Public Members

complex< kind=4 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct complex8_nd

Wrapper for a reallocatable ND array of 8 byte complex.

Public Members

complex< kind=8 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct complex16_nd

Wrapper for a reallocatable ND array of 16 byte complex.

Public Members

complex< kind=16 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct logical_nd

Wrapper for a reallocatable ND array of logical.

Public Members

logical x[]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct logical1_nd

Wrapper for a reallocatable ND array of 1 byte logical.

Public Members

logical< kind=1 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct logical2_nd

Wrapper for a reallocatable ND array of 2 byte logical.

Public Members

logical< kind=2 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct logical4_nd

Wrapper for a reallocatable ND array of 4 byte logical.

Public Members

logical< kind=4 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct logical8_nd

Wrapper for a reallocatable ND array of 8 byte logical.

Public Members

logical< kind=8 > x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct bytes_nd

Wrapper for a reallocatable ND array of bytes.

Public Members

character< len=:> x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct unicode_nd

Wrapper for a reallocatable ND array of unicode.

Public Members

character< kind=ucs4, len=:> x []

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct character_nd

Wrapper for a reallocatable ND array of character arrays.

Public Members

yggchar_r x[]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct unsigned1_2d

Wrapper for a reallocatable 2D array of 1 byte unsigned integer.

Public Members

integer< kind=1 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct unsigned2_2d

Wrapper for a reallocatable 2D array of 2 byte unsigned integer.

Public Members

integer< kind=2 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct unsigned4_2d

Wrapper for a reallocatable 2D array of 4 byte unsigned integer.

Public Members

integer< kind=4 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct unsigned8_2d

Wrapper for a reallocatable 2D array of 8 byte unsigned integer.

Public Members

integer< kind=8 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct c_long_2d

Wrapper for a reallocatable 2D array of c_long.

Public Members

integer< kind=c_long > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct integer_2d

Wrapper for a reallocatable 2D array of integer.

Public Members

integer x[][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct integer2_2d

Wrapper for a reallocatable 2D array of 2 byte integer.

Public Members

integer< kind=2 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct integer4_2d

Wrapper for a reallocatable 2D array of 4 byte integer.

Public Members

integer< kind=4 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct integer8_2d

Wrapper for a reallocatable 2D array of 8 byte integer.

Public Members

integer< kind=8 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct real_2d

Wrapper for a reallocatable 2D array of real.

Public Members

real x[][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct real4_2d

Wrapper for a reallocatable 2D array of 4 byte real.

Public Members

real< kind=4 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct real8_2d

Wrapper for a reallocatable 2D array of 8 byte real.

Public Members

real< kind=8 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct real16_2d

Wrapper for a reallocatable 2D array of 16 byte real.

Public Members

real< kind=16 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct complex_2d

Wrapper for a reallocatable 2D array of complex.

Public Members

complex x[][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct complex4_2d

Wrapper for a reallocatable 2D array of 4 byte complex.

Public Members

complex< kind=4 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct complex8_2d

Wrapper for a reallocatable 2D array of 8 byte complex.

Public Members

complex< kind=8 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct complex16_2d

Wrapper for a reallocatable 2D array of 16 byte complex.

Public Members

complex< kind=16 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct logical_2d

Wrapper for a reallocatable 2D array of logical.

Public Members

logical x[][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct logical1_2d

Wrapper for a reallocatable 2D array of 1 byte logical.

Public Members

logical< kind=1 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct logical2_2d

Wrapper for a reallocatable 2D array of 2 byte logical.

Public Members

logical< kind=2 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct logical4_2d

Wrapper for a reallocatable 2D array of 4 byte logical.

Public Members

logical< kind=4 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct logical8_2d

Wrapper for a reallocatable 2D array of 8 byte logical.

Public Members

logical< kind=8 > x [][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct character_2d

Wrapper for a reallocatable 2D array of character arrays.

Public Members

yggchar_r x[][]

Wrapped array.

integer< kind=c_size_t > shape []

Shape of the array.

struct yggptr

A wrapper for any scalar or array accessed via a C pointer. Only some of the members will be used for each specific type.

Public Members

logical ndarray

.true. if the data is an ND array

logical array

.true. if the data is an array

logical alloc

.true. if the memory was allocated

integer< kind=8 > len

Length of an 1D array.

integer< kind=8 > prec

Precison of scalar/array elements.

integer< kind=8 > ndim

Number of dimensions in an ND array.

integer< kind=8 > nbytes

Number of bytes in the wrapped data.

integer< kind=8 > shape []

Shape of an ND array.

c_ptr ptr

C pointer to data.

any item

Fortran pointer to scalar data.

any item_array[]

Fortran pointer to 1D array.

any item_array_2d[][]

Fortran pointer to 2D array.

any item_array_3d[][][]

Fortran pointer to 3D array.

character data_character_unit[]

Fortran pointer to array of characters.

character< kind=ucs4 > data_unicode_unit []

Fortran array to array of unicode characters.

integer< kind=c_size_t > len_c

C variable for storing array length.

integer< kind=c_size_t > prec_c

C variable for storing precision.

integer< kind=c_size_t > ndim_c

C variable for storing number of array dimensions.

integer< kind=c_size_t > shape_c []

C variable for storing the array shape.

c_ptr len_ptr

C pointer to len_c variable.

c_ptr prec_ptr

C pointer to prec_c variable.

c_ptr ndim_ptr

C pointer to ndim_c variable.

c_ptr shape_ptr

C pointer to shape_c variable.

struct yggptr_arr

Wrapper to a reallocatable array of pointers.

Public Members

yggptr vals[]

Wrapped array.

struct yggptr_map

Wrapper to a reallocatable map of pointers.

Public Members

character< len=20 > keys []

Keys in the wrapped object.

yggptr vals[]

Values in the wrapped object.

struct yggnull

Wrapper for a C generic object.

Wrapper for C NULL object.

Public Members

c_ptr ptr

C NULL object.