div
div(func, shift=None, order=None, method='FD', side=None, **kwargs)Divergence of the input Function.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| func | Function or TensorFunction | Function to take the divergence of | required |
| shift | Shift for the center point of the derivative in number of gridpoints | None |
|
| order | Discretization order for the finite differences. Uses func.space_order when not specified |
None |
|
| method | Discretization method. Options are ‘FD’ (default) and ‘RSFD’ (rotated staggered grid finite-difference). | 'FD' |
|
| side | Side or tuple of Side | Side of the finite difference location, centered (at x), left (at x - 1) or right (at x + 1). | centered |
| weights | Custom weights for the finite difference coefficients. | required |