darsia.cell_to_face_average#
- cell_to_face_average(grid, cell_qty, mode)[source]#
Project scalar cell quantity to scalar face quantity via averaging.
Allow for arithmetic or harmonic averaging of the cell quantity to the faces. In the harmonic case, the averaging is regularized to avoid division by zero. Matrix-free implementation.
- Parameters:
- grid
darsia.Grid Grid.
- cell_qty
np.ndarray Scalar-valued cell-based quantity.
- mode
str Mode of projection, either “arithmetic” or “harmonic” (averaging).
- grid
- Returns:
np.ndarrayFace-based quantity.