pygeon.numerics.restrictions module

This module contains functions that compute restriction operators.

pygeon.numerics.restrictions.zero_tip_dofs(mdg, n_minus_k, **kwargs)[source]

Compute the operator that maps the tip degrees of freedom to zero.

Parameters:
  • mdg (pg.MixedDimensionalGrid) – The mixed-dimensional grid.

  • n_minus_k (int) – The difference between the dimension and the order of the differential form.

  • kwargs

    Optional parameters:

    • as_bmat (bool): In case of mixed-dimensional, return the matrix as sparse sub-blocks. Default False.

Returns:

The operator that maps the tip degrees of freedom to zero.

Return type:

sps.csc_array or np.ndarray

pygeon.numerics.restrictions.remove_tip_dofs(mdg, n_minus_k)[source]

Compute the operator that removes the tip degrees of freedom.

This function computes the operator that removes the tip degrees of freedom from a given mixed-dimensional grid. The operator is represented as a sparse matrix in compressed sparse column (CSC) format.

Parameters:
  • mdg (pg.MixedDimensionalGrid) – The mixed-dimensional grid.

  • n_minus_k (int) – The difference between the dimension and the order of the differential form.

Returns:

The operator that removes the tip degrees of freedom.

Return type:

sps.csc_array

pygeon.numerics.restrictions.get_codim_str(n_minus_k)[source]

Helper function that returns the name of the mesh entity

Parameters:

n_minus_k (int) – The codimension of the mesh entity.

Returns:

The name of the mesh entity

Return type:

str