Skip to content

Differentiation matrices #1777

@rahulgaur104

Description

@rahulgaur104

Differentiation Matrices

Differentiation matrices are an interesting choice to calculate the numerical derivative of a smooth function. Once the matrix D is assembled, obtaining the derivative of a function vector f reduces to a single operation

$$ f\, \prime \approx\; D\,f $$

which should be fast on a GPU.

A simple 1D example on a uniform grid would be a tridiagonal finite-difference matrix. Increasing the FD order widens the bandwidth and drops the truncation error to $\mathcal{O}(\Delta x^{p})$.
This technique can also be implemented with a spectral instead of a finite-difference representation, potentially increasing the accuracy of the derivatives.

For a tensor-product grid $(\rho,\vartheta,\varphi)$ in which the coordinates are independent, directional derivatives commute. Multi-D operators can be assembled with Kronecker products:

$$ \begin{aligned} \nabla_\varphi &= I_\rho \otimes I_\vartheta \otimes D_\varphi \end{aligned} $$

Issues: Some spectral differentiation matrices are ill-conditioned and have no nice properties (symmetry, orthogonality). Writing a full matrix in 3D can be expensive in terms of memory consumption even with the current GPUs. But it would still be a nice feature to have for 1D, 2D or low-resolution 3D derivatives.

Resolving this issue would allow us to test the derivatives explained in #1771


References

  1. J. A. C. Weideman & S. C. Reddy,
    “A MATLAB Differentiation Matrix Suite,” ACM TOMS 26 (2000) 465-519.
    https://doi.org/10.1145/365723.365727

  2. L. N. Trefethen, Spectral Methods in MATLAB. SIAM, 2000.

Metadata

Metadata

Assignees

Labels

P3Highest Priority, someone is/should be actively working on this

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions