4.1.1.1.1 pde.backends.jax.operators.cartesian module

This module implements differential operators on Cartesian grids.

make_laplace

Make a Laplace operator on a Cartesian grid.

make_gradient

Make a gradient operator on a Cartesian grid.

make_divergence

Make a divergence operator on a Cartesian grid.

make_vector_gradient

Make a vector gradient operator on a Cartesian grid.

make_vector_laplace

Make a vector Laplacian on a Cartesian grid.

make_tensor_divergence

Make a tensor divergence operator on a Cartesian grid.

make_divergence(grid, *, method='central')[source]

Make a divergence operator on a Cartesian grid.

Parameters:
  • grid (CartesianGrid) – The grid for which the operator is created

  • 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:

OperatorImplType

make_gradient(grid, *, method='central')[source]

Make a gradient operator on a Cartesian grid.

Parameters:
  • grid (CartesianGrid) – The grid for which the operator is created

  • 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:

OperatorImplType

make_laplace(grid, **kwargs)[source]

Make a Laplace operator on a Cartesian grid.

Parameters:
  • grid (CartesianGrid) – The grid for which the operator is created

  • **kwargs – Specifies extra arguments influencing how the operator is created.

Returns:

A function that can be applied to an array of values

Return type:

OperatorImplType

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 created

  • 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:

OperatorImplType

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 created

  • 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:

OperatorImplType

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:

OperatorImplType