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

rootfind with p #125

Merged
merged 3 commits into from
Oct 16, 2023
Merged

rootfind with p #125

merged 3 commits into from
Oct 16, 2023

Conversation

lindnemi
Copy link
Collaborator

No description provided.

@lindnemi
Copy link
Collaborator Author

lindnemi commented Aug 1, 2023

todo: use multiple dispatch to support previous behaviour

src/Utilities.jl Outdated
@@ -191,32 +192,32 @@ struct RootRhs
rhs
mpm
end
function (rr::RootRhs)(x)
function (rr::RootRhs)(x,p)
Copy link
Member

Choose a reason for hiding this comment

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

hm commit suggestion is gone...

maybe just

function (rr:RootRhs)(x, p=nothing, t=nothing)

to achieve the old behavior? Also might be worth adding an option for t. Maybe nothing would be the better default than 0.0 since it screams a the user in case there is an explicit t dependency.

Bit off topic, but since the rhs and mpm fields are not typed the inner loop of nlsolve will be type unstable. But this might not be a problem in practice as it converges fast for small systems and for large systems the matrix multiply cost might dominate the runtime dispatch cost 🤷‍♂️

@lindnemi lindnemi merged commit da56a6d into main Oct 16, 2023
7 of 8 checks passed
@lindnemi lindnemi deleted the rootfind_with_p branch October 16, 2023 12:35
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