From 81559b2c84cc7cc22a071c6f8e4550be6b986207 Mon Sep 17 00:00:00 2001 From: oscarddssmith Date: Tue, 10 Sep 2024 11:27:56 -0400 Subject: [PATCH] fix MatrixOperator mass_matrix --- lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl b/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl index da627a55f8..6c30602ea7 100644 --- a/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl +++ b/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl @@ -718,6 +718,9 @@ function calc_W!(W, integrator, nlsolver::Union{Nothing, AbstractNLSolver}, cach if W.J isa MatrixOperator J = J.A end + if mass_matrix isa MatrixOperator + mass_matrix = mass_matrix.A + end if new_W && !isdae jacobian2W!(W._concrete_form, mass_matrix, dtgamma, J, W_transform) end