4.1.2.1.2 pde.backends.numba.operators.common module
Common functions that are used by many operators.
- make_derivative(grid, axis=0, *, method='central', backend=None)[source]
Make a derivative operator along a single axis using numba compilation.
- Parameters:
grid (
GridBase) – The grid for which the operator is createdaxis (int) – The axis along which the derivative will be taken
method (str) – The method for calculating the derivative. Possible values are ‘central’, ‘forward’, and ‘backward’.
backend (
NumbaBackend) – References to the backend to read configuration details
- Returns:
A function that can be applied to an full array of values including those at ghost cells. The result will be an array of the same shape containing the actual derivatives at the valid (interior) grid points.
- Return type:
OperatorImplType
- make_derivative2(grid, axis=0, *, backend=None)[source]
Make a second-order derivative operator along a single axis.
- Parameters:
grid (
GridBase) – The grid for which the operator is createdaxis (int) – The axis along which the derivative will be taken
backend (
NumbaBackend) – References to the backend to read configuration details
- Returns:
A function that can be applied to an full array of values including those at ghost cells. The result will be an array of the same shape containing the actual derivatives at the valid (interior) grid points.
- Return type:
OperatorImplType