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

How to SciMLBase.FullSpecialize a SecondOrderODEProblem? #405

Open
nathanaelbosch opened this issue Feb 27, 2023 · 2 comments
Open

How to SciMLBase.FullSpecialize a SecondOrderODEProblem? #405

nathanaelbosch opened this issue Feb 27, 2023 · 2 comments

Comments

@nathanaelbosch
Copy link
Contributor

Is there a convenient way to fully specialize a SecondOrderODEProblem for best performance in benchmarks? It seems that the constructor for SecondOrderODEProblem does not allow for specifying SecondOrderODEProblem{true,SciMLBase.FullSpecialize}, which is what I would do for standard ODEProblems.

@ChrisRackauckas
Copy link
Member

I think you'd have to do it directly on the function type right now. This should be expanded.

@nathanaelbosch
Copy link
Contributor Author

Could it be that DynamicalODEFunction uses FullSpecialize by default anyways? I just started implementing a way to specify the specialization for SecondOrderODEFunction, but then saw this:

function DynamicalODEFunction{iip}(f1, f2; kwargs...) where {iip}
DynamicalODEFunction{iip, FullSpecialize}(ODEFunction{iip}(f1),
ODEFunction{iip}(f2); kwargs...)
end

and
DynamicalODEFunction{isinplace(f2), FullSpecialize, typeof(f1), typeof(f2),

In this case there is no problem from my side as the current version leads to the most efficient code anyways.

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