Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disambiguate get_grid_x, y, and z #65

Open
mdpiper opened this issue Feb 28, 2020 · 2 comments
Open

Disambiguate get_grid_x, y, and z #65

mdpiper opened this issue Feb 28, 2020 · 2 comments
Milestone

Comments

@mdpiper
Copy link
Member

mdpiper commented Feb 28, 2020

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 mdpiper added this to the BMI 3.0 milestone Feb 28, 2020
@mdpiper
Copy link
Member Author

mdpiper commented Feb 28, 2020

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
Copy link
Member Author

mdpiper commented Mar 2, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant