The Basic Model Interface

The functions that comprise the Basic Model Interface can be grouped into categories:

Table 3 lists the individual BMI functions along with a brief description. Following the table is a detailed description of each function, including the function prototype in SIDL, grouped by functional category.

Table 3: Summary of BMI functions.

Function

Description

get_bmi_version

Version of the BMI implemented.

initialize

Perform startup tasks for the model.

update

Advance model state by one time step.

update_until

Advance model state until the given time.

finalize

Perform tear-down tasks for the model.

get_component_name

Name of the model.

get_input_item_count

Count of a model’s input variables.

get_output_item_count

Count of a model’s output variables.

get_input_var_names

List of a model’s input variables.

get_output_var_names

List of a model’s output variables.

get_var_grid

Get the grid identifier for a variable.

get_var_type

Get the data type of a variable.

get_var_units

Get the units of a variable.

get_var_itemsize

Get the size (in bytes) of one element of a variable.

get_var_nbytes

Get the total size (in bytes) of a variable.

get_var_location

Get the grid element type of a variable.

get_current_time

Current time of the model.

get_start_time

Start time of the model.

get_end_time

End time of the model.

get_time_units

Time units used in the model.

get_time_step

Time step used in the model.

get_value

Get a copy of values of a given variable.

get_value_ptr

Get a reference to the values of a given variable.

get_value_at_indices

Get variable values at specific locations.

set_value

Set the values of a given variable.

set_value_at_indices

Set the values of a variable at specific locations.

get_grid_rank

Get the number of dimensions of a computational grid.

get_grid_size

Get the total number of elements of a computational grid.

get_grid_type

Get the grid type as a string.

get_grid_shape

Get the dimensions of a computational grid.

get_grid_spacing

Get the spacing between grid nodes.

get_grid_origin

Get the origin of a grid.

get_grid_x

Get the locations of a grid’s nodes in dimension 1.

get_grid_y

Get the locations of a grid’s nodes in dimension 2.

get_grid_z

Get the locations of a grid’s nodes in dimension 3.

get_grid_node_count

Get the number of nodes in the grid.

get_grid_edge_count

Get the number of edges in the grid.

get_grid_face_count

Get the number of faces in the grid.

get_grid_edge_nodes

Get the edge-node connectivity.

get_grid_face_edges

Get the face-edge connectivity.

get_grid_face_nodes

Get the face-node connectivity.

get_grid_nodes_per_face

Get the number of nodes for each face.