An extension to the fluidity standard Python types
Proposal for an extended API for the standard Fluidity Python types to allow for more pythonic access and modification.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Discussion
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Whiteboard
The current standard python wrappers for States, Fields, etc. are based on an API which makes heavy use of accessor methods reimplementing the style necessitated by the Fortran data structure. While ensuring that python code can be written by Fortran users without a deep knowledge of language, this means that many powerful and concise python constructions can't be used. Additional overloaded special method names would give more Pythonic classes without preventing those more comfortable with the current approach from using it.
I propose extensions to the methods classes to allow more straightforward use in constructions such as
mystate.
for F1,F2 in zip(myfield1,
F1=4.0*F2