pg_utils.numerics.matrices.InnerQuad_Rule

class pg_utils.numerics.matrices.InnerQuad_Rule(inner_prod: InnerProduct1D)[source]

Bases: object

Quadrature of inner product based on certain rule Abstract base class for inner product quad evaluators

__init__(inner_prod: InnerProduct1D) None[source]

Methods

__init__(inner_prod)

gramian(nrange_trial, nrange_test, *args, ...)

Calculate Gram matrix, the matrix formed by the inner products of trial and test functions.

gramian(nrange_trial: List[int], nrange_test: List[int], *args, **kwargs) Union[ndarray, matrix, MutableDenseMatrix][source]

Calculate Gram matrix, the matrix formed by the inner products of trial and test functions. Abstract method to be overriden for actual realization.

Strictly speaking, Gram matrix may be a abuse of terminology, as the inner product is usually not in the form <vi, vj>, but rather in the form <ui, L(vj)>, i.e. the test and trial functions are different, and the second operand may well involve a linear operator on the trial expansion.

Parameters:
  • nrange_trial (List[int]) – range of trial functions, an array of int indices to be substituted into n_trial

  • nrange_test (List[int]) – range of test functions, an array of int indices to be substituted into n_test