DiffEqOperators.jl
DiffEqOperators.jl copied to clipboard
UniformScaling{Bool} in compositions with DerivativeOperators and GhostDerivativeOperators
For some applications I would like to solve for v(x) in systems of the form:
p*v(x) = f(x) + µ*L1*v(x) + σ/2*L2*v(x)
Ideally I would like to write something like:
v = (p*I - µ*L1Q - σ/2*L2Q) \ f.(x)
Where L1Q and L2Q are the appropriate GhostDerivativeOperators
I am wondering how best to implement compositions of DerivativeOperators and /or GhostDerivativeOperators with a UniformScaling{Bool}? Should we essentially create our own version of UniformScaling{Bool} that fits with our type-tree and is compatible with our composition methods?
@ChrisRackauckas @xtalax @shivin9
There is already a DiffEqScaledOperator in composite_operators.jl, and a DiffEqIdentity and DiffEqScalar found in DiffEqBase/src/operators/basic_operators.jl. I note that the operators there are still in need of an Array() method, but apart from that since they are all subtypes of AbstactDiffEqLinearOperator they should compose ok, and since ldiv! is defined for the compositions this should then solve correctly.
I think that #170 will need to be finished and merged before that denominator will compose correctly though - I need you to take a deeper look at that to see if you agree with the changes made there by the way.