SciML / BoundaryValueDiffEq.jl

Boundary value problem (BVP) solvers for scientific machine learning (SciML)
Other
44 stars 34 forks source link

BigFloat support for TwoPointBVProblem using MIRK4 #43

Closed seadra closed 2 months ago

seadra commented 5 years ago

Using BigFloat with a TwoPointBVProblem and MIRK4 solver currently fails with the following error:

ArgumentError: matrix type SparseArrays.SparseMatrixCSC{BigFloat,Int64}not supported. Try lu(convert(SparseMatrixCSC{Float64/ComplexF64,Int}, A)) for sparse floating point LU using UMFPACK or lu(Array(A)) for generic dense LU.

ChrisRackauckas commented 5 years ago

We probably just need to add a dependency on GenericSVD.jl

seadra commented 5 years ago

I naively tried using GenericSVD in my code but it didn't work, so I'm guessing that means something else :)

avik-pal commented 7 months ago

I thought BigFloat would just work, but seems like the problem is more fundamental

julia> similar(rand(BigFloat, 2, 3))
2×3 Matrix{BigFloat}:
 #undef  #undef  #undef
 #undef  #undef  #undef

This makes all of the internal NonlinearSolve machinery fail because it often performs concatenation and such on a similared array before assigning values to it.

ChrisRackauckas commented 6 months ago

For safety, just zero?

avik-pal commented 6 months ago

yes probably that's the way to go, it just needs to be added at quite a few places in NonlinearSolve

avik-pal commented 5 months ago

NonlinearSolve now supports bigfloats natively. Need to add a test for this here.