4.1.1.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='config', method='central')[source]
Make a divergence operator on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdbackend (str) – Backend used for calculating the divergence operator. The value is read from the configuration for config, and a suitable backend is chosen for auto.
method (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:
- make_gradient(grid, *, method='central')[source]
Make a gradient operator on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdmethod (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:
- make_laplace(grid, *, spectral=None, **kwargs)[source]
Make a Laplace operator on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdspectral (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
- Returns:
A function that can be applied to an array of values
- Return type:
- make_tensor_divergence(grid, *, method='central')[source]
Make a tensor divergence operator on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdmethod (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:
- make_vector_gradient(grid, *, method='central')[source]
Make a vector gradient operator on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is createdmethod (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:
- make_vector_laplace(grid)[source]
Make a vector Laplacian on a Cartesian grid.
- Parameters:
grid (
CartesianGrid) – The grid for which the operator is created- Returns:
A function that can be applied to an array of values
- Return type: