Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Derivative axis-free #22

Open
dlfivefifty opened this issue Oct 25, 2019 · 6 comments
Open

Make Derivative axis-free #22

dlfivefifty opened this issue Oct 25, 2019 · 6 comments

Comments

@dlfivefifty
Copy link
Member

I think Derivative should behave like UniformScaling and not require axes.

@jagot
Copy link
Member

jagot commented Oct 25, 2019

👍, but how does that scale to multiple dimensions? I.e. how do you distinguish between partial derivatives, along e.g.x only, and the gradient operator?

@dlfivefifty
Copy link
Member Author

Good question. I suppose we could have:

D = Derivative()
D2 = D^2 # stored lazily as `applied(^,D,2)`
Dx = D  I # stored lazily as `applied(⊗,D, I)`
Dy = I  D  # stored lazily as `applied(⊗,I,D)`= [Dx; Dy] # stored lazily as `applied(vcat,Dx,Dy)`

Alternatively, we could try to do things "properly" with differential forms...

@jagot
Copy link
Member

jagot commented Oct 25, 2019

I guess the ⊗ approach works for curvilinear coordinates (polar/spherical coordinates, etc), but if we ever want to do differential geometry, i.e. with a spatially varying metric, we need differential forms (?)

@dlfivefifty
Copy link
Member Author

It's interesting to think what differentiable forms would look like in quasi-array language: I'm not aware of finite-dimensional analogues of differential forms. Though we'll still need gradients and partial derivatives anyways so maybe best not to overthink it: just have Gradient and Laplacian types?

@jagot
Copy link
Member

jagot commented Oct 25, 2019

Yes, I agree that Gradient and Laplacian will be enough for multiple dimensions, for now. I guess that PartialDerivative will still need to be attached to an axis though?

@dlfivefifty
Copy link
Member Author

Yes, since partial derivatives are inherently coordinate dependent they probably don’t need their own type, and the construction above is fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants