4.1.2.1.1 pde.backends.numba.operators.cartesian module
This module implements differential operators on Cartesian grids.
Make a Laplace operator on a Cartesian grid. |
|
Make a gradient operator on a Cartesian grid. |
|
Make a divergence operator on a Cartesian grid. |
|
Make a vector gradient operator on a Cartesian grid. |
|
Make a vector Laplacian on a Cartesian grid. |
|
Make a tensor divergence operator on a Cartesian grid. |
- make_divergence(grid, *, backend=None, method='central')[source]
Make a divergence operator on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdbackend (
NumbaBackend) – References to the backend to read configuration detailsmethod (str) – The method for calculating the derivative. Possible values are ‘central’, ‘forward’, and ‘backward’.
- Returns:
A function that can be applied to an array of values
- Return type:
OperatorImplType
- make_gradient(grid, *, backend=None, method='central')[source]
Make a gradient operator on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdbackend (
NumbaBackend) – References to the backend to read configuration detailsmethod (str) – The method for calculating the derivative. Possible values are ‘central’, ‘forward’, and ‘backward’.
- Returns:
A function that can be applied to an array of values
- Return type:
OperatorImplType
- make_laplace(grid, *, backend=None, spectral=None, **kwargs)[source]
Make a Laplace operator on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdbackend (
NumbaBackend) – References to the backend to read configuration detailsspectral (bool or None) – Flag deciding whether a spectral implementation is used. If None, the value is controlled by the configuration.
**kwargs – Specifies extra arguments influencing how the operator is created. Note that some laplace operators support the corner_weight argument, which allows setting weighting factors for corner points of the stencil.
- Returns:
A function that can be applied to an array of values
- Return type:
OperatorImplType
- make_tensor_divergence(grid, *, backend=None, method='central')[source]
Make a tensor divergence operator on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdbackend (
NumbaBackend) – References to the backend to read configuration detailsmethod (str) – The method for calculating the derivative. Possible values are ‘central’, ‘forward’, and ‘backward’.
- Returns:
A function that can be applied to an array of values
- Return type:
OperatorImplType
- make_vector_gradient(grid, *, backend=None, method='central')[source]
Make a vector gradient operator on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdbackend (
NumbaBackend) – References to the backend to read configuration detailsmethod (str) – The method for calculating the derivative. Possible values are ‘central’, ‘forward’, and ‘backward’.
- Returns:
A function that can be applied to an array of values
- Return type:
OperatorImplType
- make_vector_laplace(grid, *, backend=None)[source]
Make a vector Laplacian on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdbackend (
NumbaBackend) – References to the backend to read configuration details
- Returns:
A function that can be applied to an array of values
- Return type:
OperatorImplType