An extension to the fluidity standard Python types

Registered by James Robert Percival

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

Related branches

Sprints

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.fields['MyField'][:]=Right_hand_side

for F1,F2 in zip(myfield1,myfield2):
      F1=4.0*F2

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.