-
Notifications
You must be signed in to change notification settings - Fork 89
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
call update! with arbitrary arguments, fix #207 #213
Conversation
Codecov Report
@@ Coverage Diff @@
## master #213 +/- ##
=======================================
Coverage 90.74% 90.74%
=======================================
Files 18 18
Lines 1523 1523
=======================================
Hits 1382 1382
Misses 141 141
Continue to review full report at Codecov.
|
Perhaps only propagate kwargs? |
So all functions need to support exactly the same arguments / kwargs? |
You can always define your functions as |
And you only need this for parameters that varies, the rest can still be in the closure. |
This allows functions for Dirichlet boundary conditions to accept a third argument with parameters that are not available when defining the constraint (e.g. data that are computed/updated/changed during the simulation). `update!` can now be called with a third argument which is passed along to the constraint function `f`, for example `update!(ch, t, p)` will call `f(x, t, p)`. Fixes #207, closes #213.
Actually non-breaking unless you rely on the default value of
t = 0.0
.