DiffEqOperators.jl
DiffEqOperators.jl copied to clipboard
Roadmap for Vector Derivative Operators
Roadmap for Vector Derivative Operators
Continuing from #146
A checklist on how to allow Vector calculus operations on u::AbstractArray{AbstractArray{T,M}, N}
, useful in a lot of physics applications and likely elsewhere.
This is just spitballing to get some ideas that have been floating about written down before I forget them - This would be a fair amount of work, especially writing a mul that can handle arbitrary vector operators efficiently. I'd appreciate feedback and ideas @ChrisRackauckas @ajozefiak @shivin9,
create a VectorDerivativeOperator
that wraps a A::DerivativeOperator
- [x] Create
VectorDerivativeOperator
- only needs fields forA
andcomponent
- [ ] Implement all other methods to get this to behave as an
AbstractDiffEqLinearOperator
In both cases
- [ ] Specialised
*
,mul
ldiv
convolutions etc. that account for the components - [x] A
ComposedVectorOperator
, withops::Array{O<:AbstractCompositeOperator, N}
which is an array with the same shape as the return eltype of the operator (may be different from the shape of theeltype
ofu
). Each element of ops is a composedDiffEqOperator
, which alone would act on someu
to give a scalar field. Together, the ops can represent a set of vector/tensor differential equations, returning a vecto/tensor field of any order. - [ ] Some method overloads to let operators with different sized return eltype play well together
L = Div()*Curl()
as an example should work, even thoughdiv(u)
is a scalar field andcurl(u)
a vector field. ComposedVectorOperator will need some smart rules for combining ops in this case. - [ ] Finally, and critically, a highly optimised
mul
for theComposedVectorOperator
that can query theops
and fuse at leastfor I in CartesianIndices(u_interior)
in the convolutions.
I don't get why it would be a DerivativeOperator
. Almost none of the functions would apply. It should be its own operator.