DiffEqOperators.jl icon indicating copy to clipboard operation
DiffEqOperators.jl copied to clipboard

Roadmap for Vector Derivative Operators

Open xtalax opened this issue 5 years ago • 1 comments

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 for A and component
  • [ ] 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, with ops::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 the eltype of u). Each element of ops is a composed DiffEqOperator, which alone would act on some u 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 though div(u) is a scalar field and curl(u) a vector field. ComposedVectorOperator will need some smart rules for combining ops in this case.
  • [ ] Finally, and critically, a highly optimised mul for the ComposedVectorOperator that can query the ops and fuse at least for I in CartesianIndices(u_interior) in the convolutions.

xtalax avatar Aug 09 '19 14:08 xtalax

I don't get why it would be a DerivativeOperator. Almost none of the functions would apply. It should be its own operator.

ChrisRackauckas avatar Aug 09 '19 17:08 ChrisRackauckas