@@ -739,35 +739,27 @@ end
739739 if cache. W isa StaticWOperator
740740 integrator. stats. nw += 1
741741 J = calc_J (integrator, cache, next_step)
742- @assert J isa StaticArray
743742 W = StaticWOperator (W_transform ? J - mass_matrix * inv (dtgamma) : dtgamma * J - mass_matrix)
744743 elseif cache. W isa WOperator
745744 integrator. stats. nw += 1
746745 J = if islin
747- isode ? f. f : f. f1. f
748- elseif cache. W. J === nothing
749- calc_J (integrator, cache, next_step)
750- else
751- J = update_coefficients (cache. W. J, uprev, p, t)
746+ isode ? f. f : f. f1. f
747+ else
748+ calc_J (integrator, cache, next_step)
752749 end
753750 W = WOperator {false} (mass_matrix, dtgamma, J, uprev, cache. W. jacvec; transform = W_transform)
754751 elseif cache. W isa AbstractSciMLOperator
755752 W = update_coefficients (cache. W, uprev, p, t; dtgamma, transform = W_transform)
756- elseif islin
757- J = isode ? f. f : f. f1. f
758- W = WOperator {false} (mass_matrix, dtgamma, J, uprev; transform = W_transform)
759753 else
760754 integrator. stats. nw += 1
761755 J = islin ? isode ? f. f : f. f1. f : calc_J (integrator, cache, next_step)
762756 if isdae
763757 W = J
764758 else
765- W_full = W_transform ? J - mass_matrix * inv (dtgamma) :
759+ W = W_transform ? J - mass_matrix * inv (dtgamma) :
766760 dtgamma * J - mass_matrix
767- W = if W_full isa Number
768- W_full
769- else
770- DiffEqBase. default_factorize (W_full)
761+ if ! isa (W, Number)
762+ W = DiffEqBase. default_factorize (W)
771763 end
772764 end
773765 end
@@ -913,7 +905,6 @@ function build_J_W(alg, u, uprev, p, t, dt, f::F, ::Type{uEltypeNoUnits},
913905 ArrayInterface. lu_instance (J)
914906 end
915907 end
916- @show W
917908 return J, W
918909end
919910
0 commit comments