pygeon.numerics.differentials module
This module contains functions for computing the differential operators.
- pygeon.numerics.differentials.div(grid, **kwargs)[source]
Compute the divergence.
- Parameters:
grid (pg.Grid, pg.MortarGrid, or pg.MixedDimensionalGrid)
kwargs –
Optional parameters:
as_bmat: In case of mixed-dimensional, return the matrix as sparse sub-blocks. Default False.
- Returns:
sps.csc_array. The divergence operator.
- pygeon.numerics.differentials.curl(grid, **kwargs)[source]
Compute the curl.
- Parameters:
grid (pg.Grid, pg.MortarGrid, or pg.MixedDimensionalGrid)
kwargs –
Optional parameters:
as_bmat: In case of mixed-dimensional, return the matrix as sparse sub-blocks. Default False.
- Returns:
sps.csc_array. The curl operator.
- pygeon.numerics.differentials.grad(grid, **kwargs)[source]
Compute the gradient.
- Parameters:
grid (pg.Grid, pg.MortarGrid, or pg.MixedDimensionalGrid)
kwargs –
Optional parameters:
as_bmat: In case of mixed-dimensional, return the matrix as sparse sub-blocks. Default False.
- Returns:
sps.csc_array. The gradient operator.
- pygeon.numerics.differentials.exterior_derivative(grid, n_minus_k, **kwargs)[source]
Compute the (mixed-dimensional) exterior derivative for the differential forms of order n - k.
- Parameters:
grid (pg.Grid, pg.MortarGrid, or pg.MixedDimensionalGrid)
n_minus_k (int) – The difference between the ambient dimension and the order of the differential form.
- Returns:
sps.csc_array. The differential operator.