Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 1.63 KB

boundary_handler_3d.md

File metadata and controls

39 lines (28 loc) · 1.63 KB

boundary_handler_3d

do_BCs

def do_BCs(arr,
           rim=1,
           direction=-1,
           vals_xb=None,
           vals_xe=None,
           vals_yb=None,
           vals_ye=None,
           vals_zb=None,
           vals_ze=None)

Boundary conditions on 3D plane.

Arguments:

  • arr jax.Array - Three-dimensional input array.
  • rim int, optional - Number of boundary cells (see below). Defaults to 1.
  • direction int, optional - Restrict BCs to x-direction (0), y-direction (1), or allow all directions (-1). Defaults to -1.
  • vals_xb jax.Array, optional - Two-dimensional array of shape arr.shape[0,1] for setting dims 1,2 from beginning. Defaults to None.
  • vals_xe jax.Array, optional - Two-dimensional array of shape arr.shape[0,1] for setting dims 1,2 from end. Defaults to None.
  • vals_yb jax.Array, optional - Two-dimensional array of shape arr.shape[0,2] for setting dims 0,2 from beginning. Defaults to None.
  • vals_ye jax.Array, optional - Two-dimensional array of shape arr.shape[0,2] for setting dims 0,2 from end. Defaults to None.
  • vals_zb jax.Array, optional - Two-dimensional array of shape arr.shape[1,2] for setting dims 1,2 from beginning. Defaults to None.
  • vals_ze jax.Array, optional - Two-dimensional array of shape arr.shape[1,2] for setting dims 1,2 from end. Defaults to None.

Returns:

  • arr jax.Array - With first and last rim + 1 rows / columns (depending on direction) set to either zero or the corresponding vals array (if given).