[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60240] Jacobian for ode15s as matrix fails
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #60240] Jacobian for ode15s as matrix fails |
Date: |
Sun, 21 Mar 2021 07:02:01 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36 Edg/89.0.774.57 |
Follow-up Comment #4, bug #60240 (project octave):
I think I can follow most of your reasoning. Apart from the last point where
you conclude that `ode15s.m` needs to be fixed.
Imho, it is an arbitrary requirement that the mass matrix *must* be set if the
Jacobian is a matrix. If the mass matrix is omitted, the user probably expects
that the system of differential equations `y' = f(t,y)` is solved (instead of
`M(t,y) * y' = f(t,y)`).
Like you wrote, that means that the mass matrix could be set to the identity
matrix to solve that system.
In principle, it doesn't matter if we default to the identity matrix in
`ode15s.m` or in `__ode15__.cc`. However, if we decided to do the change in
`ode15s.m` and left `__ode15__.cc` as it is, that would mean that every
function that calls `__ode15__` would need to be checked if it sets the
correct default value for the mass matrix.
If instead we decided to set the mass matrix to the identity matrix (if it is
empty) in `__ode15__.cc`, we (and anyone else using `__ode15__`) wouldn't need
to worry about implementing that check. Since this would mean a reduction of
potential code duplication, I'd argue to change `__ode15__.cc`.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60240>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/