Skip to content

Conversation

@RolfHut
Copy link
Contributor

@RolfHut RolfHut commented Sep 26, 2022

I've added a get_state and set_state function, to allow users to get the entire state of a model in one request. Related pull requests on the bmi-python and bmi-examples-python repos show how to use this in Python

:ref:`get_value_ptr` Get a reference to the values of a given variable.
:ref:`get_value_at_indices` Get variable values at specific locations.
:ref:`get_state` Get all the variables that together form the state of the model.
:ref:`get_state_pr` Get a reference to the value of the state.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might suggest get_state_ptr to be consistent with the other functions that get a reference.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this is defined as get_state_ptr in bmi-python so get_state_pr is a typo?

:ref:`set_value` Set the values of a given variable.
:ref:`set_value_at_indices` Set the values of a variable at specific locations.
:ref:`set_state` Set all the variables that together form the state of the model.
:ref:`set_state_pr` Set the state by providing a reference.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might suggest set_state_ptr to be consistent with the other functions that get a reference.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this is defined as set_state_ptr in bmi-python so set_state_pr is a typo?

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

Successfully merging this pull request may close these issues.

2 participants