SciML / DiffEqOperators.jl

Linear operators for discretizations of differential equations and scientific machine learning (SciML)
https://docs.sciml.ai/DiffEqOperators/stable/
Other
283 stars 74 forks source link

Support Complex Numbers? #237

Open AndiMD opened 4 years ago

AndiMD commented 4 years ago

Can we allow complex numbers? Example:

RobinBC( (0.5+0im,0.5*im, 1.0+0im), (0.5+0im,0.5*im, 0.0+0im), 1.0)

ERROR: LoadError: MethodError: no method matching RobinBC(::Tuple{Complex{Float64},Complex{Float64},Complex{Float64}}, ::Tuple{Complex{Float64},Complex{Float64},Complex{Float64}}, ::Float64)
ChrisRackauckas commented 4 years ago

Yes, we should probably just change the type signatures to allow this (and test it of course)

AndiMD commented 4 years ago

this will also allow optimizing boundaries with ForwardDiff.Dual, which appears to be used by certain ODE solvers.

ChrisRackauckas commented 4 years ago

Yes, I would not be opposed to seeing this change.

ChrisRackauckas commented 4 years ago

It should probably just take changing the type signatures all to <:Number

volkerkarle commented 3 years ago

Hi folks, may I ask what is the progress for this and if there is something to do? I wonder what is the technical current state, can we implement complex PDEs such as Gross–Pitaevskii equations? Thanks!