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

call update! with arbitrary arguments, fix #207 #213

Closed
wants to merge 1 commit into from

Conversation

fredrikekre
Copy link
Member

Actually non-breaking unless you rely on the default value of t = 0.0.

@codecov-io
Copy link

codecov-io commented May 14, 2018

Codecov Report

Merging #213 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #213   +/-   ##
=======================================
  Coverage   90.74%   90.74%           
=======================================
  Files          18       18           
  Lines        1523     1523           
=======================================
  Hits         1382     1382           
  Misses        141      141
Impacted Files Coverage Δ
src/Dofs/ConstraintHandler.jl 91.85% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb3cc17...bfeead4. Read the comment docs.

@fredrikekre
Copy link
Member Author

Perhaps only propagate kwargs?

@KristofferC
Copy link
Collaborator

So all functions need to support exactly the same arguments / kwargs?

@fredrikekre
Copy link
Member Author

You can always define your functions as (x, y, z, args...; kwargs...).

@fredrikekre
Copy link
Member Author

And you only need this for parameters that varies, the rest can still be in the closure.

fredrikekre added a commit that referenced this pull request Mar 7, 2022
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.
fredrikekre added a commit that referenced this pull request Dec 21, 2022
This patch adds an implicit call to update! when closing the
ConstraintHandler. This step is easy to forget, in particular if your
problem doesn't depend on time at all. In addition, it is now possible
to specify constraint functions of the form f(x) directly.

Fixes #207, closes #213, closes #435.
fredrikekre added a commit that referenced this pull request Dec 22, 2022
This patch adds an implicit call to update! when closing the
ConstraintHandler. This step is easy to forget, in particular if your
problem doesn't depend on time at all. In addition, it is now possible
to specify constraint functions of the form f(x) directly.

Fixes #207, closes #213, closes #435.
@fredrikekre fredrikekre deleted the fe/update! branch December 22, 2022 08:05
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

Successfully merging this pull request may close these issues.

3 participants