jaxfluids.stencils.derivative package
Submodules
jaxfluids.stencils.derivative.deriv_fourth_order_center module
- class jaxfluids.stencils.derivative.deriv_fourth_order_center.DerivativeFourthOrderCenter(nh: int, inactive_axis: List, offset: int = 0)[source]
Bases:
SpatialDerivative- 4th order stencil for 1st derivative at the cell center
x
| | | | |i-2 | i-1 | i | i+1 | i+2 || | | | |- derivative_xi(buffer: Array, dxi: Array, axis: int) Array[source]
Calculates the derivative in the direction indicated by axis.
- Parameters:
buffer (jnp.ndarray) – Buffer for which the derivative will be calculated
dxi (jnp.ndarray) – Cell sizes along axis direction
axis (int) – Spatial axis along which derivative is calculated
- Returns:
Buffer with numerical derivative
- Return type:
jnp.ndarray
jaxfluids.stencils.derivative.deriv_fourth_order_face module
- class jaxfluids.stencils.derivative.deriv_fourth_order_face.DerivativeFourthOrderFace(nh: int, inactive_axis: List, offset: int = 0)[source]
Bases:
SpatialDerivative- 4th order stencil for 1st derivative at the cell face
x
| | | |i-1 | i | i+1 | i+2 || | | |- derivative_xi(primes: Array, dxi: Array, axis: int) Array[source]
Calculates the derivative in the direction indicated by axis.
- Parameters:
buffer (jnp.ndarray) – Buffer for which the derivative will be calculated
dxi (jnp.ndarray) – Cell sizes along axis direction
axis (int) – Spatial axis along which derivative is calculated
- Returns:
Buffer with numerical derivative
- Return type:
jnp.ndarray
jaxfluids.stencils.derivative.deriv_second_order_center module
- class jaxfluids.stencils.derivative.deriv_second_order_center.DerivativeSecondOrderCenter(nh: int, inactive_axis: List, offset: int = 0)[source]
Bases:
SpatialDerivative- 2nd order stencil for 1st derivative at the cell center
x
| | |i-1 | i | i+1 || | |- derivative_xi(buffer: Array, dxi: Array, axis: int) Array[source]
Calculates the derivative in the direction indicated by axis.
- Parameters:
buffer (jnp.ndarray) – Buffer for which the derivative will be calculated
dxi (jnp.ndarray) – Cell sizes along axis direction
axis (int) – Spatial axis along which derivative is calculated
- Returns:
Buffer with numerical derivative
- Return type:
jnp.ndarray
jaxfluids.stencils.derivative.deriv_second_order_face module
- class jaxfluids.stencils.derivative.deriv_second_order_face.DerivativeSecondOrderFace(nh: int, inactive_axis: List, offset: int = 0)[source]
Bases:
SpatialDerivative- 2nd order stencil for 1st derivative at the cell face
x
| |i | i+1 || |- derivative_xi(buffer: Array, dxi: Array, axis: int) Array[source]
Calculates the derivative in the direction indicated by axis.
- Parameters:
buffer (jnp.ndarray) – Buffer for which the derivative will be calculated
dxi (jnp.ndarray) – Cell sizes along axis direction
axis (int) – Spatial axis along which derivative is calculated
- Returns:
Buffer with numerical derivative
- Return type:
jnp.ndarray
jaxfluids.stencils.derivative.second_deriv_fourth_order_center module
- class jaxfluids.stencils.derivative.second_deriv_fourth_order_center.SecondDerivativeFourthOrderCenter(nh: int, inactive_axis: List, offset: int = 0)[source]
Bases:
SpatialDerivative- 4th order stencil for 2nd derivative at the cell center
x
| | | | |i-2 | i-1 | i | i+1 | i+2 || | | | |- derivative_xi(primes: Array, dxi: Array, i: int) Array[source]
Calculates the derivative in the direction indicated by axis.
- Parameters:
buffer (jnp.ndarray) – Buffer for which the derivative will be calculated
dxi (jnp.ndarray) – Cell sizes along axis direction
axis (int) – Spatial axis along which derivative is calculated
- Returns:
Buffer with numerical derivative
- Return type:
jnp.ndarray
jaxfluids.stencils.derivative.second_deriv_second_order_center module
- class jaxfluids.stencils.derivative.second_deriv_second_order_center.SecondDerivativeSecondOrderCenter(nh: int, inactive_axis: List, offset: int = 0)[source]
Bases:
SpatialDerivative- 2nd order stencil for 1st derivative at the cell center
x
| | |i-1 | i | i+1 || | |- derivative_xi(buffer: Array, dxi: Array, i: int) Array[source]
Calculates the derivative in the direction indicated by axis.
- Parameters:
buffer (jnp.ndarray) – Buffer for which the derivative will be calculated
dxi (jnp.ndarray) – Cell sizes along axis direction
axis (int) – Spatial axis along which derivative is calculated
- Returns:
Buffer with numerical derivative
- Return type:
jnp.ndarray