Differential Operators¶
The rectangular package builds sparse nodal derivative matrices from a
GBMSCApproximation.
from gbmsc_pde.operators import build_differential_operators
Mx, My, Mxx, Myy = build_differential_operators(approximation)
Returned Matrices¶
The matrices act on flattened source-node vectors:
ux = Mx.dot(u)
uy = My.dot(u)
uxx = Mxx.dot(u)
uyy = Myy.dot(u)
Returned matrices:
Mx: approximatespartial_x u.My: approximatespartial_y u.Mxx: approximatespartial_xx u.Myy: approximatespartial_yy u.
Each matrix has shape:
(grid.N, grid.N)
Sparse Structure¶
Rows are evaluated at source nodes. The nonzero pattern is determined by the sampled local subgrids contributing to each source node. The resulting operators are sparse and compatible with SciPy sparse linear algebra.