flow.duct_walls
flow.duct_walls(shape)
The lateral walls of a duct whose axis is +Y.
The x and z extremes are solid; the y extremes are left open for the inlet and outlet.
Built in NumPy, and that is deliberate rather than incidental: the mask is fixed geometry that nothing differentiates, and :func:~cadjoint.flow.solver.step_for caches it on the configuration. A jnp array built during someone’s first (traced) call would be a tracer, and the cache would hand that tracer to every later call – which JAX reports as a leak. A concrete array cannot leak.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| shape | tuple[int, int, int] | (NX, NY, NZ) grid shape. |
required |
Returns
| Name | Type | Description |
|---|---|---|
| np.ndarray | Boolean wall mask, (NX, NY, NZ). |