bmi icon indicating copy to clipboard operation
bmi copied to clipboard

Disambiguate get_grid_x, y, and z

Open mdpiper opened this issue 4 years ago • 2 comments

The get_grid_x, get_grid_y, and get_grid_z BMI functions return the location of grid nodes for rectilinear, structured quadrilateral, and unstructured grids. The behavior of these functions changes depending on the grid type. Take, for example, get_grid_x: for a structured quad or unstructured grid, this function returns a vector with length equal to the number of nodes in the grid, whereas for a rectilinear grid, the return has a length equal to the number of columns in the grid.

It may be confusing to a user that these function have different behaviors depending on the grid type. We should consider using different functions for the two cases (1=rectilinear, 2=structured quad + unstructured).

mdpiper avatar Feb 28 '20 21:02 mdpiper

One possibility:

Structured quad, unstructured

  • get_grid_node_x
  • get_grid_node_y
  • get_grid_node_z

The above riff off of get_grid_node_count.

Rectilinear

  • get_grid_x
  • get_grid_y
  • get_grid_z

mdpiper avatar Feb 28 '20 21:02 mdpiper

This might also be a good time to move

x -> x1 y -> x2 z -> x3

which might allow easier generalization to other coordinate systems (natural, spherical, etc.).

mdpiper avatar Mar 02 '20 21:03 mdpiper