octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60240] Jacobian for ode15s as matrix fails


From: Hg200
Subject: [Octave-bug-tracker] [bug #60240] Jacobian for ode15s as matrix fails
Date: Thu, 18 Mar 2021 15:37:39 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0

Follow-up Comment #1, bug #60240 (project octave):

The mentioned code in the OP runs with Matlab, but fails in Octave devel and
also fails with Octave stable. If we stop in ode15s.m, we see that for the
code in the OP, the mass matrix in the option field is empty. Therefore an
empty mass matrix is copied to m_dfdyp in ___ode15___.cc in

++
IDA&
set_jacobian (matrix *dy, matrix *dyp, DAEJacCellDense j)
--

In ___ode15___.cc:688 the following statement then crashes:

++
if (IDASolve (m_mem, tend, &tsol, yy, yyp, IDA_ONE_STEP) != 0)
--

To test this, the attached patch replaces the empty mass matrix with the
identity. With this change, ode15s() returns the correct result if i run the
code from the OP.

The question now would be how to initialize the IDA interface when no mass
matrix is specified. But maybe passing the identity in ode15s.m is also a good
fix? At least sound reasonable.


(file #51087)
    _______________________________________________________

Additional Item Attachment:

File name: identity_for_mass.patch        Size:0 KB
    <https://file.savannah.gnu.org/file/identity_for_mass.patch?file_id=51087>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60240>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]