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

SetGrid rule error #269

Open
remylegoff opened this issue Oct 28, 2024 · 1 comment
Open

SetGrid rule error #269

remylegoff opened this issue Oct 28, 2024 · 1 comment

Comments

@remylegoff
Copy link

I'm now using SetGrid to make a grid wide operation and an error occur. Even for a basic test operation like the example

using DynamicGrids
rule = SetGrid{:a,:b}() do a, b
    b .= a
end

the error is
MethodError: no method matching (::var"#53#54")(::DynamicGrids.RuleData{…}, ::DimArray{…}, ::DimArray{…})

is it due to DimArray use ?

@rafaqz
Copy link
Member

rafaqz commented Oct 28, 2024

No, you are just missing the first argument before a

DynamicGrids passes you the data object in case you need the timestep or aux data etc.

But try not to use SetGrid unless you have to, you lose a lot of optimisations you get in a regular rule, and you can't chain operations on GPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants