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

Represent states with structs #58

Closed
tkoskela opened this issue May 19, 2020 · 1 comment · Fixed by #95
Closed

Represent states with structs #58

tkoskela opened this issue May 19, 2020 · 1 comment · Fixed by #95
Labels
enhancement New feature or request

Comments

@tkoskela
Copy link
Member

We could possibly go further in the direction of #55 and instead of having

h = state[:,:,1]
vx = state[:,:,2]
vy = state[:,:,3]

Just define state as

struct state{T}
  h::AbstractMatrix{T}
  vx::AbstractMatrix{T}
  vy::AbstractMatrix{T}
end

This would be an Struct-of-Arrays data layout explicitly, and make handling the fields slightly simpler. Disclaimer: I'm not 100% sure about this yet, but writing it down to keep it in mind.

@tkoskela tkoskela added the wontfix This will not be worked on label Jun 5, 2020
@tkoskela tkoskela added enhancement New feature or request and removed wontfix This will not be worked on labels Jun 16, 2020
@tkoskela
Copy link
Member Author

Done in #95

@giordano giordano linked a pull request Jun 16, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant