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

Access field values by slice #27

Closed
adtzlr opened this issue Jul 12, 2021 · 0 comments · Fixed by #28
Closed

Access field values by slice #27

adtzlr opened this issue Jul 12, 2021 · 0 comments · Fixed by #28
Labels
bug Something isn't working

Comments

@adtzlr
Copy link
Owner

adtzlr commented Jul 12, 2021

A field cannot be accessed with a slice. However, this could sometimes be convenient. Take the following code:

displacement = fe.Field(region, dim=3)

# this is the current way to obtain "u1"
u1 = displacement.values.ravel()[dof1]

# this should be possible...
u1 = displacement[dof1]
@adtzlr adtzlr added the bug Something isn't working label Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant