-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Some solvers don't work with ArrayPartition + ExtendedJumpArray #236
Comments
Does a ComponentArray work for this? |
It does, indeed! Thanks for the hint. |
@kaandocal I'm going to close this, but feel free to reopen if you have further issues/questions! |
I'd argue that this is an example where two rather important Julia packages don't work together - I understand that this might not be solved now (I could have a look at the |
Sure, I've opened this back up. My impression had been that this is more of an ArrayPartition issue from your comments than anything specific in DiffEqJump, but if there are concrete dispatches that could be added here to fix this please do let us know (or make a PR as you said). |
Thanks! It's about the way EJA and APs interact as stiff solvers work for pure |
Yeah in theory it can work. I'm not sure why |
Thanks, much appreciated! This is not an urgent issue given that ComponentArrays do the job, but it might stump future users, which is why I would prefer keeping this open for now... |
Please bear with me, my programming skills are very limited. It seems, however, to me that both type ExtendedJumpArray has no field v ( if I use ComponentArrays) or x (if I use ArrayPartition) I would prefer the latter option to work because I am dealing with a system of jump equations where one real component
Many thanks for your attention. |
Your actual See also the |
Many thanks for your comment! If I replace affect! as
The code is executed but no jump occurs. So the/an issue remains. If I use instead ArrayPartition I get the error message.
Many thanks! |
Did you update your function psi!(du, u, p, t)
Heff = @. - im * p.process_operators[1]
mul!(du.u.v, Heff, u.u.v)
du.u.m = u.u.m
end |
Could you give a simple, short MWE here without all the commented code and intermediary operations? It would make testing / debugging easier. |
Sorry I did not further update. Indeed after further debugging I realised that my code correctly works with
and with u.u as you suggested. The problem only remains with
so the situation is exactly the one described at the beginning of this thread. If you are interested I can provide a MWE |
Awesome, happy to hear |
Excellent. Many thanks for your help! |
yields
The issue seems to be that
vec
applied to anArrayPartition
returns a tuple, not a vector. Running the above withVern7
givesHere the problem is in
initdt
, providingdt = ...
to thesolve
call bypasses the issue. Sorry for the long error messages; the problem seems to be thatArrayPartition
does not follow some standard array interface conventions - any advice for convenient alternatives when solving problems with multiple components?The text was updated successfully, but these errors were encountered: