-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Singular MM's initialization #1070
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1070 +/- ##
==========================================
- Coverage 77.2% 76.15% -1.06%
==========================================
Files 95 95
Lines 31261 31448 +187
==========================================
- Hits 24136 23950 -186
- Misses 7125 7498 +373
Continue to review full report at Codecov.
|
When all could the user ask for |
I guess it only shows up in initialize, but with this method we need a |
I added initialization for singular mass matrices, but it assumes semi-explicit form. |
Open an issue on semi-explicit form in DAE initialization |
Open an issue on tolerances of DAE initialization |
Talking with Yingbo, I realized that things that commonly use a non semiexplicit form are index 2, since they are relating differential variables to differential variables as a constraint. Seems like an issue to punt for now. |
We don't have a problem form for Semi Explicit DAEs. Can I work on it next? |
This PR made the following problem fail, because it now calls using OrdinaryDiffEq, DiffEqDevTools, SparseArrays, LinearAlgebra
u0 = sin.(range(0, pi, length = 100))
tspan = (0.0, 1.0)
M = 0.5Diagonal(ones(100))
A = spdiagm(0 => ones(100))
update_func = (_A, u, p, t) -> _A.nzval .= t
f = DiffEqArrayOperator(A; update_func=update_func)
prob = ODEProblem(ODEFunction(f; mass_matrix=M), u0, tspan)
solve(prob, ImplicitEuler(linsolve=LinSolveFactorize(lu))) gives ERROR: MethodError: no method matching lu!(::Diagonal{Float64,Array{Float64,1}}, ::Val{true}; check=false) Should there be specializations of |
Yes, we should specialize this on operator types and matrices. |
Sorry if this is taking awhile, but I want to make sure we do this right. I'm taking this all the way to ArrayInterface to make |
Fixes #1039
Fixes #1042
@YingboMa can you add the singular mass-matrix initialization?
@kanav99 what should we do about
du
? Re-compute it on demand when we reinitialize?P.S. need a doc update that describes the intializealgs