gensbi.utils.math#

Functions#

_divergence_single(vf, t, x)

divergence(vf, t, x[, args])

Compute the divergence of the vector field vf at point x and time t.

Module Contents#

gensbi.utils.math._divergence_single(vf, t, x)[source]#
gensbi.utils.math.divergence(vf, t, x, args=None)[source]#

Compute the divergence of the vector field vf at point x and time t. :param vf: The vector field function. :type vf: Callable :param x: The point at which to compute the divergence. :type x: Array :param t: The time at which to compute the divergence. :type t: Array

Returns:

The divergence of the vector field at point x and time t.

Return type:

Array

Parameters:
  • vf (Callable)

  • t (jax.Array)

  • x (jax.Array)

  • args (Optional[jax.Array])