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

Don't setup a JacVec if concrete_jac==true, and use non SciMLOperator W_prototype #2491

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

oscardssmith
Copy link
Contributor

I'm not sure if this is a good idea yet, but I want to run it past CI.

@oscardssmith oscardssmith changed the title Os/no jacvec if concrete jac Don't setup a JacVec if concrete=jac==true, and use non SciMLOperator W_prototype Oct 10, 2024
@oscardssmith oscardssmith changed the title Don't setup a JacVec if concrete=jac==true, and use non SciMLOperator W_prototype Don't setup a JacVec if concrete_jac==true, and use non SciMLOperator W_prototype Oct 10, 2024
jacvec = JacVec(__f, copy(u), p, t;
autodiff = alg_autodiff(alg), tag = OrdinaryDiffEqTag())
WOperator{IIP}(f.mass_matrix, dt, J, u, jacvec)
WOperator{IIP}(f.mass_matrix, dt, J, u, nothing)
Copy link
Member

Choose a reason for hiding this comment

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

how would this work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

by using the Jacobian. if you scroll up to the w_operator ops, they all check for whether ja cacvec exists

@@ -391,7 +391,7 @@ function do_newJW(integrator, alg, nlsolver, repeat_step)::NTuple{2, Bool}
# TODO: add `isJcurrent` support for Rosenbrock solvers
if !isnewton(nlsolver)
isfreshJ = !(integrator.alg isa CompositeAlgorithm) &&
(integrator.iter > 1 && errorfail && !integrator.u_modified)
Copy link
Member

Choose a reason for hiding this comment

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

how would this not be an issue to drop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if iter<=1 we already returned on the first line (I changed that a few months ago)

@ChrisRackauckas
Copy link
Member

Rebase?

@oscardssmith oscardssmith force-pushed the os/no-jacvec-if-concrete_jac branch from 6a2cb4d to 01b0c61 Compare October 21, 2024 12:19
@oscardssmith oscardssmith force-pushed the os/no-jacvec-if-concrete_jac branch from 01b0c61 to 851e3aa Compare November 7, 2024 15:57
@oscardssmith
Copy link
Contributor Author

rebased now that CI ismore stable

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