pygeon.numerics.stiffness module

This module contains functions for computing the stiffness operators.

pygeon.numerics.stiffness.cell_stiff(mdg, discr=None, **kwargs)[source]

Compute the stiffness matrix for the piecewise constants on a (MD-)grid.

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

  • discr (pp discretization object) – The discretization object.

Returns:

sps.csc_array, num_cells x num_cells

pygeon.numerics.stiffness.face_stiff(mdg, discr=None, **kwargs)[source]

Compute the stiffness matrix for discretization defined on the faces of a (MD-)grid.

Parameters:
  • mdg (pg.MixedDimensionalGrid)

  • discr (pp.RT0 or pp.MVEM)

Returns:

sps.csc_array, num_faces x num_faces

pygeon.numerics.stiffness.ridge_stiff(mdg, discr=None, **kwargs)[source]

Compute the stiffness matrix for discretization defined on the ridges of a (MD-)grid.

Parameters:
  • mdg (pp.MixedDimensionalGrid)

  • discr (pp discretization object)

Returns:

sps.csc_array, num_ridges x num_ridges

pygeon.numerics.stiffness.peak_stiff(mdg, discr=None, **kwargs)[source]

Compute the stiffness matrix for discretization defined on the peaks of a (MD-)grid.

Parameters:
  • mdg (pp.MixedDimensionalGrid)

  • discr (pp discretization object)

Returns:

sps.csc_array, num_peaks x num_peaks

pygeon.numerics.stiffness.stiff_matrix(mdg, n_minus_k, discr, **kwargs)[source]

Compute the stiffness matrix on a mixed-dimensional grid.

Parameters:
  • mdg (pp.MixedDimensionalGrid)

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

  • discr (pg discretization object)

  • data (dict) – The data object associated to the grid.

  • local_matrix (function) – Function that generates the local mass matrix on a grid.

Returns:

sps.csc_array, num_dofs x num_dofs