pygeon.numerics.projections module
This module contains functions for creating projection operators.
- pygeon.numerics.projections.eval_at_cell_centers(mdg, discr, **kwargs)[source]
Create an operator that evaluates a solution in the cell centers.
This function takes a mixed-dimensional grid mdg and a discretization discr (optional) and returns an operator that can be used to evaluate a solution in the cell centers of the grid.
- Parameters:
mdg (pg.MixedDimensionalGrid) – The mixed-dimensional grid.
discr (pg.Discretization) – The discretization used for the evaluation.
kwargs (dict) –
Optional parameters:
as_bmat (bool): In case of mixed-dimensional, return the matrix as sparse sub-blocks. Default is False.
- Returns:
The operator that evaluates the solution in the cell centers. If as_bmat is True, the operator is returned as sparse sub-blocks in sps.csc_array format. Otherwise, the operator is returned as a block matrix in sps.block_array format.
- Return type:
sps.csc_array or sps.block_array