-
Notifications
You must be signed in to change notification settings - Fork 17
/
bmi.sidl
73 lines (62 loc) · 2.65 KB
/
bmi.sidl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//
// The Basic Model Interface (BMI)
//
package csdms version 2.1-dev.0 {
interface bmi {
// Model and BMI metadata
int get_bmi_version(out string version);
// Model control: initialize, run, finalize (IRF)
int initialize(in string config_file);
int update();
int update_until(in double time);
int finalize();
// Model information
int get_component_name(out string name);
int get_input_item_count(out int count);
int get_output_item_count(out int count);
int get_input_var_names(out array<string, 1> names);
int get_output_var_names(out array<string, 1> names);
// Variable information
int get_var_grid(in string name, out int grid);
int get_var_type(in string name, out string type);
int get_var_units(in string name, out string units);
int get_var_itemsize(in string name, out int size);
int get_var_nbytes(in string name, out int nbytes);
int get_var_location(in string name, out string location);
// Time information
int get_current_time(out double time);
int get_start_time(out double time);
int get_end_time(out double time);
int get_time_units(out string units);
int get_time_step(out double time_step);
// Getters
int get_value(in string name, in array<> dest);
int get_value_ptr(in string name, out array<> dest_ptr);
int get_value_at_indices(in string name, in array<> dest,
in array<int, 1> inds);
// Setters
int set_value(in string name, in array<> src);
int set_value_at_indices(in string name, in array<int, 1> inds,
in array<> src);
// Grid information
int get_grid_rank(in int grid, out int rank);
int get_grid_size(in int grid, out int size);
int get_grid_type(in int grid, out string type);
// Uniform rectilinear
int get_grid_shape(in int grid, in array<int, 1> shape);
int get_grid_spacing(in int grid, in array<double, 1> spacing);
int get_grid_origin(in int grid, in array<double, 1> origin);
// Non-uniform rectilinear, curvilinear
int get_grid_x(in int grid, in array<double, 1> x);
int get_grid_y(in int grid, in array<double, 1> y);
int get_grid_z(in int grid, in array<double, 1> z);
// Unstructured
int get_grid_node_count(in int grid, out int count);
int get_grid_edge_count(in int grid, out int count);
int get_grid_face_count(in int grid, out int count);
int get_grid_edge_nodes(in int grid, in array<int, 1> edge_nodes);
int get_grid_face_edges(in int grid, in array<int, 1> face_edges);
int get_grid_face_nodes(in int grid, in array<int, 1> face_nodes);
int get_grid_nodes_per_face(in int grid, in array<int, 1> nodes_per_face);
}
}