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

"u" and "p" variable shadowing in Decapodes #273

Closed
quffaro opened this issue Oct 18, 2024 · 5 comments · Fixed by #274
Closed

"u" and "p" variable shadowing in Decapodes #273

quffaro opened this issue Oct 18, 2024 · 5 comments · Fixed by #274
Assignees
Labels
bug Something isn't working

Comments

@quffaro
Copy link
Member

quffaro commented Oct 18, 2024

Currently a variable "u" or "p" variable in a Decapode will shadow the u or p arrays produced from gensim. This prevents further variables or parameters from being indexed.

A solution would probably be to use gensym in gensim

@quffaro quffaro added the bug Something isn't working label Oct 18, 2024
@quffaro quffaro self-assigned this Oct 18, 2024
@lukem12345
Copy link
Member

lukem12345 commented Oct 18, 2024

I don't want all local variables to be replaced with gensym'd names because this hampers readability when debugging generated code.

@quffaro
Copy link
Member Author

quffaro commented Oct 18, 2024

I think the "u" and "p" input can be copied to a gensymmed variables?
image

@lukem12345
Copy link
Member

Yes just u and p

@jpfairbanks
Copy link
Member

Would be better to just change the arguments to f(du,u,p,t) to _du,_u,_p,_t?

@quffaro
Copy link
Member Author

quffaro commented Oct 18, 2024

Yeah I've changed them to be __u__, etc. Testing locally

@quffaro quffaro linked a pull request Oct 18, 2024 that will close this issue
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.

3 participants