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

Drop passing p and t to the JacVec operator #2062

Merged
merged 2 commits into from
Nov 17, 2023
Merged

Conversation

avik-pal
Copy link
Member

No description provided.

update_coefficients!(W.J, u, p, t)
if W.J isa FunctionOperator
update_coefficients!(W.J, u, ifelse(W.J.p === nothing, nothing, p),
ifelse(W.J.t === nothing, nothing, t))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this all about? Why doesn't the update_coefficients! handle this correctly?

@@ -874,7 +887,7 @@ function build_J_W(alg, u, uprev, p, t, dt, f::F, ::Type{uEltypeNoUnits},
# be overridden with concrete_jac.

_f = islin ? (isode ? f.f : f.f1.f) : f
jacvec = JacVec(UJacobianWrapper(_f, t, p), copy(u), p, t;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is it going to update the coefficients correctly without this?

@avik-pal
Copy link
Member Author

That was a mistake. But now all tests are passing. Also we don't carry around p and t at multiple levels of the wrapper. It is only present in the FunctionOperator.

@avik-pal avik-pal closed this Nov 17, 2023
@avik-pal avik-pal reopened this Nov 17, 2023
@avik-pal avik-pal merged commit fb09cc2 into SciML:master Nov 17, 2023
110 of 113 checks passed
@avik-pal avik-pal deleted the ap/drop_pt branch November 17, 2023 16:48
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.

2 participants