darsia.face_to_cell#

face_to_cell(grid, flat_flux, pt=None)[source]#

Reconstruct the vector fluxes on the cells from normal fluxes on the faces.

Use the Raviart-Thomas reconstruction of the fluxes on the cells from the fluxes on the faces, and use arithmetic averaging of the fluxes on the faces, equivalent with the L2 projection of the fluxes on the faces to the fluxes on the cells.

Matrix-free implementation.

Parameters:
griddarsia.Grid

Grid.

flat_fluxnp.ndarray

Flat fluxes (normal fluxes on the faces).

ptnp.ndarray, optional

Points at which to evaluate the fluxes, relative to the reference cell [0,1]**dim, in matrix-indexing. Uses Defaults to None. Then the center of the reference cell is used.

Returns:
np.ndarray

Cell-based vectorial fluxes.