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

Bracket access to solute storage #29

Closed
philippkraft opened this issue Apr 18, 2018 · 4 comments
Closed

Bracket access to solute storage #29

philippkraft opened this issue Apr 18, 2018 · 4 comments
Assignees
Labels
C++ Need to change C++ files (.h, .cpp) enhancement swig Need to change SWIG-interface files (.i)
Milestone

Comments

@philippkraft
Copy link
Owner

The current access to solute (here X) storages of water storages (here WS) is super ugly:

WS.Solute(X).state

This issue proposes a nicer access like:

WS[X].state

Additionally we can move the conc method from water storage to a property of the solute storage

WS[X].conc
@philippkraft philippkraft added enhancement swig Need to change SWIG-interface files (.i) C++ Need to change C++ files (.h, .cpp) labels Apr 18, 2018
@philippkraft philippkraft added this to the v2.0 milestone Apr 18, 2018
@philippkraft
Copy link
Owner Author

@smultsch: What do you think?

@smultsch
Copy link

For sure, the function call "WS[X].conc" is a really clean solution. But the user needs some foreknowledge, i.e. that the water storage holds a list with solutes.

@philippkraft philippkraft self-assigned this May 3, 2018
@philippkraft
Copy link
Owner Author

The documentation of the tracer use is not so great now anyways. I guess we can simply write a tutorial about that use.

@philippkraft
Copy link
Owner Author

Fixed #29. Usage see test/solute_access.py and demo/adsorption.py. Old usage is still working. Other demos get translated to new usage on the go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ Need to change C++ files (.h, .cpp) enhancement swig Need to change SWIG-interface files (.i)
Projects
None yet
Development

No branches or pull requests

2 participants